9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

magitの差分表示で行内の違いを色付けする

Last updated at Posted at 2016-06-22

magit で差分表示したときに、今いる hunk 内で行内の違い(空白の違いも含め)に色付けする設定

;; 今居るhunkの行内の差分に色付けする
(setq magit-diff-refine-hunk t)
;; 空白の差を無視しない
(setq smerge-refine-ignore-whitespace nil)

magit-diff-refine-hunk.png

上の設定だとカーソルが居るhunkのみ色付けされることに注意。magit-diff-refine-hunk に 'all を指定すれば全てのhunksに色付けが適用される。

9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?