Sunday, June 3, 2012

Re: exists("##ColorScheme")

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.

regards,
Christian
--
Drinnen ist es genauso wie draußen, nur anders.

--
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