4 ms·
And it is exactly why I find Emacs undo so hard to work with. But maybe I will get it now I've read this article.
by gpvos 4y ago
And it is exactly why I find Emacs undo so hard to work with. But maybe I will get it now I've read this article.
- tmtvl 4y agoYou can, if you like, install the 'vundo' package, which gives you a tree-based overview of your undo history, making it easy to switch between branches and go backward and forward. It's basically like the undo-tree view for the default undo mechanism.
- b3morales 4y agoTwo suggestions that might make it easier for you. There's a package called `undo-fu` that puts a thin layer on top of the undo system to keep the behavior strictly linear. And built in, there are the `undo-only` and `undo-redo` commands. Unlike the base `undo` they will only walk in one direction.
- BeetleB 4y agoNote that Emacs undo is not tree based, but works as described in the article. The tree based undo is a separate package one has to install.
- gpvos 4y agoAs I wrote.
- jonathannerat 4y agoSee `:h undo-persistance` for that feature. In particular you want to do `set undofile` in your vim config
- gpvos 4y agoI'm not sure how you deduced that I'm actually a vi user, but it's interesting to see that vim has similar support but using separate linear undo and redo commands g- and g+ . undo-persistance and undofile seem to be orthogonal to that though, I'm even less sure why you're bringing that up.