Search code examples
emacsdiffmagit

emacs magit diff highlighting


I'm just getting started with magit. I really like it, except that the diff viewer is really annoying to me. The chunk highlighting makes no sense because as I scroll around the cursor moves with the screen, highlighting new regions. There is also no other syntax highlighting in the magit diff mode. Does anybody know how to disable the chunk highlighting and get better diff colours other than white on gray?

Thanks.


Solution

  • There should be a customize group magit which allows you to customize all the different faces for the diff viewer.

    In other words, you can run

    M-x customize-group RET magit-faces RET
    

    to see a list of all the faces used by Magit. The ones relevant to the diff viewer are, of course, the ones starting with Magit Diff.

    Simply customize away and select Apply and Save. Alternatively, you can just use the Customize interface to see what faces are available, and then set them directly using set-face-foreground, set-face-background, and so on in your init-file.