How can you have vimdiff show the entire contents of the files being differenced? I'd like the color highlights of the differences, but would still like to see the entire files, i.e. the parts that are identical as well.
foldmethod diff so all unchanged lines are folded. From inside
vimdiff you can open all folds by pressing
If you would like to always show the full context you could increase the number of unfolded context lines shown to some large number. In your
if &diff " only for diff mode/vimdiff set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync endif
This answer to the question on stackoverflow is worth checking.
in a nutshell:
zc to respectively open and close a section
zR to respectively expand and fold all the sections