[ACCEPTED]-is it possible to mapping Alt-hjkl in Insert mode?-vi
It's easier to map what your key combination 3 does.
Alt+something generally results in a character, differently 2 from
For example, on my Mac
hjkl generates 1
imap ˙ <Left> imap ∆ <Down> imap ˚ <Up> imap ¬ <Right>
would do it.
For arrow keys:
Start by viewing the key code your terminal 6 is sending to vim:
$ sed -n l ^[[1;9D
In the above example, i 5 ran the sed command and pressed Alt + Left.
^[[1;9D is 4 the escaped sequence being sent to vim, so 3 we can user that for our mapping.
Add this 2 to your .vimrc
map <Esc>[1;9D :tabn<CR>
Now we can cycle through vim 1 tabs by using Alt + Left
More Related questions