Vim syntax and Latex math inside markdown -
i write documentation in markdown using vim , put math using latex $$
symbol (i compile using pandoc). thing vim syntax wouldn't ignore underscores _
inside dollar symbols , pretty annoying. instance if write this:
$$ a_1 = 0 $$
then vim highlight following text italics due to underscore used.
how can change that?
also nice if highlight what's inside $
different format.
i have put these lines in .vimrc. works inline math on same line , block-mode math.
" gets rid of nasty _ italic bug in tpope's vim-markdown " block $$...$$ syn region math start=/\$\$/ end=/\$\$/ " inline math syn match math '\$[^$].\{-}\$' " highlight region defined "math" hi link math statement
edit: i've since written blog post called "vim syntax highlighting markdown, liquid , mathjax"
Comments
Post a Comment