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;
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-
I am not sure, but it might be because <C-;>
does not map to an ASCII character. Only @
, A-Z
, [
, \
, ]
, ^
and _
map to ASCII characters (0 through 31 respectively) when combined with Ctrl.
EDIT
I did some searching and found this thread. In it, it is said that gvim.exe
works the way I suggest: only use valid control characters, no other. Interestingly vim.exe
works differently and you can do the mapping you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With