I am looking at part of this vimrc file from Ben Frain
https://gist.github.com/benfrain/f09dd39e66fe2da9cf0a
" Allow line movement on wraps with CTRL+usual {{{
vmap <C-j> gj
vmap <C-k> gk
vmap <C-h> g$
vmap <C-6> g^
vmap <C-0> g^
nmap <C-j> gj
nmap <C-k> gk
nmap <C-4> g$
nmap <C-6> g^
nmap <C-0> g^
" }}}
I do notice an issue in that list e.g. ctrl-k already does gk. So when that works it's not from his mapping.
I am using macvim
Even if I try something simple
~/.vim$ cat vimrc
nmap <C-0> aaaa
~/.vim$
or
~/.vim$ cat vimrc
nmap <C-0> aaaa
vmap <C-0> aaaa
~/.vim$
it's not working, it's not mapping ctrl-0 to the typing of 'aaaa'
I've tried with /usr/local/bin/vim
(that's macvim installed via brew cask install macvim
) and i've tried /usr/bin/vim
(that's the vim that comes preinstalled). So it makes no difference which vim I use.
And i'd like to know which, if any, ctrl keys can be mapped.
I have heard that it's a bad idea to map ctrl keys, maybe 'cos many are in use, and that it's better to use the leader key, whose default is backslash. So . map <leader>0 aaaa
. and that works, but i'm still curious re the mapping of ctrl.