Vim Tips Wiki
Advertisement
Tip 1300 Printable Monobook Previous Next

created August 10, 2006 · complexity basic · author Markus Trenkwalder · version 5.7


Sometimes you may wonder what was changed in the current file. Use the :changes command to list all recent changes to the current file. Type g; to step back to the position of previous changes in the changelist. Type g, to step to the position of the next change.

This is part of Vim 7's undo-branching; the functionality lets you make some changes, undo some of them, make different changes, and then have both trees of changes maintained, allowing you to go back and forth between different branches of changes.

If you have ' in your 'viminfo' option, your changelist is even saved between edits, meaning that you can close the file and see changes you have made whenever you open it again!

References

Comments

Advertisement