config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

README.txt (4176B)


      1 Vundo is now available on ELPA!
      2 
      3 Vundo (visual undo) displays the undo history as a tree and lets you
      4 move in the tree to go back to previous buffer states. To use vundo,
      5 type M-x vundo RET in the buffer you want to undo. An undo tree buffer
      6 should pop up. To move around, type:
      7 
      8   f   to go forward
      9   b   to go backward
     10 
     11   n   to go to the node below when at a branch point
     12   p   to go to the node above
     13 
     14   a   to go back to the last branching point
     15   e   to go forward to the end/tip of the branch
     16   l   to go to the last saved node
     17   r   to go to the next saved node
     18 
     19   m   to mark the current node for diff
     20   u   to unmark the marked node
     21   d   to show a diff between the marked (or parent) and current nodes
     22 
     23   q   to quit, you can also type C-g
     24 
     25   C-c C-s (or whatever binding you used for save-buffer)
     26       to save the buffer at the current undo state
     27 
     28 n/p may need some more explanation. In the following tree, n/p can
     29 move between A and B because they share a parent (thus at a branching
     30 point), but not C and D. To make it clear, branches you can switch
     31 between are highlighted with bold face.
     32 
     33          A  C
     34     ──○━━○──○──○──○
     35       ┃  ↕︎
     36       ┗━━○──○──○
     37          B  D
     38 
     39 By default, you need to press RET to “commit” your change and return
     40 to the buffer.  If instead you quit with q or C-g, the changes made by
     41 vundo are rolled back. You can set ‘vundo-roll-back-on-quit’ to nil to
     42 disable rolling back.
     43 
     44 You might see some green nodes in the tree, those are the buffer
     45 states that have been saved to disk; the last saved node is emphasized
     46 in bold. You can type "l" to jump to the last saved node.
     47 
     48 Note: vundo.el requires Emacs 28.
     49 
     50 Customizable faces:
     51 
     52 - vundo-default
     53 - vundo-node
     54 - vundo-stem
     55 - vundo-highlight
     56 - vundo-saved
     57 - vundo-last-saved
     58 
     59 If you want to use prettier Unicode characters to draw the tree like
     60 this:
     61 
     62     ○──○──○
     63     │  └──●
     64     ├──○
     65     └──○
     66 
     67 set vundo-glyph-alist by
     68 
     69     (setq vundo-glyph-alist vundo-unicode-symbols)
     70 
     71 Your default font needs to contain these Unicode characters, otherwise
     72 they look terrible and don’t align. You can find a font that covers
     73 these characters (eg, Symbola, Unifont), and set ‘vundo-default’ face
     74 to use that font:
     75 
     76     (set-face-attribute 'vundo-default nil :family "Symbola")
     77 
     78 Diff:
     79 
     80 Vundo uses Emacs' facilities to provide diffs among arbitrary undo
     81 states: just (m)ark and (d)iff.  By default, vundo's diff window is
     82 buried when vundo quits; see `vundo-diff-quit' for other options.
     83 
     84 Terminal users may encounter unwanted control characters in the diff
     85 output.  Emacs colors diff buffers itself, so this can be remedied by
     86 instructing diff not to print color codes:
     87 
     88     (setq diff-switches "-u --color=never")
     89 
     90 Comparing to undo-tree:
     91 
     92 Vundo doesn’t need to be turned on all the time nor replace the undo
     93 commands like undo-tree does. Vundo displays the tree horizontally,
     94 whereas undo-tree displays a tree vertically.  Diff is provided
     95 on-demand between any nodes.
     96 
     97 Tests:
     98 
     99 You can run tests by loading test/vundo-test.el and M-x ert RET t RET
    100 to run those tests interactively, or use the following batch command:
    101 
    102      emacs --batch \
    103            -l vundo.el \
    104            -l test/vundo-test.el \
    105            -f ert-run-tests-batch-and-exit
    106 
    107 
    108 Changelog (full changelog in NEWS.txt):
    109 
    110 <2023-02-16 Fri>: Version 2.3.0: navigate among all saved nodes.
    111 Automatically bury the vundo-diff window when vundo quits.
    112 
    113 <2023-12-17 Sun>: Version 2.2.0: vundo-diff introduced, supporting
    114 on-demand diff to parent or any marked node.  Improved tree draw
    115 speed.
    116 
    117 <2022-04-04 Mon>: Version 1.0.0
    118 
    119 <2022-03-29 Tue>: vundo--mode and vundo--mode-map are now vundo-mode
    120 and vundo-mode-map. A new custom option vundo-compact-display is added.
    121 
    122 <2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
    123 differently now, it now draws
    124 
    125     o--o--o     instead of      o--o--o
    126     |  `--x                     |  +--*
    127     |--o                        |--o
    128     `--o                        +--o
    129 
    130 <2021-11-26 Fri>: Variable vundo-translate-alist changed to
    131 vundo-glyph-alist and has different value now.