Vim syntax and Latex math inside markdown

我怕爱的太早我们不能终老 提交于 2019-12-05 05:29:52

I have put these lines in my .vimrc. It works for inline math on the same line and block-mode math.

" This gets rid of the nasty _ italic bug in tpope's vim-markdown
" block $$...$$
syn region math start=/\$\$/ end=/\$\$/
" inline math
syn match math '\$[^$].\{-}\$'

" actually highlight the region we defined as "math"
hi link math Statement

edit: I've since written a blog post called "Vim syntax highlighting for Markdown, Liquid and MathJax"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!