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

StackOverflow https://stackoverflow.com/questions/1456026

  •  12-09-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

Yeah, you would map <C-A-v> or <C-M-v> (A, Alt, and M, Meta are equivalent concepts). See :help key-notation.

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top