3

A am using the latex-suite plugin for vim but there is one problem, best illustrated with an example. Suppose I have the following environment:

\begin{theorem}
  Blah blah blah.
\end{theorem}

Now, if I want to chang it to a lemma, I press Shift-F5 within the theorem environment and type 'lemma' at the prompt. But it then gives me TWO slashes like so:

\\begin{lemma}
  Blah blah blah.
\\end{lemma}

Does anybody know how I can get this working properly so that there is only one slash after the change?

Brian
  • 161
  • 1
  • 7

1 Answers1

4

I believe this is an old latex-suite bug. Not sure if it's fixed in the latest versions (it has been reported), but in any case going to ftplugin/latex-suite/envmacros.vim:281 and replacing the \\ with a \ on each line did the trick for me. You should end up with:

    let first = '\begin{' . a:env . '}'
    let second = '\end{' . a:env . '}'
FishFace
  • 362
  • 1
  • 12
  • The bug hasn't been fixed yet but your advice worked. Thank you. – Brian Apr 11 '13 at 01:27
  • The work version on [github](https://github.com/vim-latex/vim-latex/blob/master/ftplugin/latex-suite/envmacros.vim#L781) has correct this. – van abel Jul 10 '16 at 08:00