Vim undo tree visualization

I wrote previously about an awsome plugin to give Emacs Vim-style undo trees.

Vim's undo trees are the best thing since sliced bread, but the interface for browsing through the tree is not pleasant. The Emacs undo-tree library has a way to visualize the tree and move through it with your keyboard, which solves this problem.

But now, thanks to Steve Losh, Vim has an undo-tree visualizer too. Delicious. Though it's still beta and promises to eat your babies, it seems to work pretty well. I think the diff view of the changes for the undo is a really good idea.

Thus continues the eternal Vim/Emacs arms race.

Vim undo tree

October 18, 2010 @ 8:21 AM PDT
Cateogory: Programming
Tags: Emacs, Vim, Undo

13 Comments

Necoro
Quoth Necoro on October 18, 2010 @ 8:54 PM PDT

Thanks for mentioning this nice plugin. Now all I am looking for to make the undo feature really useful, is some kind of merging.

For example, I changed lines A and B and later discover that I want to revert line A to some earlier state. But, as I changed line B in-between, this will also revert line B. Now what I'm looking for is the ability to redo exactly the changes x and y to get my line B back :) without all the changes on the line.

Dion Moult
Quoth Dion Moult on October 19, 2010 @ 12:04 AM PDT

Oooh, any plans for this to become integrated or will it stay a plugin?

Michał Lipski
Quoth Michał Lipski on October 19, 2010 @ 12:54 AM PDT

Hello, what kind of font do you use in terminal?

Lucas
Quoth Lucas on October 19, 2010 @ 6:31 AM PDT

really nice font indeed :)

Brian
Quoth Brian on October 19, 2010 @ 7:32 AM PDT

It's not a terminal, it's gvim. The font is Consolas 12.

Necoro: That sounds complicated. I think there comes a point where it's less thinking and less typing to re-type what you want rather than use the undo system. An editor's undo feature isn't a full-fledged VCS.

Dion Moult: You'd have to ask the author of the plugin. But I'd be surprised if this was integrated. Vim core seems to try to stay lean.

Eric
Quoth Eric on October 19, 2010 @ 1:58 PM PDT

That could be useful, VIM is neat.

Steve Losh
Quoth Steve Losh on October 20, 2010 @ 6:38 AM PDT

@Necoro: I don't think I'll be adding true "merging" because Vim doesn't have a way to record where merges happened, but cherry-picking single changes (or multiple visually selected ones) is definitely on the list.

@Dion Moult: No. The bulk of it is in Python and would need to be ported, plus it's a fairly heavyweight, esoteric feature. I'd be very surprised if it happened.

Eduardo.
Quoth Eduardo. on November 07, 2010 @ 10:19 PM PST

Hey mate, things have been going slowly lately it seems. Hope everything's fine and you've not given up blogging!

Brian
Quoth Brian on November 08, 2010 @ 4:31 AM PST

Yeah I've just been busy with work etc. I'm glad someone cares. I have some things to blog about, just waiting for time to write it up.

Craig Capron
Quoth Craig Capron on December 27, 2010 @ 1:00 AM PST

I will add another voice to those missing your posts. I really enjoy your blog, but I certainly understand the "busy with work" stuff. Best wishes for the new year!

Sergio Luiz Araújo Silva
Quoth Sergio Luiz Araújo Silva on March 05, 2011 @ 7:32 PM PST

Has an screencast[1] @vimcasts about gundo

1 - http://vimcasts.org/episodes/undo-branching-and-gundo-vim/

Ruben Berenguel @mostlymaths.net
Quoth Ruben Berenguel @mostlymaths.net on April 18, 2011 @ 12:03 AM PDT

Neat. I like that vim gets more emacs-like ;)

As for undo-tree, it is very good for managing local changes, give it a try emacsers out there!

Cheers,

Ruben

chumsley
Quoth chumsley on January 02, 2012 @ 2:17 AM PST

@Necoro

Emacs has `undo-in-region', which sounds like it might be close to the behaviour that you want (and which the emacs undo-tree implementation supports). I'm not sure if there's a vim equivalent or not.

Speak your Mind

You can use Markdown in your comment.
Email/URL are optional. Email is only used for Gravatar.

Preview