]> code.delx.au - gnu-emacs-elpa/blob - README.md
Scale to non-default fringe sizes better
[gnu-emacs-elpa] / README.md
1 About
2 =====
3
4 `diff-hl-mode` highlights uncommitted changes on the left fringe of the window,
5 allows you to jump between and revert them selectively.
6
7 For the usage instructions and the list of commands, see the header comment.
8
9 Tested with Git, Mercurial, Bazaar and SVN. May work with other VC backends, too.
10
11 Screenshot
12 =====
13
14 ![screenie](screenshot.png)
15
16 Top window: a buffer in this minor mode, bottom window: the corresponding diff.
17
18 Requirements
19 =====
20
21 Emacs 24+. On OS X, Emacs 24.3 or higher is recommended.
22
23 Notes
24 =====
25
26 * Since it uses the corresponding VC diff command, it's only accurate when the
27 buffer is in saved state. Highlighting changes "on the fly" might be better,
28 maybe we can do something similar to `highlight-markup-buffers` with a hidden
29 buffer containing the unmodified copy.
30
31 * There's no fringe when Emacs is running in the console, but the navigation and
32 revert commands still work.
33
34 * Frame-local and buffer-local values of `line-spacing` are not supported.
35
36 * [git-gutter](https://github.com/syohex/emacs-git-gutter) provides interactive
37 commands to show/hide/toggle margin indicators for the same information, and
38 allows you to customize how the indicators look.
39
40 Integration
41 =====
42
43 If you're using some package other than `vc` to commit changes, it might
44 not run `vc-checkin-hook` after commits. In that case, you'll need to
45 either add `diff-hl-update` to the hook it does run, or advise some
46 function that's called in the buffer after its state has changed.
47
48 psvn
49 -----
50
51 ```lisp
52 (defadvice svn-status-update-modeline (after svn-update-diff-hl activate)
53 (diff-hl-update))
54 ```