syn region math start=/\$\$/ end=/\$\$/ syn match math_block '\$[^$].\{-}\$' hi link math Statement hi link math_block Statement