Is there a way to map ctrl+ (or ctrl-) in vim? :map <c-+>
doesn't seem to work.
1 Answer
As far as I know you cannot map it to that combinaton. Since Ctrl + doesn't in anything differ from just +, Vim has no way of recognizing it. Same goes for a lot of other combinations (for example, Ctrl-1 and such - they don't "send" anything back).
-
6Yes; you can test whether something is map-able by going into insert mode and pressing
Ctrl-V
followed by the key you're interested in. If something appropriate gets inserted, it should be map-able. For example, enterCtrl-V Ctrl-+
does nothing, butCtrl-V Ctrl-P
gives^P
– Al.Jan 8, 2010 at 13:54 -
@Al - uuu, thanks! I knew there was some way to check it, but I never could remember how.– RookJan 8, 2010 at 15:35
-
andNum -
are different keys, even though they produce the same-
when pressed. (Also, VT100 numpads can be in "application" mode, where they actually produce escape sequences of their own.)