Backtracking your movements in a file
From Vim Tips Wiki
Tip 209 Previous Next Created: February 1, 2002 Complexity: basic Author: vim_power Version: 6.0
If you are jumping from one line to another a lot, you may find the "Ctrl-O" command handy.
Usually you can set markers in a buffer to keep track of your movements.
But Ctrl-O makes it even easier. it takes you back sequentially to all your previous cursor locations in a buffer.
Just press ctrl-O in normal mode and you will go to your last cursor position.
Similarly Ctrl-I goes in the reverse order. Ctrl-I is also as useful as Ctrl-O.
[edit] Comments
type m<char> bookmarks the current position. Type '<char> to return to that position.
Of course you can see the jump list with :jump, and set markers to allow one to jump between files (not just within a buffer) with '[A-Z], but this is tip is great because it just follows your history. Wonderful!
