Vim: undo

u - undo
U - Reverses changes to current line (not a real Undo), U can produce some very strange results and is not recommended for complex edits
Ctrl+r - redo
. - repeat last action
g+ or g- - steps you toward or backward through changes
:earlier 20 - takes you back 20 changes
:earlier 20m - takes you back 20 minutes
:later 30 - go forward 30 changes
:later 30m - go forward 30m from the current point