So, I added the following to my
.vimrc
:
inoremap <c-j> <down>
inoremap <c-j> <down>
inoremap <c-k> <up>
inoremap <c-l> <right>
Your first and second lines are the same! Change the first to the following:
inoremap <C-H> <Left>
You can confirm your mapping with:
:verbose imap <C-H>
Update following update to question, comments and acceptance
I've left the information above untouched, but to respond to the comments...
The clash with your "autoclose" plugin explains why this worked in the editor but not in
$MYVIMRC
. You could work around this by putting your mapping in a plugin file in an after-directory.I used title case for the
<C-H>
mapping consistent with the notation in the official documentation. The documentation states:The case of
{char}
does not matter; thus CTRL-A and CTRL-a are equivalent.Should you wish to map CTRL-Shift-H, use
inoremap <C-S-H>
instead.I'm delighted
:verbose map
helped you to track down the source of your problem!:verbose
is a handy tool when debugging Vim scripts.
Good luck!