0

I'm in the habit of just hitting alt+[whatever] when I want to exit of insert mode (esc is just too far away - it's the one thing I can't for the life of me understand about vi/vim/etc.). This works, if I remember right, because the terminal translates this as an esc char, and then the following char.

Now I'm using a plugin for python. I have little code completion popup menus while I'm typing all the time. If I hit alt-j, or whatever, while a popup menu is open it closes the menu, types j and doesn't exit insert mode. Hitting esc always works. This is really messing with my muscle memory. Any idea why the alt trick doesn't work in this case?

0

Ok, I guess I should not rely on how alt is interpreted? Formalizing my alt-movement as escape habit as a mapping gave me back consistent behavior. I put the following in vimrc:

" exit by using alt-movement
imap <m-j> <esc>j
imap <m-k> <esc>k
imap <m-h> <esc>h
imap <m-l> <esc>l
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.