pvk7 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Latex - Syntax highlighting in lstlisting block #144

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open vim 
2. type ":setf tex"
3. type some latex code inside a \begin{lstlisting} ... \end{lstlisting}

What is the expected output? What do you see instead?
The code is expected to be considered as plaintext inside these kind of blocks

Instead the code is syntax-highlighted, and some special char like '_' or '%' 
causes a mess in the remaining latex-part of the file.

What version of the product are you using? On what operating system?
vim version :
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 25 2013 00:49:28)
changeset:   4996:5759342cde79

OS: 
Linux 3.2.0-4-amd64 Debian 3.2.41-2 x86_64 GNU/Linux

Please provide any additional information below.
I made and attached a small patch that fixes it, in src/runtime/tex.vim

Original issue reported on code.google.com by philippe...@gmail.com on 24 Jun 2013 at 11:35

Attachments:

GoogleCodeExporter commented 9 years ago
lstlisting comes from a LaTeX package; please see   :help tex-morecommands .

So the syntax/tex.vim distribution will not be changed to support these 
commands.  Instead, please write an extension script (presumably in a file: 
.vim/after/syntax/tex/lstlisting.vim) and submit it to vim.sf.net.

Original comment by drc...@campbellfamily.biz on 25 Jun 2013 at 3:27