Sunday, June 3, 2012

Re: exists("##ColorScheme")

Hello Christian,


Excerpt from Christian Brabandt:

> Hi Thilo!
>
> On So, 03 Jun 2012, Thilo Six wrote:
>
>> according to ':h exists()' we can use 'exists("##ColorScheme")' to check for the
>> availability of an colorscheme.
>>
>> :colorscheme
>> desert
>> :echo exists("##desert")
>> 0
>>
>>
>> ,----[ :h exists() ]------------------------
>>
>> exists({expr}) The result is a Number, which is non-zero if
>> {expr} is defined, zero otherwise.
>> `---------------------------------------------
>>
>> I am pretty sure this used to work somewhen. Is this a bug or am i doing s.th.
>> wrong?
>
> You are not supposed to test a specific ColorScheme, rather whether an
> event for an autocommand is supported, e.g. exist("##FileType") echoes
> 1, if your Vim supports the FileType autocommand.

Then the 'Examples:' section below ':h exists()' needs to be updated.

>
> regards,
> Christian

--
Regards,
Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6 7C18 89A4 A2A0 C70B 1A8F


--
You received this message from the "vim_use" 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

No comments:

Post a Comment