Skip to content
krisleech edited this page Oct 27, 2011 · 1 revision

If you have only just started to use Vim you might want to turn the arrow keys on to move the cursor.

Add this to ~/.vimrc.local:

nnoremap <Left> h                
nnoremap <Right> l                                                              
nnoremap <Up> k                                                                 
nnoremap <Down> j                                                               
inoremap <up> k                                                                 
inoremap <down> j                                                               
inoremap <left> h                                                               
inoremap <right> l

WARNING: If you want to use Vim effectively you will, at some stage, have to ditch the arrow keys and use hjkl instead. The best way is to remove the above lines (to avoid temptation) and go cold turkey! If I remember rightly it took at least a few months before I was only using hjkl.