mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 11:55:34 +00:00
@@ -1,8 +1,8 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: TeX
|
" Language: TeX
|
||||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||||
" Last Change: Jun 07, 2020
|
" Last Change: Jun 29, 2020
|
||||||
" Version: 118
|
" Version: 119
|
||||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||||
"
|
"
|
||||||
" Notes: {{{1
|
" Notes: {{{1
|
||||||
@@ -147,6 +147,11 @@ if exists("g:tex_nospell") && g:tex_nospell
|
|||||||
else
|
else
|
||||||
let s:tex_nospell = 0
|
let s:tex_nospell = 0
|
||||||
endif
|
endif
|
||||||
|
if exists("g:tex_matchcheck")
|
||||||
|
let s:tex_matchcheck= g:tex_matchcheck
|
||||||
|
else
|
||||||
|
let s:tex_matchcheck= '[({[]'
|
||||||
|
endif
|
||||||
if exists("g:tex_excludematcher")
|
if exists("g:tex_excludematcher")
|
||||||
let s:tex_excludematcher= g:tex_excludematcher
|
let s:tex_excludematcher= g:tex_excludematcher
|
||||||
else
|
else
|
||||||
@@ -205,27 +210,41 @@ if !exists("g:tex_no_math")
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Try to flag {} and () mismatches: {{{1
|
" Try to flag {}, [], and () mismatches: {{{1
|
||||||
if s:tex_fast =~# 'm'
|
if s:tex_fast =~# 'm'
|
||||||
if !s:tex_no_error
|
if !s:tex_no_error
|
||||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
if s:tex_matchcheck =~ '{'
|
||||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
|
||||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
|
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
|
||||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
|
endif
|
||||||
|
if s:tex_matchcheck =~ '\['
|
||||||
|
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
|
||||||
|
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
if s:tex_matchcheck =~ '{'
|
||||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
|
||||||
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
|
syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
|
||||||
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
|
endif
|
||||||
|
if s:tex_matchcheck =~ '\['
|
||||||
|
syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
|
||||||
|
syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if !s:tex_nospell
|
if s:tex_matchcheck =~ '('
|
||||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
if !s:tex_nospell
|
||||||
else
|
syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
|
||||||
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
else
|
||||||
|
syn region texParen start="(" end=")" transparent contains=@texMatchGroup
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if !s:tex_no_error
|
if !s:tex_no_error
|
||||||
syn match texError "[}\])]"
|
if s:tex_matchcheck =~ '('
|
||||||
|
syn match texError "[}\]]"
|
||||||
|
else
|
||||||
|
syn match texError "[}\])]"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if s:tex_fast =~# 'M'
|
if s:tex_fast =~# 'M'
|
||||||
if !exists("g:tex_no_math")
|
if !exists("g:tex_no_math")
|
||||||
@@ -756,7 +775,7 @@ if has("conceal") && &enc == 'utf-8'
|
|||||||
\ ['ldots' , '…'],
|
\ ['ldots' , '…'],
|
||||||
\ ['le' , '≤'],
|
\ ['le' , '≤'],
|
||||||
\ ['left|' , '|'],
|
\ ['left|' , '|'],
|
||||||
\ ['left\|' , '‖'],
|
\ ['left\\|' , '‖'],
|
||||||
\ ['left(' , '('],
|
\ ['left(' , '('],
|
||||||
\ ['left\[' , '['],
|
\ ['left\[' , '['],
|
||||||
\ ['left\\{' , '{'],
|
\ ['left\\{' , '{'],
|
||||||
|
|||||||
Reference in New Issue
Block a user