diff
operates on lines, not characters or words, so -b
and -w
determine which lines to ignore. If a line is not ignored, which is the case whenever non-whitespace changes are involved (unless you ignore case or explicitly ignore lines matching some regex), diff
will always output something like this:
1c1
< a,b,c,d
---
> a, b, c, e
Altering diffopt
or even diffexpr
only affects how Vim invokes diff
, not how it then processes the diff it receives. Since neither -b
nor -w
will change the above diff, Vim will consequently display the same result. Thus what you're looking for is a way to change how exactly Vim highlights the diff it receives, which I don't believe is possible.