lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.56k stars 391 forks source link

Treat semiverbatim as verbatim #3000

Closed MithicSpirit closed 2 months ago

MithicSpirit commented 2 months ago

Is your feature request related to a problem? Please describe it. The semiverbatim environment (similar to verbatim, but \, {, and } preserve their normal meaning) provided by beamer is treated as regular LaTeX code, which leads to annoying formatting issues and subpar syntax highlighting.

Describe the solution you'd like semiverbatim should just be treated as regular verbatim by vimtex.

MithicSpirit commented 2 months ago

woah, this is exactly issue number 3000. I suppose now is a good time to thank you for all your work!

lervag commented 2 months ago

Is your feature request related to a problem? Please describe it. The semiverbatim environment (similar to verbatim, but \, {, and } preserve their normal meaning) provided by beamer is treated as regular LaTeX code, which leads to annoying formatting issues and subpar syntax highlighting.

Could you provide an example or two of this that I can use for testing?

woah, this is exactly issue number 3000.

🎊

I suppose now is a good time to thank you for all your work!

💝

MithicSpirit commented 2 months ago

Could you provide an example or two of this that I can use for testing?


\documentclass{beamer}

\begin{document} \begin{frame}[fragile] \begin{semiverbatim} int main() { \uncover<2->{return 0;} } \end{semiverbatim} \end{frame} \end{document}


Try formatting/indenting the lines inside the semiverbatim environment.
lervag commented 2 months ago

There, I think it should work as expected now.