Monday, June 25, 2012

Re: How to tell if highlight has been defined

Thanks. I had looked around for an "exists" method for
highlights but missed it.

Richard

On 06/24/2012 07:58 PM, John Beckett wrote:
>> On Sunday, June 24, 2012 7:53:11 PM UTC-5, Richard wrote:
>> In a script, is it possible to test whether or not its been defined.
>
> Yes, use hlexists('name') for example:
>
> if !hlexists('MyHi')
> hi MyHi guifg=white guibg=black
> endif
>
> An example using it is at:
> http://vim.wikia.com/wiki/VimTip1572
>
> John
>

--
Quis custodiet ipsos custodes


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