Wednesday, February 15, 2012

Re: Gundo auto-update

Claus Atzenbeck, Wed 2012-02-15 @ 16:16:08+0100:
> I use :GundoToggle to display the undo tree. Does someone know how I
> can make Gundo to auto-update its undo tree (if existing) after each
> new undo change being created?

I believe that Gundo can only update its displayed tree when you open
the window, so if you are leaving it open all the time, it won't update.

You can, however add this in you .vimrc:

let g:gundo_close_on_revert = 1

which will cause the Gundo window to automatically close after you
select an "undo state" to revert to. Then just open the window when you
need it, instead of leaving it open all the time, and it will stay
up-to-date.

I don't think there's any way to do exactly what you're asking for; the
plugin just doesn't work that way. You could contact the author (Steve
Losh) to see about adding that feature if it's important to you.

No comments: