Friday, October 22, 2010

Re: mappings for "insert mode " and other mapping for "overwrite mode"

Reply to message «mappings for "insert mode " and other mapping for "overwrite
mode"»,
sent 21:48:46 22 October 2010, Friday
by Jeri Raye:

> "overwrite mode"
It is named ``replace mode'', not ``overwrite mode'' if I understood you
correctly.

> Is it possible to make different mappings based on "insert mode" or
> "overwrite mode"
You can use v:insertmode variable with expression mapping: pretending that you
want to map «,» to «, » in insert mode and leave it as-is in replace mode:
inoremap <expr> , ((v:insertmode==#'i')?(", "):(","))
See ``:h v:insertmode'' for more details.

> Meaning with insert-mode the cursor is a vertical stripe in between chars.
> With overwrite-mode the cursor is horizontal stripe below the char.
I am a console vim user, so this does not say anything to me. Assuming that it
is a ``replace mode''.

No comments:

Post a Comment