Skip to content

sethfowler/diff-hl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 

Repository files navigation

About

diff-hl-mode highlights uncommitted changes on the left fringe of the window, allows you to jump between and revert them selectively.

For the usage instructions and the list of commands, see the header comment.

Tested with Git, Mercurial, Bazaar and SVN. May work with other VC backends, too.

Screenshot

screenie

Top window: a buffer in this minor mode, bottom window: the corresponding diff.

Requirements

Emacs 24+. On OS X, Emacs 24.3 or higher is recommended.

Notes

  • Since it uses the corresponding VC diff command, it's only accurate when the buffer is in saved state. Highlighting changes "on the fly" might be better, maybe we can do something similar to highlight-markup-buffers with a hidden buffer containing the unmodified copy.

  • There's no fringe when Emacs is running in the console, but the navigation and revert commands still work.

  • Frame-local and buffer-local values of line-spacing are not supported.

  • git-gutter provides interactive commands to show/hide/toggle margin indicators for the same information, and allows you to customize how the indicators look.

Integration

If you're using some package other than vc to commit changes, it might not run vc-checkin-hook after commits. In that case, you'll need to either add diff-hl-update to the hook it does run, or advise some function that's called in the buffer after its state has changed.

psvn

(defadvice svn-status-update-modeline (after svn-update-diff-hl activate)
  (diff-hl-update))

About

Emacs package for highlighting uncommitted changes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Emacs Lisp 100.0%