Search code examples
vimmappingctrl

vim mapping ctrl-;


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;


Solution

  • 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-