views:

172

answers:

2

I want to remap Ctrl-] which is used for jumping to the tags to another key binding.

These mappings work:

:map <F2> <C-]>
:map <A-1> <C-]>

But this mapping doesn't work:

:map <C-1> <C-]>

What might be the reason for this?

A: 

It might be getting trapped/filtered by your OS. If you check the mappings, is it listed?

TMN
Yes I can see it in the mappings list.
Mert Nuhoglu
A: 

I believe the problem is that Ctrl+1 is not a valid ASCII character. From this list

(search for "^^" or "^@" to see the table )

you will see that there are several keybindings such as ctrl+@ Ctrl+^ and Ctrl+]

so you are not actually calling Ctrl+2 or Ctrl+6 but their ASCII equivalents.

VIM is designed to be lightweight and fairly platform independent. so if it isn't in the list of ASCII characters you cannot make a binding to it.

gruntled
I tried <C-,> and other symbols as well. I cannot map them neither.
Mert Nuhoglu