Benji Fisher Sent on April 16, 2006 7:55 PM >On Sun, Apr 16, 2006 at 05:15:48PM -0700, Suresh Govindachar wrote: >> >> Hello, >> >> A few minutes ago, I wrote, hastily: >> >> > I just found out that buffers displaying files with >> > modeline that set foldexpr, fillchars, foldtext, >> > foldmethod=expr and foldcolumn=0 cannot be diffthis'ed. >> >> Actually, the differences do get highlighted, only folding >> happens as per the mode line. >> >> So my question becomes: Is there a way to make diffthis >> ignore any conflicting sets for folding from the modeline? > > You need an autocommand that is processed after the > modelines. > > :au BufWinEnter * if &diff | set ... | endif > > (untested). I think someone mentioned using the FilterReadPost > event, since that is triggered by (some of?) the :diff commands. > I have not tested it.
I missed the earlier thread. Rather than create an autocommand which would be operative always, I would just turn off the modeline (eg, vim: to vom:) for the brief duration of doing the diffs. Anyway, it would be nicer if diffopt could be used to specify that, while diffing, settings as per "vimdiff" should over-ride any conflicting settings set from other sources. --Suresh
