I’m having trouble with hjkl movement in insert mode.
The issue is that I have changed hjkl movement to move by display line. I have
'wrap' on. The cursor should normally move line by line, not move display line by display line.
With my vimrc, when Ctrl is pressed along with up or down movement, it should move through display line by display line, but somehow it kept inserting a space and moving through display line (especially up movement).
Yesterday, I tried with only the Ctrl + movement key in insert mode, and it worked fine, but it failed to work properly when other scripts are included. I can't figure out how to solve it.
:set wrap linebreak nolist :set showbreak=… vmap j gj vmap k gk nmap j gj nmap k gk inoremap <C-h> <Left> inoremap <C-j> <C-o>gj inoremap <C-k> <C-o>gk inoremap <C-l> <Right> cnoremap <C-h> <Left> cnoremap <C-j> <Down> cnoremap <C-k> <Up> cnoremap <C-l> <Right>