Wednesday, December 2, 2009

Re: Autochange diff colour scheme

On 08/11/09 19:12, Paul wrote:
>
>> au CursorHold * if&diff&& g:colors_name != "pablo" | colors
>> pablo | endif
>
> Apparently the default colour scheme does not set g:colors_name, so that
> gives an undefined variable error :/
>

Easy:

au CursorHold * if &diff && (!exists('g:colors_name') ||
\ g:colors_name != 'pablo') | colors pablo | endif

You may want to use a different event, such as WinEnter


Best regards,
Tony.
--
FIGHTING WORDS

Say my love is easy had,
Say I'm bitten raw with pride,
Say I am too often sad --
Still behold me at your side.

Say I'm neither brave nor young,
Say I woo and coddle care,
Say the devil touched my tongue --
Still you have my heart to wear.

But say my verses do not scan,
And I get me another man!
-- Dorothy Parker

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: