Love, caffeine and omlette

How to not use the arrow keys any more in vim

I try to wrap my head around the VIM editor since a few months. Unfortunately I do not have enough discipline to use h-j-k-l as my movement keys. But there is a solution that will teach me..

I found it deep inside the .vimrc of my colleague Fabian.

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

This turns off the arrow keys. A really obvious way of doing it 😉

I will add this to my .vimrc right away!

Wish me luck!


  1. sideshowcoder

    July 6, 2013 at 4:02 pm

    Next step make them do something actually useful 🙂 I set mine to window resize. We should exchange some Vim tips at rubyshift sometime 🙂

  2. Robert Curth

    July 6, 2013 at 5:57 pm

    Very cool idea - i just discovered your ~/.vimrc — Good read 😉

  3. so ? how is it going so far ? never came back ?
    I still use them some times ....

  4. Robert Curth

    January 14, 2014 at 6:15 am

    Never came back. Though this is confusing sometimes: when I work in other editors and I am tired I don't use the arrow keys 😉

Leave a Reply

Your email address will not be published.


© 2017

Theme by Anders NorenUp ↑