Re: Wish: Vim remembered my previous changes (so that I could und o them)
- On Fri, May 30, 2003 at 11:39:30PM +0200, Bram Moolenaar wrote:
> I'm interested as well. The implementation is one thing (esp. checkingWhat do you mean by this one? The first way I read this is
> that the original file didn't change, otherwise you end up with
> garbage). The user interface is another. There probably should be
> command to undo/redo up to a point where the file was saved.
unrelated to saving the undo buffer: you save, you edit, and you hit
a key to take you back through the undo list to the point of the
save. Actually, I would like this feature. I would also like a key
to go to the ends of the undo buffer--I often do 1000u to get back
to where I started--then look around _very carefully_ so I don't
accidentally edit anything--then 1000^R. Now that I think about it,
a way to set marks in the undo list would be nice ...
> Or "undoI would love it.
> for 10 days"... And "delete undo info older than a week"...
> remember multiple change branches. Storing the info isn't difficult atI remember this from the vim 6 idea vote, and I've always thought it
> all (just a few extra pointers). The big question is how the user could
> navigate through the branches. Try thinking of a nice solution for
would be cool--but I also didn't have any clue about the interface.
However, writing this message gives me an idea: What about marks in
the undo list--er, tree? So I make some changes, have second
thoughts, set an undo mark, undo my way back to a starting point,
and make some more changes. If I jump to the undo mark, I get back
to my first changes, and can undo and redo just as before. Ie, u
and ^R always work linearly, but I can switch between streams. This
also controls the memory usage: if you abandon a branch without
setting any marks, vim can throw it away.
Wow, I really like this idea. I'm beginning to think this could
change the way I edit. (Just like 'hidden' did, by allowing me to
keep undo lists for every file I edit in a session. Maybe I'm just
an undo junkie.)
 Does anyone remember the point in Zork where you must "crawl
carefully"--not "crawl"--to get past some obstacle?