2010-10-18 11:03:51 -04:00
< a href = "http://flattr.com/thing/74149/Gundo-vim" target = "_blank" >
< img src = "http://api.flattr.com/button/button-compact-static-100x17.png" alt = "Flattr this" title = "Flattr this" border = "0" / > < / a >
2010-10-18 11:04:42 -04:00
Gundo.vim is Vim plugin to visualize your Vim undo tree.
Preview
-------
2010-10-18 11:03:51 -04:00
Screenshot:
< a href = "http://www.flickr.com/photos/sjl7678/5093114605/" title = "gundo by stevelosh, on Flickr" > < img src = "http://farm5.static.flickr.com/4113/5093114605_ebc46d6494.jpg" width = "487" height = "500" alt = "gundo" / > < / a >
2010-10-29 10:20:25 -04:00
Screencast:
### [http://screenr.com/M9l](http://screenr.com/M9l)
2010-10-09 12:26:18 -04:00
Requirements
------------
* Vim 7.3+
2010-10-20 18:11:03 -04:00
* Python support for Vim
* Python 2.4+
2010-10-09 12:26:18 -04:00
Installation
------------
Use [Pathogen][]. Don't use pathogen? Start.
2010-10-29 10:20:25 -04:00
hg clone http://bitbucket.org/sjl/gundo.vim ~/.vim/bundle/gundo
There's a git mirror if you prefer:
git clone http://github.com/sjl/gundo.vim.git ~/.vim/bundle/gundo
2010-10-09 12:26:18 -04:00
Add a mapping to your `~/.vimrc` (change the key to suit your taste):
nnoremap < F5 > :GundoToggle< CR >
[Pathogen]: http://www.vim.org/scripts/script.php?script_id=2332
Usage
-----
2010-10-20 18:10:00 -04:00
Run `:help gundo` for the full docs. Here's the in-a-nutshell version.
2010-10-09 12:27:34 -04:00
When you're editing a file you can bring up the undo graph for that file with
`<F5>` (or whatever key you mapped it to).
2010-10-09 12:26:18 -04:00
2010-10-09 12:27:34 -04:00
Press `<F5>` again to close the undo graph and return to your file.
2010-10-09 12:26:18 -04:00
2010-10-09 12:27:34 -04:00
Use `j` and `k` to move up and down the graph. The preview pane will update with
2010-10-09 12:26:18 -04:00
a diff of the change made by the undo state you're currently on.
Press return to revert the file's contents to that undo state and return to the
file.