Gary Johnson wrote:
> When I diff a syntax-highlighted buffer, the diff highlighting often
> conflicts with the syntax highlighting so that some text has the
> same foreground and background colors and becomes impossible to
> read.
>
> I have worked around this problem with the following autocommand.
>
> au FilterWritePost * if &diff | setlocal syn=OFF | endif
>
> With the new internal diff, this doesn't seem to be working anymore.
> That makes sense since the internal diff doesn't need to write any
> files, but now we don't seem to have a hook for changing settings
> when diff is enabled.
>
> What would be nicest is a pair of hooks (autocommand events) that
> would be triggered when a buffer entered and left diff mode.
>
> Any thoughts on this?
How about using an OptionSet autocommand? I haven't tried this:
au OptionSet diff if &diff | setlocal syn=OFF | endif
--
Portable Computer: A device invented to force businessmen
to work at home, on vacation, and on business trips.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.