News for hackers. Stuff that matters.
Re:Gundo.vim - An undo tree visualization plugin for Vim by stevelosh on Tuesday October 19, 2010 @09:25AM (#1807017)
About a month ago I wrote[1] that I wanted something like this. I got tired of waiting, so I put it together myself.

[1]: http://stevelosh.com/blog/2010/09/coming-home-to-vim/#gundo

Re:Gundo.vim - An undo tree visualization plugin for Vim by akkartik on Tuesday October 19, 2010 @12:15PM (#1807618)
BTW, I see you want vertical splits by default, just like me. Some of us on the vim list have been working on a new option called splitvertical that would open splits vertically by default (You'd use :horizontal to override). I'd love to have you try out the patch and send bug reports (it's been my production editor for a few weeks).

https://groups.google.com/group/vim_dev/msg/679fee5026967b82

Re:Gundo.vim - An undo tree visualization plugin for Vim by kilowatt on Tuesday October 19, 2010 @01:14PM (#1807866)
Real question: why is this really necessary? Creating a vertical split quickly is something I do often, all day, with ctrl-w v.
Re:Gundo.vim - An undo tree visualization plugin for Vim by icco on Tuesday October 19, 2010 @01:41PM (#1807967)
Because plugins usually open split buffers that are horizontal by default.
Re:Gundo.vim - An undo tree visualization plugin for Vim by akkartik on Tuesday October 19, 2010 @01:45PM (#1807982)
There's a bunch of different commands in vim that open new split windows. :help, :diffsplit, C-], and so on. I'd rather specify my split policy once rather than remember to type :vert or C-w v everytime. (I only found out about C-w v and C-w s after reading OP, so that exacerbated the problem.)

Imagine new plugins that split windows to open tree explorers or previews or whatnot. I'd like splits they create to automatically adopt my policy.

Re:Gundo.vim - An undo tree visualization plugin for Vim by kgroll on Tuesday October 19, 2010 @01:13PM (#1807860)
Thanks a lot Steve, this will definitely come in handy.

Quick question - It looks like this requires python support for vim. What would happen if I didn't have python compiled in, and then tried to use this plugin?

(You can check for yourself with :version)

Re:Gundo.vim - An undo tree visualization plugin for Vim by stevelosh on Tuesday October 19, 2010 @01:15PM (#1807869)
Everything explodes. It's on my list of things to fix: http://bitbucket.org/sjl/gundo.vim/issue/6/errors-on-startup...
Re:Gundo.vim - An undo tree visualization plugin for Vim by CountHackulus on Tuesday October 19, 2010 @03:34PM (#1808407)
This is great, but would be even better with Git integration. To have a visual representation in vim of my git branches would be glorious.
Re:Gundo.vim - An undo tree visualization plugin for Vim by Afton on Tuesday October 19, 2010 @05:37PM (#1808887)
This is an idea that I've had in the back of my head for a few years. Tying the undo stack to source control so that you can trivially walk up and down versions extending far into the past. No more "Already at oldest change" messages. I've never got much past "I should do that someday" though.
Re:Gundo.vim - An undo tree visualization plugin for Vim by elbenshira on Tuesday October 19, 2010 @03:21PM (#1808365)
When I try using this, my macvim blows up: http://img714.imageshack.us/img714/147/screenshot20101019at2...

Any ideas?

Re:Gundo.vim - An undo tree visualization plugin for Vim by stevelosh on Tuesday October 19, 2010 @03:46PM (#1808445)
Looks like you have an older version of Vim. Gundo requires 7.3's new undotree() function. MacVim definitely has a snapshot with 7.3, so grabbing that should fix things.
Re:Gundo.vim - An undo tree visualization plugin for Vim by chrisbra on Tuesday October 19, 2010 @01:12PM (#1807858)
There was already the histwin plugin available. (http://www.vim.org/scripts/script.php?script_id=2932)
Re:Gundo.vim - An undo tree visualization plugin for Vim by stevelosh on Tuesday October 19, 2010 @01:16PM (#1807874)
Yep, Gundo is inspired by histwin. I got the "playback" idea from it.

Histwin only seems to show the "leaves" of the undo tree, much like :undolist. For visual people like me I just can't grok that as well as seeing it all drawn out.

Re:Gundo.vim - An undo tree visualization plugin for Vim by JeffJenkins on Tuesday October 19, 2010 @11:51AM (#1807522)
Does vim have the undo tree built in, or this this plugin also providing that functionality? I've never seen an editor which represented the history as a tree instead of a line.
Re:Gundo.vim - An undo tree visualization plugin for Vim by kgroll on Tuesday October 19, 2010 @12:00PM (#1807550)
The tree is built in. There's a really good explanation (with "pictures") of the tree behavior detailed here: http://vimdoc.sourceforge.net/htmldoc/usr_32.html
Re:Gundo.vim - An undo tree visualization plugin for Vim by akkartik on Tuesday October 19, 2010 @12:17PM (#1807630)
Emacs has this too; http://www.emacswiki.org/emacs/UndoTree refers to a builtin variant.

Signed, a vim user

Re:Gundo.vim - An undo tree visualization plugin for Vim by uggedal on Tuesday October 19, 2010 @12:00PM (#1807553)
Vim does support undo branches/trees internally: http://vimdoc.sourceforge.net/htmldoc/undo.html#undo-branche...
Re:Gundo.vim - An undo tree visualization plugin for Vim by sgk284 on Tuesday October 19, 2010 @11:58AM (#1807546)
Built in. You can walk the tree or just tell vim to put you back to how the document was at a certain time. (i.e. Put the document how it was 1 minute and 20 seconds ago)

If you dont't know vim, I highly recommend learning it. (or emacs, both are great)

Re:Gundo.vim - An undo tree visualization plugin for Vim by sp4rki on Tuesday October 19, 2010 @11:49AM (#1807518)
Funny I was thinking about the same thing yesterday. But alas I decided I'd rather sleep than make it myself so kudos and thanks a bunch, it's probably a really helpful plugin.