Emacsでgitのdiffを見るときのfont colorを変える
.emacsやinits/00-setting.elに以下を記述
(custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(org-document-title ((t (:foreground "red")))) '(diff-hunk-header ((t (:background "brightred" :foreground "black")))) '(diff-removed ((t (:background "color-22" :foreground "brightred")))) '(diff-added ((t (:background "yellow" :foreground "black")))) '(custom-face-tag ((t (:inherit custom-variable-tag :foreground "brightred")))) '(custom-group-tag ((t (:inherit variable-pitch :foreground "brightred" :weight bold :height 1.2)))) '(custom-variable-tag ((t (:foreground "brightred" :weight bold)))) '(font-lock-function-name-face ((t (:foreground "Blue")))) '(highlight ((t (:background "darkseagreen2" :foreground "black")))) '(hlline-face ((t (:background "OliveDrab1" :foreground "black")))) '(lazy-highlight ((t (:background "paleturquoise" :foreground "black")))) '(match ((t (:background "yellow1" :foreground "black")))) '(minibuffer-prompt ((t (:foreground "brightyellow")))) '(next-error ((t (:inherit region :foreground "black")))) '(region ((t (:background "lightgoldenrod2" :foreground "black")))) '(secondary-selection ((t (:background "yellow1" :foreground "black")))) '(show-paren-match ((t (:background "turquoise" :foreground "black")))))
他の色に変えたいときは...
名前の取得
色を変えたい文字にカーソルを合わせ,M-x eval-expression RET (get-char-property (point) 'face) RET で名前を取得できる.(例えば,diff-added等)
好きな色を探す
M-x list-colors-displayで色とその名前を調べることができる.(例えば,blue1はどうのような色か確認できる)
色の変更
上記のEmacs Lispに書き加えるか,M-x customize-faceで値を変更してC-x C-sで保存する.