On Fri, 21 Aug 2009, rocku wrote: > Ted Pavlic pisze: >> Without giving it much thought, try something like... >> >> \begin{verbatim} >> \endverbatim >> \begin{code} >> ... >> \end{code} >> \verbatim >> \end{verbatim} > > This does not work, I receive the following after \ll in vim (using > texlive): > > || pdfTeX warning (ext4): destinati > |669 error| Extra \endgroup. > > > |669 error| \begin{document} ended by \end{code}. > |669 error| Extra \endgroup. > |671 error| \begin{document} ended by \end{verbatim}. > |671 error| Extra \endgroup. > || Emergency stop. > || ==> Fatal error occurred, no output PDF file produced! > > > 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 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. Aditya ------------------------------------------------------------------------------ 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