The TeX-syntax highlighting does not detect comments in optional
arguments to environments, e.g.:
\begin{myenv}[ % here the options
]
\end{myenv}
The attached patch solves the problem.
--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php*** runtime/syntax/tex.vim 2009-11-08 23:07:17.000000000 +0100
--- runtime/syntax/tex.vim 2009-12-28 11:43:54.000000000 +0100
***************
*** 181,187 ****
" \begin{}/\end{} section markers: {{{1
syn match texSectionMarker "\\begin\>\|\\end\>" nextgroup=texSectionName
syn region texSectionName matchgroup=Delimiter start="{" end="}" contained nextgroup=texSectionModifier
! syn region texSectionModifier matchgroup=Delimiter start="\[" end="]" contained
" \documentclass, \documentstyle, \usepackage: {{{1
syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texSectionName,texDocTypeArgs
--- 181,187 ----
" \begin{}/\end{} section markers: {{{1
syn match texSectionMarker "\\begin\>\|\\end\>" nextgroup=texSectionName
syn region texSectionName matchgroup=Delimiter start="{" end="}" contained nextgroup=texSectionModifier
! syn region texSectionModifier matchgroup=Delimiter start="\[" end="]" contains=texComment contained
" \documentclass, \documentstyle, \usepackage: {{{1
syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texSectionName,texDocTypeArgs