Reply to message «RE: How to check for a variable being set? 'defined' somehow 
doesn't work for me..», 
sent 14:00:16 09 June 2011, Thursday
by John Beckett:

> if exists('&tags')
It works for user variables, but for options it will return 0 or 1 depending on 
compilation flags and on nothing else.

Original message:
> Asis Hallab wrote:
> > How do I do something like the following:
> > "
> > if(defined(tags))
> > 
> >   return "\<c-x>\<c-]>"
> > 
> > endif
> > "
> > The tags-variable is the one set by :set tags="./tags".
> 
> if exists('&tags')
> 
> :help exists()
> 
> John

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to