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?
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.
It might be getting trapped/filtered by your OS. If you check the mappings, is it listed?
<C-v><C-1>? I think it must be possible to map this in Gvim, but I do not think that you will be able to map this in Vim.*noremapinstead of*mapunless you know that you definitely need to use*map. It can save your time because you may run into the situation when your mapping does not work as expected because some characters are remapped somewhere else.<C-1>in gvim-7.2.303, typing<C-1>just produces1.