I want ctrl-h, ctrl-j, ctrl-k and ctrl-l in insert mode to behave like the arrow keys. I have this (among other things) in my
inoremap <C-j> <Down> inoremap <C-k> <Up> inoremap <C-h> <Left> inoremap <C-l> <Right>
Now, everything works fine except for ctrl-j. When I press ctrl-j, it will add in a tab right after my cursor position. I thought this might be caused by some of my other setting (like smarttab, shiftwidth, etc.), so I removed every line other than
inoremap <C-j> <Down>
It is still adding the tab. What makes this strange behavior even weirder is that if I open vim with no settings or mappings, and call
:inoremap <C-j> <Down>
it works perfectly fine. But when I call
it goes back to adding tabs.
What's causing this? It doesn't make any sense to me that it behaves differently if called from within vim vs sourced from my vimrc. If it makes any difference, I', using gvim on windows 7.