vim mapping ctrl-;

john-jones picture john-jones · Jun 23, 2010 · Viewed 17.9k times · Source

In my case the move-right button is ;

I want Ctrl; to move the cursor 7 characters to the right. I've tried the below .vimrc mapping, but it doesn't work:

nmap <c-;> 7;

Answer

Drasill picture Drasill · Jun 23, 2010

Like previous comment says, it seems that ";" cannot be in the form <C-;>.

You can test typing Ctrl+V + key sequence.

Ctrl+V + ; gives only ; whereas Ctrl+V + L give ^L.

So I suppose that vim cannot recognize <C-;>.

You have some more information on the key codes help pages:

:help keycodes
:help <C-