]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/diff-hl/README.md
Add 'packages/diff-hl/' from commit '80abec80ea5c060470a34e2d2ed593f1bb9dc5eb'
[gnu-emacs-elpa] / packages / diff-hl / README.md
diff --git a/packages/diff-hl/README.md b/packages/diff-hl/README.md
new file mode 100644 (file)
index 0000000..b01e8bd
--- /dev/null
@@ -0,0 +1,83 @@
+About\r
+=====\r
+\r
+`diff-hl-mode` highlights uncommitted changes on the left side of the window,\r
+allows you to jump between and revert them selectively.\r
+\r
+For the usage instructions and the list of commands, see the Commentary section\r
+inside the file.\r
+\r
+Tested with Git, Mercurial, Bazaar and SVN. May work with other VC backends, too.\r
+\r
+The package also contains auxiliary modes:\r
+\r
+* `diff-hl-dired-mode` provides similar functionality in Dired.\r
+* `diff-hl-margin-mode` changes the highlighting function to\r
+  use the margin instead of the fringe.\r
+* `diff-hl-amend-mode` shifts the reference revision back by one.\r
+\r
+Check out the Commentary section in each respective file for the usage\r
+instructions.\r
+\r
+Screenshots\r
+=====\r
+\r
+diff-hl-mode\r
+-----\r
+Top window: a buffer in this minor mode, bottom window: the corresponding diff.\r
+\r
+![screenie](screenshot.png)\r
+\r
+diff-hl-dired-mode\r
+-----\r
+\r
+![screenie](screenshot-dired.png)\r
+\r
+diff-hl-margin-mode\r
+-----\r
+\r
+![screenie](screenshot-margin.png)\r
+\r
+Requirements\r
+=====\r
+\r
+Emacs 24+. On OS X, Emacs 24.3 or higher is recommended.\r
+\r
+Notes\r
+=====\r
+\r
+* Since it uses the corresponding VC diff command, it's only accurate when the\r
+  buffer is in saved state. Highlighting changes "on the fly" might be better,\r
+  maybe we can do something similar to `highlight-markup-buffers` with a hidden\r
+  buffer containing the unmodified copy.\r
+\r
+* We conflict with other modes when they put indicators on the fringe,\r
+  such as [Flycheck](https://github.com/flycheck/flycheck). This is\r
+  rarely a significant problem, since if you're using such a mode,\r
+  you'd usually want to fix all errors and warnings before continuing,\r
+  and then the conflicting indicators go away.\r
+\r
+* There's no fringe when Emacs is running in the console, but the navigation and\r
+  revert commands still work. Consider turning `diff-hl-margin-mode` on.\r
+\r
+* Frame-local and buffer-local values of `line-spacing` are not supported.\r
+\r
+* [git-gutter](https://github.com/syohex/emacs-git-gutter) provides interactive\r
+  commands to show/hide/toggle margin indicators for the same information, and\r
+  allows you to customize how the indicators look.\r
+\r
+Integration\r
+=====\r
+\r
+If you're using some package other than `vc` to commit changes, it might\r
+not run `vc-checkin-hook` after commits. In that case, you'll need to\r
+either add `diff-hl-update` to the hook it does run, or advise some\r
+function that's called in the buffer after its state has changed.\r
+\r
+psvn\r
+-----\r
+\r
+```lisp\r
+(defadvice svn-status-update-modeline (after svn-update-diff-hl activate)\r
+  (diff-hl-update))\r
+```\r