1

As per the subj, I'm looking for a way to exclude one of the split windows in vimdiff yet still compare the other 2+ windows (with colors and all that jazz).

A use case: a file with keys and 2 files with values (same number of lines). I want to compare only the values but have the keys in the view still (without having to open two terminals). This would also allow for parallel scrolling, which is a feature of vimdiff.

Alex
  • 627
  • 8
  • 15
  • the :diffoff option is almost what I want, however, the auto-scroll function is lost for a window where diffoff is executed. – Alex Feb 13 '15 at 04:56
  • I don't understand why moving to the window containing the keys file and deleting the associated buffer wouldn't solve this. – chb Mar 07 '20 at 18:55
  • there are many solutions to the same problem chb :) – Alex May 14 '20 at 11:18

1 Answers1

2

:help :diffoff lists all the options which are reset by the command. Based on your description, you only want to reset the actual diff highlighting (which is controlled by the 'diff' option), but keep things like 'scrollbind' etc. So, just clear that option:

:setlocal nodiff

You can still use :diffoff later to completely turn off the diff.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324