Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
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.) –  grawity Jan 8 '10 at 12:05
add comment

1 Answer

up vote 4 down vote accepted

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

share|improve this answer
4  
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 '10 at 13:54
    
@Al - uuu, thanks! I knew there was some way to check it, but I never could remember how. –  ldigas Jan 8 '10 at 15:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.