The Change List


Similar to the jump list discussed previously, Vim additionally maintains lists of changes made to each buffer, which can provide a convenient vehicle for navigating.

Lets walk through an example of how to use it, starting from the following buffer:

Initial Conditions
1.·Beautiful·is·better·than·ugly.
2.·Explicit·is·better·than·implicit.
3.·Simple·is·better·than·complex.
4.·Complex·is·better·than·complicated.
NORMALTop1:1
 

Lets first make a few changes by deleting a word from each line:

Edit line 13fudw
1.·Beautiful·is·better·than·. 
2.·Explicit·is·better·than·implicit.
3.·Simple·is·better·than·complex.
4.·Complex·is·better·than·complicated.
NORMALTop1:29
 
Edit line 2j2bdw
1.·Beautiful·is·better·than·. 
2.·Explicit·is·better·implicit.
3.·Simple·is·better·than·complex.
4.·Complex·is·better·than·complicated.
NORMAL40%2:23
 
Edit line 3j2bdw
1.·Beautiful·is·better·than·.
2.·Explicit·is·better·implicit.
3.·Simple·is·than·complex.
4.·Complex·is·better·than·complicated.
NORMAL60%3:14
 
Edit line 4 and move the cursorj2bdwgg
1.·Beautiful·is·better·than·.
2.·Explicit·is·better·implicit.
3.·Simple·is·than·complex.
4.·is·better·than·complicated.
NORMALTop1:4
 

Now, lets view the change list for this buffer by executing the :changes command.

View the change list
1.·Beautiful·is·better·than·.
2.·Explicit·is·better·implicit.
3.·Simple·is·than·complex.
4.·is·better·than·complicated.
NORMALTop1:4
 
:changeschange line  col text    4     1   28 1. Beautiful is better than .    3     2   22 2. Explicit is better implicit.    2     3   13 3. Simple is than complex.    1     4    3 4. is better than complicated.>

Each change is assigned a number in the left-most column, then the line number and column of each change. To provide a hint about which change this is, the list includes the text contained in the line. Finally, the change list indicates the current position in the list with a ">". We are currently located at the bottom of the list.