vim tricks

The super star and sharp
In normal mode you can use * and # to search for a word under the cursor.
* searches forward for the word, while # searches backwards.

Simple completion in any text
Hit CTRL-N once in insert mode and it will try to complete the current word with the first match in the current file. CTRL-P does the same thing but searches backwards.

The .
Type . in normal mode to repeat last change, this is super useful when doing receptive changes.

The % key
You can use the % key to jump to a matching opening or closing parenthesis, square bracket or a curly brace. Insanely useful when programming.

Indent using == and =
When working with source code it is very nice to work with indented code.
To indent the current line issue == in normal mode. Use Shift-V to go into visual mode, select a couple of lines and do = to indent them.

Undo and redo
You can use u to undo the last change. CTRL-R redoes a change that has been undone. U returns the current line to its original state.
You can use g- or g+ to go between text-states. To go to a text state 1 minute earlier, you can use:
eariler 1m