将vim中的shift-tab映射到Vim中的反向选项卡 [英] Map shift-tab in vim to inverse tab in Vim
问题描述
我已经做了一些搜索,发现了大量有关vim中的绑定键的信息,但是我确定没有找到如何映射shift-tab。或者我需要什么命令将其映射到向后。
I've done some searching and found a wealth of information on binding keys in vim, but I can't find out, for sure, how to map shift-tab. Or what command I need to map it to for it to "tab backwards".
这是我目前所拥有的:
map <S-tab> <S-,><S-,>
可能相关信息:
我正在运行Debian与2.22.3终端。与VIM - Vi IMproved 7.1
Possibly Relevant Information: I'm running Debian with Terminal 2.22.3. with VIM - Vi IMproved 7.1
推荐答案
Vim已经有内置的关键命令,用于插入模式左移或右移当前行一个& shiftwidth
。他们是(插入模式):
Vim already has built-in key commands for insert mode to shift the current line left or right one &shiftwidth
. They are (in insert mode):
Ctrl-t
:shift right(助记符tab)
Ctrl-t
: shift right (mnemonic "tab")
Ctrl-d
:shift left(助记符de-tab)
Ctrl-d
: shift left (mnemonic "de-tab")
如果你还想使用shift-tab,这是你如何做的:
If you still want to use shift-tab, this is how you do it:
" for command mode
nnoremap <S-Tab> <<
" for insert mode
inoremap <S-Tab> <C-d>
这篇关于将vim中的shift-tab映射到Vim中的反向选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!