How to disable arrow keys in Vim

Vim experts keep chanting that to really learn and love Vim, one must use the insert mode for the tiniest period of time and get out of it as soon as possible. However, this is a difficult skill to learn. This is because one can easily navigate in all directions in both insert and normal mode using the arrow keys.

So, one has to be forced to navigate using only hjkl keys. These keys cannot be used in insert mode, so one is forced to quit insert mode as soon as possible and learn other tricks to repeat edits.

Steve Losh recommends disabling the arrow keys for learning this skill. I was initially skeptical, but it worked extremely well for me within just 2 days!

To disable the arrow keys, add this to your vimrc:

Tried with: Vim 7.3 and Ubuntu 12.04 LTS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.