Re: vimdiff mergetool diff mode detection in vimrc broken by commit 0041797449

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I check &diff in my vimrc to set various settings specifically when doing a
> diff/merge.

Hi Andrew, could using an auto command on the "DiffUpdated" event work for you?

Example: add this to .vimrc:

    au DiffUpdated * if &diff | colorscheme darkblue | endif

This function will be executed every time "diff mode" is updated in any way and
seems to work both when running vimdiff directly and when entering diff mode
interactively (as it is the case now when running "git mergetool").

It has the added benefit that you can also use this same "trick" to toggle the
settings off when *exiting* diff mode:

    au DiffUpdated * if !&diff | colorscheme desert | endif

Let me know if this is enough for your use case.

Thanks!




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux