diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 230f25e..3aea2c8 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -189,6 +189,18 @@ syntax region texZone \ contains=texBeginEnd,@LUA let b:current_syntax = 'tex' +" }}}1 +" {{{1 Nested syntax highlighting for gnuplottex +unlet b:current_syntax +syntax include @GNUPLOT syntax/gnuplot.vim +syntax region texZone + \ start='\\begin{gnuplottex}\(\_s*\[\_[\]]\{-}\]\)\?'rs=s + \ end='\\end{gnuplottex}'re=e + \ keepend + \ transparent + \ contains=texBeginEnd,texBeginEndModifier,@GNUPLOT +let b:current_syntax = 'tex' + " }}}1 " {{{1 Nested syntax highlighting for minted diff --git a/test/features/syntax/test-syntax.tex b/test/features/syntax/test-syntax.tex index 19ed94a..6f1a916 100644 --- a/test/features/syntax/test-syntax.tex +++ b/test/features/syntax/test-syntax.tex @@ -27,6 +27,10 @@ testing } \end{dot2tex} +\begin{gnuplottex}[terminal=..., terminaloptions=...] + plot file using 1:2 with lines +\end{gnuplottex} + \begin{minted}{python} def function(arg): pass