Add support for gnuplot nested highlighting (#514)

This commit is contained in:
Karl Yngve Lervåg 2016-08-07 13:24:09 +02:00
parent 532edd2595
commit 9f31070ab3
2 changed files with 16 additions and 0 deletions

View File

@ -189,6 +189,18 @@ syntax region texZone
\ contains=texBeginEnd,@LUA \ contains=texBeginEnd,@LUA
let b:current_syntax = 'tex' 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
" {{{1 Nested syntax highlighting for minted " {{{1 Nested syntax highlighting for minted

View File

@ -27,6 +27,10 @@ testing
} }
\end{dot2tex} \end{dot2tex}
\begin{gnuplottex}[terminal=..., terminaloptions=...]
plot file using 1:2 with lines
\end{gnuplottex}
\begin{minted}{python} \begin{minted}{python}
def function(arg): def function(arg):
pass pass