Vim Tips

Turn Off Colors | Improved Navigation |

Multiple undos is perhaps the sole vim feature I like over historical versions of vi, and with many vendors shipping vim by default, there are many productivity hampering options to disable in vim.

Turn Off Colors

Certain vendors infest vim with unreadable colors, such as dark blue on black. Disable this in the ~/.vimrc file:

set syntax=no
if version >= 600
syntax off
set nohlsearch

See also howto disable colors in various other software. Recent versions of vim also auto-blinky-horrid-cyan-on-everything-that-balances as one navigates the file; this lowers the visibility of the cursor, and distracts one from the task at hand. Disable this annoyance via the following line, and use % if investigating braces for balance.

let loaded_matchparen = 1

Improved Navigation

Turn off the arrow keys. Using these wastes time, as a hand must leave the home row. Memorize hjkl. These do not take long to master, especially after preventing the bad habit of using the arrow keys. Stone Soup in vi-keys mode is another way to train these keys to motor memory.

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