I need to write Rmd files, but I can't imagine life without vimtex. Is there a way that I can use vimtex with Rmd files? Ideally, I would also like to keep the syntax highlighting that I have for Rmd files (via https://github.com/vim-pandoc/vim-rmarkdown).
Edit: In response to a comment by @filbranden, here is useful post that provides more information on Rmarkdown. Because the files are rendered using pandoc, one can mix R code with standard markdown with LaTeX.
As a simple example, an Rmarkdown file might contain code that looks like this:
# My document header
Here is an **emphasis**. Now here's some LaTeX:
\begin{align}
\hat{\beta} = \hat{\alpha}^{3} + \epsilon.
\end{align}
In a .tex
document I could use vimtex features, such as cse
inside the align
environment to toggle it to an align*
environment. That's just one of many many features of vimtex that I would like to be able to use in Rmd.
@Karl Yngve Lervåg is the creator of vimtex, so if he doesn't know of a solution then that's not a great sign for there being one...
Is it a bad idea to "trick" vim into thinking that an Rmd is a Tex file? Then presumably I could use vimtex features? The downside is that the syntax highlighting would be messed up.