From e82d3d2861d90951978da22434145cc113ebedea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 9 Feb 2014 15:44:55 +0100 Subject: [PATCH] Added support for listings package --- after/syntax/tex.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim index 0b41abd..dc24a31 100644 --- a/after/syntax/tex.vim +++ b/after/syntax/tex.vim @@ -26,3 +26,14 @@ syn region texRefRangeEnd \ contained contains=texRefZone hi link texRefRangeStart texRefZone hi link texRefRangeEnd texRefZone + +" Support for listings package +syn region texZone + \ start="\\begin{lstlisting}" + \ end="\\end{lstlisting}\|%stopzone\>" +syn region texZone + \ start="\\lstinputlisting" + \ end="{\s*[a-zA-Z/.0-9_^]\+\s*}" +syn match texInputFile + \ "\\lstinline\s*\(\[.*\]\)\={.\{-}}" + \ contains=texStatement,texInputCurlies,texInputFileOpt