@@ -190,16 +190,6 @@ function! vimtex#syntax#core#init() abort " {{{1
190
190
syntax match texCmdStyle " \\ textup\> "
191
191
syntax match texCmdStyle " \\ emph\> "
192
192
193
- syntax match texCmdStyle " \\ mathbb\> "
194
- syntax match texCmdStyle " \\ mathbf\> "
195
- syntax match texCmdStyle " \\ mathcal\> "
196
- syntax match texCmdStyle " \\ mathfrak\> "
197
- syntax match texCmdStyle " \\ mathit\> "
198
- syntax match texCmdStyle " \\ mathnormal\> "
199
- syntax match texCmdStyle " \\ mathrm\> "
200
- syntax match texCmdStyle " \\ mathsf\> "
201
- syntax match texCmdStyle " \\ mathtt\> "
202
-
203
193
syntax match texCmdStyle " \\ rmfamily\> "
204
194
syntax match texCmdStyle " \\ sffamily\> "
205
195
syntax match texCmdStyle " \\ ttfamily\> "
@@ -378,6 +368,17 @@ function! vimtex#syntax#core#init() abort " {{{1
378
368
syntax match texCmdMathText " \\\(\( inter\)\? text\| mbox\)\> " nextgroup =texMathTextArg
379
369
call vimtex#syntax#core#new_arg (' texMathTextArg' )
380
370
371
+ " Math style commands
372
+ syntax match texMathCmdStyle " \\ mathbb\> "
373
+ syntax match texMathCmdStyle " \\ mathbf\> "
374
+ syntax match texMathCmdStyle " \\ mathcal\> "
375
+ syntax match texMathCmdStyle " \\ mathfrak\> "
376
+ syntax match texMathCmdStyle " \\ mathit\> "
377
+ syntax match texMathCmdStyle " \\ mathnormal\> "
378
+ syntax match texMathCmdStyle " \\ mathrm\> "
379
+ syntax match texMathCmdStyle " \\ mathsf\> "
380
+ syntax match texMathCmdStyle " \\ mathtt\> "
381
+
381
382
" Support for array environment
382
383
syntax match texMathCmdEnv contained contains =texCmdMathEnv " \\ begin{array}" nextgroup =texMathArrayArg skipwhite skipnl
383
384
syntax match texMathCmdEnv contained contains =texCmdMathEnv " \\ end{array}"
@@ -581,6 +582,7 @@ function! s:init_highlights() abort " {{{1
581
582
highlight def link texMathArg texMathRegion
582
583
highlight def link texMathArrayArg texOpt
583
584
highlight def link texMathCmd texCmd
585
+ highlight def link texMathCmdStyle texMathCmd
584
586
highlight def link texMathDelimMod texMathDelim
585
587
highlight def link texMathDelimRegion texDelim
586
588
highlight def link texMathError texError
0 commit comments