Thursday, April 8, 2010

Re: How to remember end of line when quitting/reopening in insert mode

On Apr 8, 6:07 pm, Andy Wokula <anw...@yahoo.de> wrote:

> Might work, but it's only a workaround ...
>
> There are more commands that enter Insert mode:
>      a o O I A gI  maybe others
>
> and there are more commands that stop Insert mode:
>      CTRL-C, CTRL-\_CTRL-N, ...
>
> User may have mappings using these commands in non-remappable mode
> (bypassing the above mappings).

Hi Andy,
You are right. For the script to work in all cases, each incursion in
insert mode should be complemented with a "set insertmode". Each
return to normal mode by a "set noinsertmode". Perhaps this can be
done automatically.

For insert mode lovers, most of the mapping use <C-O> which is not
really leaving insert mode.
For some long tasks where normal mode is more convenient (e.g.
folding), the above workaround is useful. When it is finished, the
user definitely goes back to insert mode with "i".

Best regards
Jean Johner

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Subscription settings: http://groups.google.com/group/vim_use/subscribe?hl=en

No comments: