[EMAIL PROTECTED] 写于 2006-10-11 12:27:33:
> > :FoldMatching #ifdef\ _DEBUG #endif 0
> >
> > The last parameter is a context, so you might like 1 better than 0
> > (allows you to see what you are folding). Alternatively, you can also
> > configure the foldtext (see plugin page or the header in the file for
> > information)
> >
> > If you want this to be automatically done everytime you open the file,
> > then you need to create an autocommand e.g.,(untested):
> >
> > au FileType c FoldMatching #ifdef\ _DEBUG #endif 0
> Hari,
>
> Perfect. That's exactly what I wanted, and I'm sure your script will
> be useful in many other ways as well Good to find out about it, and
> thanks for your work.
>
> --
> Kamil Kisiel <[EMAIL PROTECTED]>
I don't know how it works, but it seems that cannot cope with statements
like the following:
#ifdef _DEBUG
/* only things here should be folded */
#else
/* these lines should NOT be folded */
#endif
or the following:
#ifndef _DEBUG
/* these lines should NOT be folded */
#else
/* only things here should be folded */
#endif
What should I do, if the #if statements may contain #else? especially for
the latter one, the #ifndef has #else?
--
Sincerely, Pan, Shi Zhu. ext: 2606