4 ms·
> I don't know anything so compelling about it For me, it'd be primarily having more than one undo. Not being able to undo the second-to-last change is pretty
by jolmg 4mo ago
> I don't know anything so compelling about it
For me, it'd be primarily having more than one undo. Not being able to undo the second-to-last change is pretty bad. In fact, vim's undo being set up as a tree that can be walked with g- and g+ is excellent. It's impossible to lose a state of the buffer, even if you undo and make changes. It's a lot more practical to navigate than Emacs' undo, too.
EDIT: I just realized that nvi can undo more than one change by having u toggle the direction and . continue in that direction. I don't think ex-vi could. busybox vi seems like it can undo multiple with u but it seems to have no redo.
- bch 4mo 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
- jolmg 4mo ago> 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 https://github.com/mbbill/undotree
- bch 4mo agoNice. I like it. Advanced history mgmt in between commits is compelling.
- emil-lp 4mo ago> It's a lot more practical to navigate than Emacs' undo, too. What the heck are you talking about? Emacs undo is simply the State monad over a zipper into a persistent tree of buffer states. I can't see how you could make it more practical?
- deleted 4mo ago[deleted]