The Complete Computer

Emacs Undo and Redo with a tree

LifeTechEmacsArcology
emacs-lisp source: 
(provide 'cce/undo-tree)

Undo Tree is a neat visualization and navigation Emacs Tool for walking through a tree history.

#+BEGINsrc emacs-lisp (use-package undo-tree :after evil :config (global-undo-tree-mode 1) :custom (undo-tree-enable-undo-in-region t) (evil-undo-system 'undo-tree) :diminish) #+ENDSRC

If I make a mistake, I can visually navigate the history of the work by hitting C-x u, and navigating the history of the document visually. This is a feature that I don't use often, but it's super useful when I do. More concretely, this package provides a useful and reliable redo which it binds to M-_, a sister-key binding to C-_, and it's also used by Evil Mode Evil Mode's undo key u and C-r for redo. C-x u will show the history tree for exploration.

It's simple and having it around is cheap and easy.

file:data/11/b9070e-f1ab-44b5-a204-9662cc146ace/undo-tree.png file:data/11/b9070e-f1ab-44b5-a204-9662cc146ace/undo-tree.png

Screenshots