From 0966031234836c8807264071cccc1670d1be123d Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 24 Nov 2016 16:46:56 +0100 Subject: [PATCH] Highlight math not using TeX but TeX math Fix #236 --- autoload/vimwiki/base.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index e943b52..748ccbd 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -1079,6 +1079,14 @@ function! vimwiki#base#nested_syntax(filetype, start, end, textSnipHl) abort "{{ else unlet b:current_syntax endif + + " Fix issue #236: tell Vimwiki to think in maths when encountering maths + " blocks like {{$ }}$. Here, we don't want the tex highlight group, but the + " group for tex math. + if a:textSnipHl ==# 'VimwikiMath' + let group='texMathZoneGroup' + endif + execute 'syntax region textSnip'.ft. \ ' matchgroup='.a:textSnipHl. \ ' start="'.a:start.'" end="'.a:end.'"'.