]> code.delx.au - gnu-emacs-elpa/blob - README.md
Update diff-hl-flydiff/vc-git-mode-line-string as per Emacs master
[gnu-emacs-elpa] / README.md
1 About
2 =====
3
4 `diff-hl-mode` highlights uncommitted changes on the left side 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 Commentary section
8 inside the file.
9
10 Tested with Git, Mercurial, Bazaar and SVN. May work with other VC backends, too.
11
12 The package also contains auxiliary modes:
13
14 * `diff-hl-dired-mode` provides similar functionality in Dired.
15 * `diff-hl-margin-mode` changes the highlighting function to
16 use the margin instead of the fringe.
17 * `diff-hl-amend-mode` shifts the reference revision back by one.
18 * `diff-hl-flydiff-mode` enables diffing unsaved changes
19
20 Check out the Commentary section in each respective file for the usage
21 instructions.
22
23 Screenshots
24 =====
25
26 diff-hl-mode
27 -----
28 Top window: a buffer in this minor mode, bottom window: the corresponding diff.
29
30 ![screenie](screenshot.png)
31
32 diff-hl-dired-mode
33 -----
34
35 ![screenie](screenshot-dired.png)
36
37 diff-hl-margin-mode
38 -----
39
40 ![screenie](screenshot-margin.png)
41
42 Requirements
43 =====
44
45 Emacs 24+. On OS X, Emacs 24.3 or higher is recommended.
46
47 Notes
48 =====
49
50 * We conflict with other modes when they put indicators on the fringe,
51 such as [Flycheck](https://github.com/flycheck/flycheck). This is
52 rarely a significant problem, since if you're using such a mode,
53 you'd usually want to fix all errors and warnings before continuing,
54 and then the conflicting indicators go away.
55
56 * There's no fringe when Emacs is running in the console, but the navigation
57 and revert commands still work. Consider turning `diff-hl-margin-mode` on,
58 to show the indicators in the margin instead.
59
60 * Frame-local and buffer-local values of `line-spacing` are not supported.
61
62 * Fringe width up to 16 works best (because we can't define a bitmap
63 with width above that number).
64
65 * [emacs-git-gutter](https://github.com/syohex/emacs-git-gutter) shows
66 indicators in the margin by default, allows you to customize how the
67 indicators look more easily, and has a "stage hunk" command.
68
69 Integration
70 =====
71
72 If you're using some package other than `vc` to commit changes, it might
73 not run `vc-checkin-hook` after commits. In that case, you'll need to
74 either add `diff-hl-update` to the hook it does run, or advise some
75 function that's called in the buffer after its state has changed.
76
77 psvn
78 -----
79
80 ```lisp
81 (defadvice svn-status-update-modeline (after svn-update-diff-hl activate)
82 (diff-hl-update))
83 ```
84
85 Magit
86 -----
87
88 If you have a recent enough version installed, it defines
89 `magit-revert-buffer-hook` (or `magit-not-reverted-hook`), which we use.