Thursday, November 24, 2016

Vim quit insert mode when navigate with mapping keys


In order to move the cursor in insert mode, I add the following key maps in my .vimrc(I use vim 7.3 on Sun OS)


inoremap  
inoremap
inoremap
inoremap

When I press the mapping keys, the cursor moves correct, but vim will quit insert mode and switch to normal mode, what's wrong with my vim? I also tried this with my gvim on Windows, it works well. Did I lost any options for the mapping keys?


Answer



Some terminal emulators generate escape sequences for meta (alt) characters. Alt-A becomes a. This is usually a problem on *nix machines.


You can find out more details here:


http://vim.wikia.com/wiki/Fix_meta-keys_that_break_out_of_Insert_mode


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...