Wikia

Vim Tips Wiki

Ignore white space in vimdiff

Talk0
1,610pages on
this wiki
Revision as of 08:45, July 1, 2013 by Chrisbra (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Tip 1294 Printable Monobook Previous Next

created 2006 · complexity basic · author vagusri · version 5.7


I had been searching for a way to ignore white spaces while using vimdiff. Unfortunately, vimdiff -h yields the generic Vim help. I finally found that including the following line in vimrc solves the problem.

set diffopt+=iwhite

From the command line use:

vimdiff -c 'set diffopt+=iwhite' ...

To have vimdiff ignore whitespace while normal vim doesn't, simply put this into your .vimrc:

if &diff
    " diff mode
    set diffopt+=iwhite
endif


ReferencesEdit

Around Wikia's network

Random Wiki