comparison runtime/syntax/tex.vim @ 21499:3a1ed539ae2a

Update runtime files. Commit: https://github.com/vim/vim/commit/2547aa930b59f5e2bcb70e81d5a57ed461e59b4f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 26 17:00:44 2020 +0200 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Jul 2020 17:15:05 +0200
parents 83cfa1ef1bf2
children 4d76b3e07c07
comparison
equal deleted inserted replaced
21498:134699e667ee 21499:3a1ed539ae2a
1 " Vim syntax file 1 " Vim syntax file
2 " Language: TeX 2 " Language: TeX
3 " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> 3 " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
4 " Last Change: Jun 07, 2020 4 " Last Change: Jun 29, 2020
5 " Version: 118 5 " Version: 119
6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
7 " 7 "
8 " Notes: {{{1 8 " Notes: {{{1
9 " 9 "
10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries, 10 " 1. If you have a \begin{verbatim} that appears to overrun its boundaries,
145 if exists("g:tex_nospell") && g:tex_nospell 145 if exists("g:tex_nospell") && g:tex_nospell
146 let s:tex_nospell = 1 146 let s:tex_nospell = 1
147 else 147 else
148 let s:tex_nospell = 0 148 let s:tex_nospell = 0
149 endif 149 endif
150 if exists("g:tex_matchcheck")
151 let s:tex_matchcheck= g:tex_matchcheck
152 else
153 let s:tex_matchcheck= '[({[]'
154 endif
150 if exists("g:tex_excludematcher") 155 if exists("g:tex_excludematcher")
151 let s:tex_excludematcher= g:tex_excludematcher 156 let s:tex_excludematcher= g:tex_excludematcher
152 else 157 else
153 let s:tex_excludematcher= 0 158 let s:tex_excludematcher= 0
154 endif 159 endif
203 syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol 208 syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
204 syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol 209 syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol
205 endif 210 endif
206 endif 211 endif
207 212
208 " Try to flag {} and () mismatches: {{{1 213 " Try to flag {}, [], and () mismatches: {{{1
209 if s:tex_fast =~# 'm' 214 if s:tex_fast =~# 'm'
210 if !s:tex_no_error 215 if !s:tex_no_error
211 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError 216 if s:tex_matchcheck =~ '{'
212 syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell 217 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError
213 syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError 218 syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError
214 syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell 219 endif
220 if s:tex_matchcheck =~ '\['
221 syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell
222 syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell
223 endif
215 else 224 else
216 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup 225 if s:tex_matchcheck =~ '{'
217 syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup 226 syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup
218 syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup 227 syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup
219 syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup 228 endif
220 endif 229 if s:tex_matchcheck =~ '\['
221 if !s:tex_nospell 230 syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup
222 syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell 231 syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup
223 else 232 endif
224 syn region texParen start="(" end=")" transparent contains=@texMatchGroup 233 endif
234 if s:tex_matchcheck =~ '('
235 if !s:tex_nospell
236 syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell
237 else
238 syn region texParen start="(" end=")" transparent contains=@texMatchGroup
239 endif
225 endif 240 endif
226 endif 241 endif
227 if !s:tex_no_error 242 if !s:tex_no_error
228 syn match texError "[}\])]" 243 if s:tex_matchcheck =~ '('
244 syn match texError "[}\]]"
245 else
246 syn match texError "[}\])]"
247 endif
229 endif 248 endif
230 if s:tex_fast =~# 'M' 249 if s:tex_fast =~# 'M'
231 if !exists("g:tex_no_math") 250 if !exists("g:tex_no_math")
232 if !s:tex_no_error 251 if !s:tex_no_error
233 syn match texMathError "}" contained 252 syn match texMathError "}" contained
754 \ ['land' , '∧'], 773 \ ['land' , '∧'],
755 \ ['lceil' , '⌈'], 774 \ ['lceil' , '⌈'],
756 \ ['ldots' , '…'], 775 \ ['ldots' , '…'],
757 \ ['le' , '≤'], 776 \ ['le' , '≤'],
758 \ ['left|' , '|'], 777 \ ['left|' , '|'],
759 \ ['left\|' , '‖'], 778 \ ['left\\|' , '‖'],
760 \ ['left(' , '('], 779 \ ['left(' , '('],
761 \ ['left\[' , '['], 780 \ ['left\[' , '['],
762 \ ['left\\{' , '{'], 781 \ ['left\\{' , '{'],
763 \ ['leftarrow' , '←'], 782 \ ['leftarrow' , '←'],
764 \ ['Leftarrow' , '⇐'], 783 \ ['Leftarrow' , '⇐'],