On 18/12/08 21:51, Derek Litz 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...
>
> Any ideas?

Possibility 1) Use :noremap instead of :map

Possibility 2) Use

        :map    <C-Z>   :wall | suspend<CR>


Best regards,
Tony.
-- 
There is a theory which states that if ever anyone discovers exactly
what the Universe is for and why it is here, it will instantly
disappear and be replaced by something even more bizarre and
inexplicable.  There is another theory which states that this has
already happened.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to