tags:

views:

191

answers:

1

I have vim 7.2 installed in my windows. In gvim, the and works for navigation among tabs by default. However, it doesn't work for vim.

Even I have below lines in _vimrc added. It still not work.

map <C-PageUp> :tabp<CR>
map <C-PageDown> :tabn<CR>

But, map and works.

map <C-left> :tabp<CR>
map <C-right> :tabn<CR>

Anybody has clue for that?

+5  A: 

The problem you describe is generally caused by vim's terminal settings not knowing the correct character sequence for a given key (on a console, all keystrokes are turned into a sequence of characters). It can also be caused by your console not sending a distinct character sequence for the key you're trying to press.

If it's the former problem, doing something like this can work around it:

:map <CTRL-V><CTRL-PAGEUP> :tabp<CR>

Where <CTRL-V> and <CTRL-PAGEUP> are literally those keys, not "less than, C, T, R, ... etc.".

If it's the latter problem then you need to either adjust the settings of your terminal program or get a different terminal program. (I'm not sure which of these options actually exist on Windows.)

Laurence Gonsalves
It turns out to be 1st problem. I literally type ":map ", then hit Ctrl-PageUp in keyborad, and then " :tabp<CR>". It works. but it shows below in _vimrc.map ¿ :tabp<CR>map Î :tabn<CR>
Morgan Cheng