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.

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?

share|improve this question

migrated from stackoverflow.com Aug 29 '11 at 23:57

This question came from our site for professional and enthusiast programmers.

    
See this SO question: stackoverflow.com/questions/6932702/… –  eckes Aug 31 '11 at 8:07

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 ^¨~

share|improve this answer
    
+1 I can confirm that this way works for a (german) QUERTZ keyboard: stackoverflow.com/questions/6932702/… –  eckes Aug 31 '11 at 9:50

Try this:

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

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

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

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