Can vim commands be mapped to key combinations with >1 modifier (e.g. ctrl-alt-v)

二次信任 提交于 2019-12-10 01:00:32

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!