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

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -