Switching to Vim #1 – Start at the beginning

The most helpful tip I read after deciding to use Vim exclusively was initially a massive PITA. Disable the arrow keys. If you really do want to learn Vim properly, do this.

Throw off the chains of “convenience” by adding the following to your ~/.vimrc file:

" disable arrow keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>

Using the arrow keys in Vim is a crutch that will hold you back. Not being able to employ them to derp around your files will force you to learn some of Vim’s movement commands, like w (forward one word) and b (back one word). Movement commands make up a large part of Vim’s grammar. Try to incorporate at least one new movement command into your common use every few days.

There are many lists of these commands. Here is a good one: Vim movement commands.

No comments | Trackback