Ben Schmidt-4 wrote:
>
>
>> Hey I'm trying to map ^Z to save and then suspend.
>>
>> :map ^Z :w<CR>^Z
>>
>> I think I've got it right because I tried replacing the ^Z on the right
>> side
>> and it works perfectly. Problem is with anything I've put before ^Z it
>> repeats infinity. Luckily this was just the w command at first, but was
>> a
>> little dangerous when I had to interrupt a save to get out of the save
>> file
>> infinite loop...
>
> Use :noremap not :map so it doesn't map itself.
>
> You can use <C-z> instead of ^Z, too:
>
> :noremap <C-z> :w<CR><C-z>
>
> Ben.
>
>
Thanks! This would make sense as to why it was repeating... :)
--
View this message in context:
http://www.nabble.com/Map-Suspend-Function-tp20987147p21083585.html
Sent from the Vim - General mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---