lue1tg
Last Updated: February 25, 2016
·
2.945K
· clarete

Changing the diff-mode colors in Emacs

Just add these lines to your .emacs files (or .emacs.d/init.el)

;; Customizing colors used in diff mode
(defun custom-diff-colors ()
  "update the colors for diff faces"
  (set-face-attribute
   'diff-added nil :foreground "green")
  (set-face-attribute
   'diff-removed nil :foreground "red")
  (set-face-attribute
   'diff-changed nil :foreground "purple"))
(eval-after-load "diff-mode" '(custom-diff-colors))

(my full emacs config can be found at github: https://github.com/clarete/dotfiles/tree/master/.emacs.d)