我们知道,组合键:ctrl+shift+w+,
可以帮助我们调整窗口大小,但我认为它很复杂,所以我想用 来映射它ctrl + ,。但我的所有方法都行不通。谁能给我一些建议?
Vim 和 gVim 不会检测到shift这样的组合,即ctrl+ shift+与+w完全相同。ctrlw
我们知道,组合键:ctrl+shift+w+,可以帮助我们调整窗口大小,(...)
没有这样的内置命令——您可以检查:help ctrl-w.
您可能正在使用一些自定义映射;您可以使用:map或检查这一点:map <c-w>。一旦找到由该映射触发的命令,您就可以创建更简单的映射。
但请注意,所有组合键均可用。特别是,Vim 不会检测到ctrl+组合,如Vim FAQ 20.5中所述:,
20.5. Why does mapping the <C-...> key not work?
The only Ctrl-printable-key chords which Vim can reliably detect (because they
are defined in the ASCII standard) are the following: >
Ctrl-@ 0x00 NUL
Ctrl-A to Ctrl-Z 0x01 to 0x1A
Ctrl-a to Ctrl-z 0x01 to 0x1A
Ctrl-[ 0x1B ESC
Ctrl-\ 0x1C
Ctrl-] 0x1D
Ctrl-^ 0x1E
Ctrl-_ 0x1F
Ctrl-? 0x7F DEL
(...)
You can try other combinations of Ctrl + any key, but they may either
not work everywhere (e.g. the terminal might not pass that key to Vim,
or they might have unintended side effects (e.g. mapping <C-I> means
also to map <Tab>).
Run Code Online (Sandbox Code Playgroud)
您可以在 20.4 找到更多信息。我无法为该键创建映射。怎么了?