before describing my problem, I\'d list the env. applications here:
OS:linux 2.6.37-ARCH (archlinux i686)
vim: 7.2.436
Terminal emulator: urxvt (with 256co
For arrow keys:
Start by viewing the key code your terminal is sending to vim:
$ sed -n l
^[[1;9D
In the above example, i ran the sed command and pressed Alt + Left.
The ^[[1;9D
is the escaped sequence being sent to vim, so we can user that for our mapping.
Add this to your .vimrc
map <Esc>[1;9D :tabn<CR>
Now we can cycle through vim tabs by using Alt + Left
It's easier to map what your key combination does. Alt+something
generally results in a character, differently from Ctrl+something
.
For example, on my Mac Alt
plus hjkl
generates ˙∆˚¬
. So:
imap ˙ <Left>
imap ∆ <Down>
imap ˚ <Up>
imap ¬ <Right>
would do it.