Skip to content

Instantly share code, notes, and snippets.

@m-wynn
Created September 27, 2015 19:37
Show Gist options
  • Save m-wynn/a3f19281df4c0ccb08c0 to your computer and use it in GitHub Desktop.
Save m-wynn/a3f19281df4c0ccb08c0 to your computer and use it in GitHub Desktop.
Uniform listings syntax highlighting
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
" http://stackoverflow.com/a/21651323/3483296
" This goes in ~/.vim/after/syntax/tex/listings.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment