4

Is there a way to map ctrl+ (or ctrl-) in vim? :map <c-+> doesn't seem to work.

1
  • Don't forget that - and Num - 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.) Jan 8, 2010 at 12:05

1 Answer 1

4

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).

2
  • 6
    Yes; 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, enter Ctrl-V Ctrl-+ does nothing, but Ctrl-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.
    – Rook
    Jan 8, 2010 at 15:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .