aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/tex.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/tex.vim')
-rw-r--r--runtime/syntax/tex.vim37
1 files changed, 26 insertions, 11 deletions
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 363c781d0f..b3a8f96b6b 100644
--- a/runtime/syntax/tex.vim
+++ b/runtime/syntax/tex.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
-" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: May 14, 2019
-" Version: 114
+" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Last Change: Jun 07, 2020
+" Version: 118
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -147,6 +147,11 @@ if exists("g:tex_nospell") && g:tex_nospell
else
let s:tex_nospell = 0
endif
+if exists("g:tex_excludematcher")
+ let s:tex_excludematcher= g:tex_excludematcher
+else
+ let s:tex_excludematcher= 0
+endif
" Clusters: {{{1
" --------
@@ -156,8 +161,12 @@ if !s:tex_no_error
endif
syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texEmphStyle,texNoSpell
-syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell
-syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texEmphStyle,texItalBoldStyle,texNoSpell
+syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell
+syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texEmphStyle,texItalBoldStyle,texNoSpell
+if !s:tex_excludematcher
+ syn cluster texBoldGroup add=texMatcher
+ syn cluster texItalGroup add=texMatcher
+endif
if !s:tex_nospell
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell
@@ -305,11 +314,6 @@ if s:tex_conceal !~# 'b'
endif
syn match texTypeStyle "\\textmd\>"
syn match texTypeStyle "\\textrm\>"
-syn match texTypeStyle "\\textsc\>"
-syn match texTypeStyle "\\textsf\>"
-syn match texTypeStyle "\\textsl\>"
-syn match texTypeStyle "\\texttt\>"
-syn match texTypeStyle "\\textup\>"
syn match texTypeStyle "\\mathbb\>"
syn match texTypeStyle "\\mathbf\>"
@@ -386,12 +390,18 @@ if s:tex_fast =~# 'b'
syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
syn region texEmphStyle matchgroup=texTypeStyle start="\\emph\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\texts[cfl]\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\textup\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\texttt\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
else
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup
syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup
syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup
syn region texEmphStyle matchgroup=texTypeStyle start="\\emph\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\texts[cfl]\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\textup\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup
+ syn region texEmphStyle matchgroup=texTypeStyle start="\\texttt\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup
endif
endif
endif
@@ -624,7 +634,7 @@ if s:tex_fast =~# 'r'
syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
endif
-syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
+syn match texRefZone '\\cite\%([tp]\*\=\)\=\>' nextgroup=texRefOption,texCite
" Handle newcommand, newenvironment : {{{1
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
@@ -745,6 +755,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['lceil' , '⌈'],
\ ['ldots' , '…'],
\ ['le' , '≤'],
+ \ ['left|' , '|'],
+ \ ['left\|' , '‖'],
\ ['left(' , '('],
\ ['left\[' , '['],
\ ['left\\{' , '{'],
@@ -795,6 +807,8 @@ if has("conceal") && &enc == 'utf-8'
\ ['quad' , ' '],
\ ['qquad' , ' '],
\ ['rfloor' , '⌋'],
+ \ ['right|' , '|'],
+ \ ['right\\|' , '‖'],
\ ['right)' , ')'],
\ ['right]' , ']'],
\ ['right\\}' , '}'],
@@ -1047,6 +1061,7 @@ if has("conceal") && &enc == 'utf-8'
call s:SuperSub('texSuperscript','\^','R','ᴿ')
call s:SuperSub('texSuperscript','\^','T','ᵀ')
call s:SuperSub('texSuperscript','\^','U','ᵁ')
+ call s:SuperSub('texSuperscript','\^','V','ⱽ')
call s:SuperSub('texSuperscript','\^','W','ᵂ')
call s:SuperSub('texSuperscript','\^',',','︐')
call s:SuperSub('texSuperscript','\^',':','︓')