问题
Is it possible to map a vim command to a combination of keys involving more than one modifier? For example: ctrl-alt-v
.
As far as I can tell, the only modifier key that can be used in combination with another is shift. e.g. <C-v>
and <C-V>
. Or am I missing something?
回答1:
Yeah, you would map <C-A-v>
or <C-M-v>
(A, Alt, and M, Meta are equivalent concepts). See :help key-notation.
回答2:
There's also this script (arpeggio) that allows you to use two or more simultaneously pressed keys (any keys, not just modifiers keys like shift, alt, etc.) in your mappings.
回答3:
They can be combined just fine, like this for example: <C-M-v> maps CTRL-Alt-v.
Meta (Alt) is M, Shift is S, and CTRL is C.
来源:https://stackoverflow.com/questions/1456026/can-vim-commands-be-mapped-to-key-combinations-with-1-modifier-e-g-ctrl-alt-v