When diffing two files in vim (e.g. vim -d file1 file2), I want all whitespace to be ignored.
I almost achieved this by following the advice of Adam Katz in this question: Is there a way to configure vimdiff to ignore ALL whitespaces?
That advice causes the diff command to get the -w option, so that it doesn't include lines with only whitespace differences in the results.
If there's a line with both whitespace differences and non-whitespaces differences, then these are correctly returned by diff. But vim highlights the whitespace as a difference too.
E.g. If the two lines being diffed are:
File 1: a,b,c,d
File 2: a, b, c, e
Then the highlighted diff will be b, c, e
instead of my desired e
.
Is there any way to tell vim to ignore whitespace in its highlighting process?
I'm using vim 7.3 (gvim).