I have an annoying issue with the Ctrl+] key combination in Vim on my Macbook. I have a Scandinavian keyboard, so I do not have a ] key. Normally I make a ] character by Alt+9. This is an issue when I use ctags for example, as there is no simple way to jump around in files. I tried to use map <C-9> <C-]> in my .vimrc, but this does not seem to work. I did get it to work with <C-K>, but I would much rather prefer <C-9> (or maybe <D-9> - that is: Apple command key+9). How can I fix this?


3 Answers 3


Search google for an american qwerty keyboard diagram then compare it with your actual keyboard. The key located at the same spot on your keyboard will work.

On a french keyboard, $ is at exactly the same place as ] so I must type <C-$> instead of <C-]>.

In your case, it's probably ^¨~


Try this:

map <C-\> :exec("tag ".expand("<cword>"))<CR>

Of course, replace <C-\> with whatever combination you'd like.


Closest I've been able to get is with Ctrl Numpad 9:

nnoremap <C-k9> i

From what I can tell the regular number keys are not available for mapping.

The function keys work just fine though, e.g. Ctrl F9:

nnoremap <C-F9> i

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.