* El 11/04/06 a las 9:58, Charles E Campbell Jr chamullaba:
> Luis A. Florit wrote:
>
> > Hi all,
> >
> > I've always had some special highlighting for TeX
> > files. For example, I have the following syn for "$$":
> >
> > hi dollars cterm=bold ctermfg=7 ctermbg=4 guifg=white guibg=blue
> > syn match dollars /\(\$\$\|\\\[\|\\\]\)/
> >
> > It always worked nicely, but since I upgraded to FC5,
> > and then from vim6.3 to vim6.4, the highlighting only
> > works BEFORE the '\begin{document}', and not after
> > (not very useful...). This persist even if I remove
> > my .vimrc, or my .vim directory, so it is some new
> > problem with version 6.4.
> >
> > Any idea about what is happening??
>
> As Benji F said, you'll need to get it contained (at least in
> texDocZone). containedin=ALL
> should work, but it will of course then be contained in all groups,
> including comments.
>
> The texDocZone group was set up to facilitate syntax-based folding.
I understand.
I tried a lot to make syntax-based folding in 6.3, and I gave up...
marked folding is much faster, anyway, and trivial.
I like coward solutions... :)
But your (and Benji's) solution gives rise to another problem:
If I add containedin=ALL, or containedin=texDocZone, the "$$"
are properly highlighted, but then 80% of the "}" in the
manuscript are highlighted like errors, white over red (??!!).
Another problem that I have (but this one I always had) is that
the highlighting of the "$$" destroys the normal highlighting
of the math zone, and errors appear inside the $$ ... $$.
But I assume it has to do with the contained-contains stuff.
I tried, then:
hi dolares cterm=bold ctermfg=7 ctermbg=4 guifg=white guibg=blue
syn match dolares contained /\(\$\$\|\\\[\|\\\]\)/ containedin=ALL
but, still, the two problems persist: 80% of the "}" are marked
as errors, and the syntax inside the $$ ... $$ is destroyed.
Do you have a suggestion? I really don't get how this works.
Thanks for your patience...
Cheers,
Luis.