2013-03-04

vim - improving vim skill by breaking arrow keys

Improving vim skill have a new way, "breaking" the arrow keys on the keyboard.

No No, not literally! Just disable them by assigning "no operation" to the arrow keys stroke. This will render your arrow keys useless when you're inside vim editor, thus forcing you to stick to h, j, k & l key to move around.



Put these into ~/.vimrc:
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>

If this is not dramatic enough, I foresee I'll put these in as well:
noremap h <NOP>
noremap j <NOP>
noremap k <NOP>
noremap l <NOP>

further forcing myself to use keys like "w", "b", "e", "ge", "W", "B", "E", "gE", "f", "F", "t", "T", ";" & ",". To decrypt those characters, check out ":help word" in vim editor.

Via here then here.

Adios!

1 comment:

smartcoding said...

Perfect! Applied:)