Found a couple handy VIM tricks on the www.vim-fu.com site.
I haven’t posted a trick in a while, so here’s a good one to know.
Ever start working on a file in command mode and then hit the caps key without realizing it. Wham! All sorts of un-expected things can happen before you know it. What do you do then? You could use q! to exit without saving, then start over, but there is a more graceful way now.
This will rollback ALL changes to the edited file without having to exit VIM.
This is a cool interface to VIM’s undo/redo list:
Add line numbers I often find it helpful to have line numbers when editing.