Emacs has this too, with ‘undo-tree-mode’.
(Incidentally, the documentation is wonderful: ‘The only downside to this more advanced yet simpler undo system is that it was inspired by Vim. But, after all, most successful religions steal the best ideas from their competitors!’)
I haven’t been using Emacs for a long time now, but isn’t the Emacs way better? With undo tree you don’t lose any history, but the same is true for what Emacs does by default and it is much easier to navigate the history, since every change is part of a linear history and undos and redos also get added to it.
I had occasional problems with undo-tree (the tree broke occasionally), I've been using vundo for a while now and I'm a lot more happy with that.
Re:Undo in Vi and Its Successors
by nesarkvechnep on Tuesday February 17, 2026 @10:53AM
(#47048858)
The mark and diff functionality is great too.
Another day, another great Emacs package I’ve just learned about. This one’s going in the init.el for sure!
Strange, I love GNU screen, and find the key combinations very easy and intuitive. However, I could never seem to master GNU's Emacs and what I find are very strange default key commands. I love vim for the reason of, what I personally find, very intuitive key combinations.
I just downloaded VSCode for the first time recently -- which I was delighted to find has a VIM mode. From what I read VSCode's VIM mode does not respect the undo tree of actual VIM.
A good number of Emacs users work with Vim key bindings. evil-mode is very good. I use Doom Emacs, which uses evil-mode by default.
fun fact: sublime text also has a vim mode (called "Vintage mode" which is just hilarious) that is built-in but disabled by default, rather than an extension like in vscode. vim keybinds are just the best.
Re:Undo in Vi and Its Successors
by nothrabannosir on Tuesday February 17, 2026 @09:35AM
(#47047927)
undo-tree-visualize is easily one of the biggest wow factors for unfamiliar users. Cannot unsee, cannot go back.
I use undo-tree plugin to use this in a nicer way. It's such a gem!
Re:Undo in Vi and Its Successors
by sodapopcan on Tuesday February 17, 2026 @09:21AM
(#47047765)
I figured that this was what this article was going to be about.
Re:Undo in Vi and Its Successors
by embedding-shape on Tuesday February 17, 2026 @10:44AM
(#47048750)
I thought so too, it's a part I've always struggled with effectively using, cause I get lost so quickly so was happy for a moment. But then reading the comments first, I got disappointed before I even had a chance to open the article.
Re:Undo in Vi and Its Successors
by sodapopcan on Tuesday February 17, 2026 @01:20PM
(#47050950)
I find it impossible to use without a plugin. I use https://github.com/mbbill/undotree and map it to `U` since I realized I never use `U` and it's easy to remember. https://github.com/sjl/gundo.vim/ is also popular but I like that the former is in pure vimscript (and the interface is a lil' better IMO).
Re:Undo in Vi and Its Successors
by boltzmann64 on Tuesday February 17, 2026 @09:21AM
(#47047761)
If you are going to need this, then you should use git instead of relying on the editor's undo tree.
You could if you remembered to make commits between every small, low value text edit. :P
Meanwhile the undo/redo tree is always there, ready to use and has no overhead. You can ignore it completely until you need it to save your arse.
Re:Undo in Vi and Its Successors
by sodapopcan on Tuesday February 17, 2026 @09:24AM
(#47047803)
They are both useful. I'm a frequent committer but find myself using this, I wanna say, 0 - 3 times per month. It's one of those things that when you want it, you're really glad it exists.
Undo is something that's extremely useful after the fact - commits can accomplish the same end if you're fastidious about continuously committing but fall short if you only realize your need after you've made the edit.
Re:Undo in Vi and Its Successors
by Waterluvian on Tuesday February 17, 2026 @09:27AM
(#47047842)
Consider this capability being used over the span of seconds as just another text editing tool. It would be like saying we don’t need undo/redo at all, just use git.
The practical usage is it's aways possible to get back to a previous state you were in, which is pretty neat.
e.g. You can undo 5 changes, try something else and decide that you prefered the text before you started undoing things. In most programs with a linear undo history you've wiped out your previous changes but not in Vim.
You can hop about the branches of the undo tree using the g+ and g- commands but it's much easier to add an undo tree visualiser plugin such as the venerable old Gundo[2].
1. https://neovim.io/doc/user/undo.html
2. https://docs.stevelosh.com/gundo.vim/