On 4/23/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
Viktor Kojouharov wrote:

> It turned out that these mappings broke the arrow keys in the terminal:
> inoremap <expr> <Esc>      pumvisible()?"\<C-E>":"\<Esc>"

IMHO, if one is expecting to use vim (as opposed to gvim), mapping <Esc>
causes trouble.
That's because most terminals issue escape sequences
(<esc>..something..) when special
keys (such as the arrow keys, functions keys, etc), and that mapping of
the <esc> key
messes up the escape sequence.

That's only true if Vim actually interprets the characters coming in
as normal characters and not an escape sequence.  In that case it
doesn't matter if <Esc> is remapped or not, you're going to get weird
results anyway.

Besides -- how do you get out of insert
mode?  I realize
one can use ctrl-o and norm!,  but that seems painful.  If you're not
using normal mode
or command mode, then you're missing a lot of vim.

If the pum isn't visible it maps to <Esc>, so it's not hard to get out
of insert mode.  Just make sure the pum isn't visible.

 nikolai

Reply via email to