]> code.delx.au - gnu-emacs-elpa/blob - README.md
9a0909aa349eda2b04e9f3eca207145cf1fc6961
[gnu-emacs-elpa] / README.md
1 About
2 =====
3
4 `diff-hl-mode` provides IDE-like highlighting of `vc-diff` results on the left
5 fringe of the current buffer.
6
7 Additionally, it defines and binds `diff-hl-diff-goto-hunk` and
8 `diff-hl-revert-hunk`, to `C-x v =` and `C-x v n` respectively.
9
10 Since it uses the corresponding VC diff command, it's only accurate when the
11 buffer is in saved state.
12
13 Tested with Git, Mercurial, and Bazaar. May work with other VC backends, too.
14
15 Usage
16 =====
17
18 Ensure diff-hl.el is in a directory on your load-path, and add the following to
19 your `~/.emacs` or `~/.emacs.d/init.el`
20
21 (require 'diff-hl)
22
23 and, to use it in all buffers
24
25 (global-diff-hl-mode)
26
27 or, for example, to use it in all `prog-mode` buffers
28
29 (add-hook 'prog-mode-hook 'turn-on-diff-hl-mode)