tags:

views:

123

answers:

2

I'm aware of `. command that goes to last edited line. Is there a way to go further in the editing history? I often accidentally insert something while browsing the file, undo, but then `. will not bring me where i want anymore.

+6  A: 

Try g; and g,. They jump backward and forward in the changelist.

See :help changelist for more details.

Randy Morris
A: 

I use CTRL-O and CTRL-I to jump back and forth between recent points in files. It also goes through certain motion commands, but I find it usually takes me back to where I was editing.

jleedev
These commands move through the 'jumplist' (`:help jumplist`), whereas `g;` and `g,` scroll through the 'changelist'.
nelstrom