Skip to content

Commit

Permalink
perf: more syntax adjustments
Browse files Browse the repository at this point in the history
refer: #2877
  • Loading branch information
lervag committed Jan 28, 2024
1 parent 2477b87 commit 37480f2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions autoload/vimtex/syntax/core.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ function! vimtex#syntax#core#init_rules() abort " {{{1

" {{{2 TeX symbols and special characters

syntax match texLigature "--"
syntax match texLigature "---"
syntax match texLigature "\([`',]\)\1"
syntax match texLigature "---\?"
syntax match texLigature "``"
syntax match texLigature "''"
syntax match texLigature ",,"
syntax match texTabularChar "&"
syntax match texTabularChar "\\\\"

" E.g.: \$ \& \% \# \{ \} \_ \S \P
syntax match texSpecialChar "\~"
syntax match texSpecialChar "\\ "
syntax match texSpecialChar "\\[$&%#{}_@]"
syntax match texSpecialChar "\\[$&%#{}_@,;:!>]"
syntax match texSpecialChar "\\[SP@]\ze[^a-zA-Z@]"
syntax match texSpecialChar "\^\^\%(\S\|[0-9a-f]\{2}\)"
syntax match texSpecialChar "\\[,;:!>]"

" }}}2
" {{{2 Commands: general
Expand Down Expand Up @@ -1955,7 +1955,9 @@ endfunction
function! s:match_math_delims() abort " {{{1
syntax match texMathDelimMod contained "\\\(left\|right\)\>"
syntax match texMathDelimMod contained "\\[bB]igg\?[lr]\?\>"
syntax match texMathDelim contained "[()[\]]\|\\[{}]"
syntax match texMathDelim contained "[()[\]]"
syntax match texMathDelim contained "\\{"
syntax match texMathDelim contained "\\}"
syntax match texMathDelim contained "\\backslash\>"
syntax match texMathDelim contained "\\downarrow\>"
syntax match texMathDelim contained "\\Downarrow\>"
Expand Down

0 comments on commit 37480f2

Please sign in to comment.