undotree
The undo history visualizer for VIM
A Vim plugin that shows your full edit history as a visual branching tree, so you can jump to any past version of your file, not just undo in a straight line.
Undotree is a plugin for Vim, a text editor used heavily by developers, that visualizes how your edit history is structured. Most editors store undo history as a straight line: you can go back and forward through changes in order. Vim works differently. It stores every change as a branching tree, so if you undo back to an earlier point and then make a new edit, you do not lose the version you just moved away from. Undotree draws that tree in a side panel so you can see the shape of your history and jump to any point in it.
The panel shows each change with a sequence number and a timestamp. Markers indicate which state you are currently on, which one would be restored if you pressed redo, which is the most recent change, and which states were present when you last saved the file. Pressing the question mark key inside the panel shows a quick reference of navigation keys.
The plugin does not write anything to disk on its own and does not risk data loss. Moving through the undo tree modifies the open file buffer temporarily, the same way autocomplete suggestions do, and any state you visit can be visited or left without consequences.
The README also explains Vim's built-in persistent undo feature, which is separate from this plugin but often used alongside it. Persistent undo lets Vim save the undo tree to a file so your history survives closing and reopening a session. The README includes a configuration snippet for storing those undo files in a dedicated folder.
Installing undotree follows the standard pattern for Vim plugins and works with common plugin managers like Vim-Plug or Vundle, or with Vim's built-in package system. The plugin is written entirely in Vim Script, licensed under BSD.
Where it fits
- View and navigate your full branching undo history in Vim from a side panel without losing any edits
- Jump back to a version from an hour ago without losing other changes you made since
- See at a glance which states existed when you last saved the file using visual markers