Brett Calcott wrote:

I want to add some extra syntax highlighting to my latex documents. I
am writing a thesis, so I have separate files for each chapter.

For example, I add this in ~/vimfiles/extra/syntax/tex.vim

syn region texFootnote matchgroup=texStatement start="\\footnote{" end="}"
hi link texFootnote Special

Now in my latex file let's say I have this:

\chapter{Introduction}
bla bla bla \footnote{see here for more bla}

The highlighting does not work. But if I comment out the \chapter
command then it does. So the syntax highlighting of \chapter is
affecting whether or not my additional syntax works.

...snip

I don't know where the "extra" comes from in your path; please try putting the following
in ~/vimfiles/after/syntax/tex.vim:

syn region texFootnote matchgroup=texStatement start="\\footnote{" end="}"
  hi link texFootnote Special
  syn cluster texFoldGroup add=texFootnote

Regards,
Chip Campbell


Reply via email to