in order to add some special highlighting for tex files, I created a
file ~/.vim/after/syntax.tex, that contains the following two lines:
syntax match texSectionTitle "\\section{[^}]}"
highlight texSectionTitle term=bold ctermfg=Red guifg=#80a0ff gui=bold
As far as I understand the docs, this should create some highlighting of
a section title. However, nothing happens. The section title's
highlighting is unchanged from what was defined in the global tex.vim.
Any suggestions on how do get this right? If I choose other pattern, it
doesn't work either. Executing ':highlight' shows that the definition of
texSectionTitle has been loaded. Any help would be greatly appreciated.
Thanks,
Michael
did you try \\\\section instead of \\section ? perl -pie needed this pattern
last time that I worked on latex files.
HTH
Michael
Cheers,
Michael
>
> Hi,
>
> in order to add some special highlighting for tex files, I created a
> file ~/.vim/after/syntax.tex, that contains the following two lines:
Hi,
Doesn't the syntax file need to be named ~/.vim/after/syntax/tex.vim?
regards,
Peter
>
> syntax match texSectionTitle "\\section{[^}]}"
> highlight texSectionTitle term=bold ctermfg=Red guifg=#80a0ff gui=bold
>
> As far as I understand the docs, this should create some highlighting of
> a section title. However, nothing happens. The section title's
> highlighting is unchanged from what was defined in the global tex.vim.
> Any suggestions on how do get this right? If I choose other pattern, it
> doesn't work either. Executing ':highlight' shows that the definition of
> texSectionTitle has been loaded. Any help would be greatly appreciated.
>
> Thanks,
> Michael
>
> >
>
Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/y7mail
Thanks,
Michael