Hacker News new | ask | show | jobs
by bch 2 hours ago
> For me, it'd be primarily having more than one undo

Do you mean infinite undo? nvi has that. I'm not sure what you mean "set up as a tree" wrt undo, but i'll look into it. I think of nvi's undo as linear - I can 'u' to "undo" and implicitly set my "undo direction" "backward in time" (as one would expect). If I want to "undo, even more", '.' (dot, period) to "do that last command again" is what I'll do. If I want to "undo an undo", 'u'. That has the effect of moving the "undo direction" back towards the state of the buffer we had at the beginning of our discussion here.

...and, now I see your edit ;)

^[u..........:wq

1 comments

> I'm not sure what you mean "set up as a tree" wrt undo

:h undo-branches

There's also a plugin to show a visualization of the tree, but the tree is implemented within vim.

https://github.com/mbbill/undotree

Nice. I like it. Advanced history mgmt in between commits is compelling.