Last Updated: February 25, 2016
·
2.308K
· bendoerr

Disable arrow keys in vim

For a long time I never actually used hjkl for navigation which was OK, I wasn't jumping right in and going hardcore on vim, I was just using it here and there. But there came a point where I was ready to make the switch, however I found myself constantly reaching back to the familiar. So it was time to go cold turkey:

nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop> 

Set those in your .vimrc. The same can be done for inoremap and vnoremap. It took a week or so but it's become second nature to me now.