Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim Bind Shift Pageup to tabnext

Why does

nnoremap <S-PageDown> :tabnext<CR>

not work in Vim?

How can I work around?

like image 417
user2722085 Avatar asked Jun 19 '26 08:06

user2722085


1 Answers

Your syntax is correct, and this mapping works for me in GVIM. I suspect you're using Vim in the terminal.

Some key combinations, like Ctrl + non-alphabetic cannot be mapped, and Ctrl + letter vs. Ctrl + Shift + letter cannot be distinguished. (Unless your terminal sends a distinct termcap code for it, which most don't.) In insert or command-line mode, try typing the key combination. If nothing happens / is inserted, you cannot use that key combination. This also applies to <Tab> / <C-I>, <CR> / <C-M> / <Esc> / <C-[> etc. (Only exception is <BS> / <C-H>.) This is a known pain point, and the subject of various discussions on vim_dev and the #vim IRC channel.

Some people (foremost Paul LeoNerd Evans) want to fix that (even for console Vim in terminals that support this), and have floated various proposals.

But as of today, no patches or volunteers have yet come forward, though many have expressed a desire to have this in a future Vim 8 major release.

like image 67
Ingo Karkat Avatar answered Jun 21 '26 03:06

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!