vim cant map< C-Tab> to:tabnext [英] vim cant map <C-Tab> to :tabnext
问题描述
我在.vimrc中有以下映射:
I have the following mappings in my .vimrc:
map <C-S-Tab> :tabprevious<CR>
nmap <C-S-Tab> :tabprevious<CR>
imap <C-S-Tab> <Esc>:tabprevious<CR>i
map <C-Tab> :tabnext<CR>
nmap <C-Tab> :tabnext<CR>
imap <C-Tab> <Esc>:tabnext<CR>i
我想使用Strg + Tab并使用Strg + Shift + Tab向后。为什么此映射不起作用?
I want to switch the tabs with Strg+Tab forward and with Strg+Shift+Tab backward. Why does this mapping not work?
推荐答案
您是否使用 xterm
?如果是这样,你不能映射 ctrl-tab
没有很多hackery。 xterm
和许多其他终端模拟器不识别 ctrl-tab
,只需发送一个
Are you using xterm
? If so, you can't map ctrl-tab
without a lot of hackery. xterm
and many other terminal emulators don't recognise ctrl-tab
and simply send a tab
character.
有关详细信息,请参阅我的答案:映射< C-Tab>在我的vimrc在Ubuntu中失败
See my answer here for more details: Mapping <C-Tab> in my vimrc fails in Ubuntu
或者你可以使用 gvim
应该工作没有任何捣蛋。
Or you can just use gvim
if that is suitable - it should work without any mucking around.
这篇关于vim cant map< C-Tab> to:tabnext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!