When using gVim on Windows 7 I cannot use ^] (CTRL+]) to jump to tags as described in the Vim documentation:
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
CTRL-] Jump to the definition of the keyword under the
cursor. Same as ":tag {ident}", where {ident} is the
keyword under or after cursor.
When there are several matching tags for {ident}, jump
to the [count] one. When no [count] is given the
first one is jumped to. See |tag-matchlist| for
jumping to other matching tags.
{Vi: identifier after the cursor}
This used to bother me a lot when learning Vim. In the end I managed to solve it by using this hacky mapping
nnoremap <leader>t :tag <c-r><c-w><cr>
which allowed me to jump to tags using \t
(I used the default setting of \
as<leader>
).
This is not a problem for me anymore as I now only use gnu/linux for programming and I have already read pretty much all help there is to read. But considering that this contributed to making my experience learning Vim so much worse I ask here to get this solved for people who are in the same situation I was in.
Why doesn't CTRL+] work for me on Windows 7 and how can it be fixed?
Edit: The title has been edited with the information that this problem is caused by the keyboard layout I used.
Ctrl-]
on a word?^]
to be entered usingCtrl-AltGr-9
which does not work within Vim. I answered my own question with this information.<C-]>
on an AZERTY Mac keyboard is obtained by pressing<C-$>
,$
being in the same physical location as]
on QWERTY keyboards.Ctrl-]
was pressed. Or was it forCtrl-[
?)