Aditya Mahajan pisze:
>> I don't want to use the listings package as it would be just overkill to
>> what I am trying to do. I thought more of a workaround, possibly some
>> patch to latex-suite to force verbatim-like behavior to my 'code'
>> environment. I scanned throught the sources, but couldn't figure out how
>> latex-suite ignores verbatim environment. I am not familiar with vim's
>> script language, though.
> 
> You can you %stopzone to avoid the syntax highlighting from overrunning. 
> For example
> 
> \begin{code}
> $whatever
> \end{code}%stopzone

Thanks, that solved it. Altought I have to put %stopzone on the next
line because otherwise fancyvrb prints a error:

error| FancyVerb Error: Extraneous input ` %stopzone\end{}' between
\end{code} and line end


> should work. The syntax highlighting inside the code is still wrong, but 
> at least it will not overflow.
> 
> Another option is to open $VIMRUNTIME/syntax/tex.vim and search for 
> verbatim. You will see a sequence of lines like.
> 
> syn region texZone        start="\\begin{verbatim}"
> end="\\end{verbatim}\|%stopzone\>"    contai...@spell
> 
> Add another similar line replacing verbatim with code. That will make 
> the code environment behave like the verbatim environment.

I also tried this and it works! I'll stick to this solution.

Thanks!

--
rocku

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to