В пн, 2007-04-23 в 19:56 +0200, Nikolai Weibull написа: > 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. > That was the idea behind the mappings, which I took from a vimtip btw. But something happens, and none of the remapped keys (besides the <Esc>) work correctly if the pum is not visible. Perhaps it might still be a bug in vim7, but at least its explained now why vim6 works correctly. > nikolai -- Виктор Кожухаров /Viktor Kojouharov/
signature.asc
Description: Това е цифрово подписана част от писмото