vim - .vimrc mapping for control key not working -
i have below mapping in .vimrc mapping control key + 1, 2, 3.. switching tabs. using gnome terminal in ubuntu 11.10, control key mappings not seem work. 1 tell doing wrong.
vim - vi improved version 7.3.154
map <c-s-]> gt map <c-s-[> gt map <c-1> 1gt map <c-2> 2gt map <c-3> 3gt map <c-4> 4gt map <c-5> 5gt map <c-6> 6gt map <c-7> 7gt map <c-8> 8gt map <c-9> 9gt map <c-0> :tablast<cr> syntax on set shiftwidth=2
first ensure terminal emulator (gnome terminal) doesn't swallow key combinations own functionality; default ctrl + number switches tabs. i'm afraid still won't able use combinations...
due way keyboard input handled internally, unfortunately isn't possible today. key combinations, ctrl + non-alphabetic cannot mapped, , ctrl + letter vs. ctrl + shift + letter cannot distinguished. (unless terminal sends distinct termcap code it, don't.) in insert or command-line mode, try typing key combination. if nothing happens / inserted, cannot use key combination. applies <tab> / <c-i>, <cr> / <c-m> / <esc> / <c-[> etc. (only exception <bs> / <c-h>.) known pain point, , subject of various discussions on vim_dev , #vim irc channel.
some people (foremost paul leonerd evans) want fix (even console vim in terminals support this), , have floated various proposals.
but of today, no patches or volunteers have yet come forward, though many have expressed desire have in future vim 8 major release.
Comments
Post a Comment