Ignore newlines in vimdiff output

I know that I can ignore whitespace in vimdiff on se diffopt+=iwhte

but I also want to ignore the newline character in vimdiff. How should I do it?

eg.

if (a> b) {bar () `

diff will not be displayed with

if (a> b) {bar ()

Thank,

+3
source share
1 answer

To really omit the added lines, you will have to write a custom diff function, cp. :help diff-diffexpr.

If you just don’t want to see the added lines (because they are too visually distracting), you can change the selection group DiffAddto display white on white (or black on black in the console) text (or any other low-contrast coloring in the same way:

:highlight DiffAdd ctermfg=black ctermbg=NONE guifg=bg guibg=NONE
+1
source

All Articles