In vim editor if I write **Markdown** this is automatically formatted as bold in the editor itself and similarly if I do _Markdown_ this automatically formatted as italic in the editor itself, see the line 9 in the screen shot. I guess that vim has some inbuit styling support for the markdown type syntax. This makes the code readable for me.
I am writing equations in a book using bookdown package and vim syntax rendering for Rmd files has an issue related to _
(subscript) operator.
If I write a latex equation like this :
\begin{equation}
d_p(u,v) = f_p(u,v)
\end{equation}
This is rendered fine as you can see at line 15-17.
If I write a latex equation like this:
\begin{equation}
d_p(u,v) = \mid\mid u - v \mid\mid_{p=1}
\end{equation}
This is not rendered fine (line 23 ownwards) and makes all text after second _
italic and hence no syntax highlighting.
Please note that I am getting correct output in both the cases it is just that the code doesn't look pretty in the second case. This is an editor specific question, my initial question gave the wrong impression that this is bookdown related issue.