Is there a way to make Ediff highlight whitespace using a different color, the way it does for non-whitespace differences?

For example, here are two regions with only whitespace differences:

enter image description here

And here are two regions with non-whitespace differences:

enter image description here

The non-whitespace differences are highlighted with ediff-fine-diff-* faces, while whitespace differences are not. I'd like some way to tell what the whitespace differences are.

  • Make sure ediff-diff-options is not set to "-w", which tells the diff program to ignore white space. May not solve the problem, but might help you get there. Oct 22, 2016 at 11:35
  • I don't have ediff-diff-options set to -w. With your setup, are your whitespace differences highlighted? Oct 22, 2016 at 16:22
  • No, not even after pressing * (ediff-toggle-autorefine). Oct 24, 2016 at 17:56

2 Answers 2


Seems like this feature is simply not supported.

The highlighting of fine differences is referred to as "refinement" by Ediff, and explicitly skips whitespace.

Note that refinement ignores spaces, tabs, and newlines.


One way you can do this is by enabling whitespace mode in all the ediff buffers. This can be done by Meta + x + whitespace-mode

It may be enough just to enable in the merge buffer. I'm not sure how you might go about enabling by default, but there will be a way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.