by jdc0589 · 8y ago · 0 comments
I don't have a problem using hjkl, I guess my problem is NOT needing to move around inside insert mode. Tips?
Ctrl-O <command>
to issue single normal mode commands from insert mode. Most purists would say switch to normal mode to navigate, and by and large that's true (especially, IMHO, if you bind 'jk' to Esc which is much faster for a touch typist). However, insert mode does let you do this to avoid the arrow keys: inoremap <A-h> <Left>
inoremap <A-l> <Right>
inoremap <A-k> <Up>
inoremap <A-j> <Down>
Which some would say enforces 'bad' habits, but I reckon do whatever feels effective to you. If you do find yourself leaning on the direction keys for more than a few repeats, there's probably a faster way though!But you can also use ctrl+o [movement command] while in insert mode to do one-off movements and end up back in insert afterwards.
I honestly don't think however that you betray any vim sacred cows by using the arrow keys, or even the mouse when they are convenient. Such as when in insert mode.
hjkl is just much more convenient in normal mode while your hands are already in the right position.
iThe default mode is called "normal mode" for a reason.ESC:wq