From cc421270ee6fd3fbd6e1e7bd766f71e1db30c7b5 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 21 Mar 2017 12:11:53 +0100 Subject: vim-patch:bc8801c9317eb Updated runtime files. https://github.com/vim/vim/commit/bc8801c9317eb721a2ee91322669f2dd5d136380 --- runtime/syntax/tex.vim | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index e560573e6e..c0982d84da 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Jun 17, 2016 -" Version: 97 +" Last Change: Jul 05, 2016 +" Version: 98 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -132,14 +132,20 @@ endif " One may override this iskeyword setting by providing " g:tex_isk if exists("g:tex_isk") - exe "setlocal isk=".g:tex_isk -elseif !has("patch-7.4.1142") - setl isk=48-57,a-z,A-Z,192-255 + if b:tex_stylish && g:tex_isk !~ '@' + let b:tex_isk= '@,'.g:tex_isk + else + let b:tex_isk= g:tex_isk + endif +elseif b:tex_stylish + let b:tex_isk="@,48-57,a-z,A-Z,192-255" else - syn iskeyword 48-57,a-z,A-Z,192-255 + let b:tex_isk="48-57,a-z,A-Z,192-255" endif -if b:tex_stylish - setlocal isk+=@-@ +if v:version > 704 || (v:version == 704 && has("patch-7.4.1142")) + exe "syn iskeyword ".b:tex_isk +else + exe "setl isk=".b:tex_isk endif if exists("g:tex_no_error") && g:tex_no_error let s:tex_no_error= 1 @@ -159,7 +165,7 @@ endif " Clusters: {{{1 " -------- -syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle +syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,@texMathZones if !s:tex_no_error syn cluster texCmdGroup add=texMathError endif @@ -447,9 +453,8 @@ if !exists("g:tex_no_math") call TexNewMathZone("G","gather",1) call TexNewMathZone("H","math",1) call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","subequations",0) - call TexNewMathZone("K","xalignat",1) - call TexNewMathZone("L","xxalignat",0) + call TexNewMathZone("J","xalignat",1) + call TexNewMathZone("K","xxalignat",0) " Inline Math Zones: {{{2 if s:tex_fast =~# 'M' @@ -481,8 +486,9 @@ if !exists("g:tex_no_math") " \left..something.. and \right..something.. support: {{{2 syn match texMathDelimBad contained "\S" if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm' - syn match texMathDelim contained "\\left\\{\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ - syn match texMathDelim contained "\\right\\}\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} + syn match texMathDelim contained "\\left\[" + syn match texMathDelim contained "\\left\\{" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ + syn match texMathDelim contained "\\right\\}" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} let s:texMathDelimList=[ \ ['<' , '<'] , \ ['>' , '>'] , -- cgit From a53409b564458f7a94c8fcd0725d1953dee58dce Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:06:44 +0200 Subject: vim-patch:89bcfda6834a Updated runtime files. Remove version checks for Vim older than 6.0. https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 --- runtime/syntax/tex.vim | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index c0982d84da..6cb27ea4ba 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -40,11 +40,8 @@ " using conceal mode :help tex-conceal " Version Clears: {{{1 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif let s:keepcpo= &cpo @@ -54,14 +51,8 @@ scriptencoding utf-8 " Define the default highlighting. {{{1 " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_tex_syntax_inits") - let did_tex_syntax_inits = 1 - if version < 508 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif -endif +let did_tex_syntax_inits = 1 +command -nargs=+ HiLink hi def link " by default, enable all region-based highlighting let s:tex_fast= "bcmMprsSvV" @@ -598,27 +589,17 @@ if s:tex_fast =~# 'v' syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell " listings package: syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" contains=@Spell - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" contains=@Spell + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell - else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell - endif + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell endif else syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" - if version < 600 - syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" - syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" else - if b:tex_stylish - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" - else - syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" - endif + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" endif endif endif -- cgit From 86b596dc7a49f1b148ef82a356b972b93ed0f6d4 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:14:34 +0200 Subject: vim-patch:f37506f60f87 Updated runtime files. Remove HiLink commands. https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c --- runtime/syntax/tex.vim | 139 ++++++++++++++++++++++++------------------------- 1 file changed, 67 insertions(+), 72 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 6cb27ea4ba..f4a0875da0 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Jul 05, 2016 -" Version: 98 +" Last Change: Aug 31, 2016 +" Version: 100 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -48,12 +48,6 @@ let s:keepcpo= &cpo set cpo&vim scriptencoding utf-8 -" Define the default highlighting. {{{1 -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -let did_tex_syntax_inits = 1 -command -nargs=+ HiLink hi def link - " by default, enable all region-based highlighting let s:tex_fast= "bcmMprsSvV" if exists("g:tex_fast") @@ -405,7 +399,7 @@ if !exists("g:tex_no_math") " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2 " Starred forms are created if starform is true. Starred " forms have syntax group and synchronization groups with a - " "S" appended. Handles: cluster, syntax, sync, and HiLink. + " "S" appended. Handles: cluster, syntax, sync, and hi link. fun! TexNewMathZone(sfx,mathzone,starform) let grpname = "texMathZone".a:sfx let syncname = "texSyncMathZone".a:sfx @@ -1260,86 +1254,87 @@ endif " --------------------------------------------------------------------- " Highlighting: {{{1 -if did_tex_syntax_inits == 1 - let did_tex_syntax_inits= 2 + +" Define the default highlighting. {{{1 +if !exists("skip_tex_syntax_inits") + " TeX highlighting groups which should share similar highlighting if !exists("g:tex_no_error") if !exists("g:tex_no_math") - HiLink texBadMath texError - HiLink texMathDelimBad texError - HiLink texMathError texError + hi def link texBadMath texError + hi def link texMathDelimBad texError + hi def link texMathError texError if !b:tex_stylish - HiLink texOnlyMath texError + hi def link texOnlyMath texError endif endif - HiLink texError Error + hi def link texError Error endif hi texBoldStyle gui=bold cterm=bold hi texItalStyle gui=italic cterm=italic hi texBoldItalStyle gui=bold,italic cterm=bold,italic hi texItalBoldStyle gui=bold,italic cterm=bold,italic - HiLink texCite texRefZone - HiLink texDefCmd texDef - HiLink texDefName texDef - HiLink texDocType texCmdName - HiLink texDocTypeArgs texCmdArgs - HiLink texInputFileOpt texCmdArgs - HiLink texInputCurlies texDelimiter - HiLink texLigature texSpecialChar + hi def link texCite texRefZone + hi def link texDefCmd texDef + hi def link texDefName texDef + hi def link texDocType texCmdName + hi def link texDocTypeArgs texCmdArgs + hi def link texInputFileOpt texCmdArgs + hi def link texInputCurlies texDelimiter + hi def link texLigature texSpecialChar if !exists("g:tex_no_math") - HiLink texMathDelimSet1 texMathDelim - HiLink texMathDelimSet2 texMathDelim - HiLink texMathDelimKey texMathDelim - HiLink texMathMatcher texMath - HiLink texAccent texStatement - HiLink texGreek texStatement - HiLink texSuperscript texStatement - HiLink texSubscript texStatement - HiLink texSuperscripts texSuperscript - HiLink texSubscripts texSubscript - HiLink texMathSymbol texStatement - HiLink texMathZoneV texMath - HiLink texMathZoneW texMath - HiLink texMathZoneX texMath - HiLink texMathZoneY texMath - HiLink texMathZoneV texMath - HiLink texMathZoneZ texMath + hi def link texMathDelimSet1 texMathDelim + hi def link texMathDelimSet2 texMathDelim + hi def link texMathDelimKey texMathDelim + hi def link texMathMatcher texMath + hi def link texAccent texStatement + hi def link texGreek texStatement + hi def link texSuperscript texStatement + hi def link texSubscript texStatement + hi def link texSuperscripts texSuperscript + hi def link texSubscripts texSubscript + hi def link texMathSymbol texStatement + hi def link texMathZoneV texMath + hi def link texMathZoneW texMath + hi def link texMathZoneX texMath + hi def link texMathZoneY texMath + hi def link texMathZoneV texMath + hi def link texMathZoneZ texMath endif - HiLink texBeginEnd texCmdName - HiLink texBeginEndName texSection - HiLink texSpaceCode texStatement - HiLink texStyleStatement texStatement - HiLink texTypeSize texType - HiLink texTypeStyle texType + hi def link texBeginEnd texCmdName + hi def link texBeginEndName texSection + hi def link texSpaceCode texStatement + hi def link texStyleStatement texStatement + hi def link texTypeSize texType + hi def link texTypeStyle texType " Basic TeX highlighting groups - HiLink texCmdArgs Number - HiLink texCmdName Statement - HiLink texComment Comment - HiLink texDef Statement - HiLink texDefParm Special - HiLink texDelimiter Delimiter - HiLink texInput Special - HiLink texInputFile Special - HiLink texLength Number - HiLink texMath Special - HiLink texMathDelim Statement - HiLink texMathOper Operator - HiLink texNewCmd Statement - HiLink texNewEnv Statement - HiLink texOption Number - HiLink texRefZone Special - HiLink texSection PreCondit - HiLink texSpaceCodeChar Special - HiLink texSpecialChar SpecialChar - HiLink texStatement Statement - HiLink texString String - HiLink texTodo Todo - HiLink texType Type - HiLink texZone PreCondit + hi def link texCmdArgs Number + hi def link texCmdName Statement + hi def link texComment Comment + hi def link texDef Statement + hi def link texDefParm Special + hi def link texDelimiter Delimiter + hi def link texInput Special + hi def link texInputFile Special + hi def link texLength Number + hi def link texMath Special + hi def link texMathDelim Statement + hi def link texMathOper Operator + hi def link texNewCmd Statement + hi def link texNewEnv Statement + hi def link texOption Number + hi def link texRefZone Special + hi def link texSection PreCondit + hi def link texSpaceCodeChar Special + hi def link texSpecialChar SpecialChar + hi def link texStatement Statement + hi def link texString String + hi def link texTodo Todo + hi def link texType Type + hi def link texZone PreCondit - delcommand HiLink endif " Cleanup: {{{1 -- cgit From 1e7806bd410f8ff0fcf5aec81370e57f1a57938e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 29 Apr 2017 01:47:52 +0200 Subject: vim-patch:6d5ad4c4118c Updated runtime files. https://github.com/vim/vim/commit/6d5ad4c4118cab5fd96db157621c3aa9af368edb --- runtime/syntax/tex.vim | 82 +++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 38 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index f4a0875da0..dd6690200f 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Aug 31, 2016 -" Version: 100 +" Last Change: Sep 20, 2016 +" Version: 101 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -160,15 +160,17 @@ syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,tex 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,texItalBoldStyle,texNoSpell 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,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,texZone,texInputFile,texOption,@Spell syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher else 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,texZone,texInputFile,texOption + 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,texZone,texInputFile,texOption syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher endif -syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ +syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter if !exists("g:tex_no_math") - syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ + syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ syn cluster texMatchGroup add=@texMathZones syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 @@ -199,9 +201,13 @@ if s:tex_fast =~# 'm' if !s:tex_no_error syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell + syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError + syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell else syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup + 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_nospell syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell @@ -399,7 +405,7 @@ if !exists("g:tex_no_math") " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2 " Starred forms are created if starform is true. Starred " forms have syntax group and synchronization groups with a - " "S" appended. Handles: cluster, syntax, sync, and hi link. + " "S" appended. Handles: cluster, syntax, sync, and highlighting. fun! TexNewMathZone(sfx,mathzone,starform) let grpname = "texMathZone".a:sfx let syncname = "texSyncMathZone".a:sfx @@ -1262,13 +1268,13 @@ if !exists("skip_tex_syntax_inits") if !exists("g:tex_no_error") if !exists("g:tex_no_math") hi def link texBadMath texError - hi def link texMathDelimBad texError + hi def link texMathDelimBad texError hi def link texMathError texError if !b:tex_stylish - hi def link texOnlyMath texError + hi def link texOnlyMath texError endif endif - hi def link texError Error + hi def link texError Error endif hi texBoldStyle gui=bold cterm=bold @@ -1277,59 +1283,59 @@ if !exists("skip_tex_syntax_inits") hi texItalBoldStyle gui=bold,italic cterm=bold,italic hi def link texCite texRefZone hi def link texDefCmd texDef - hi def link texDefName texDef - hi def link texDocType texCmdName - hi def link texDocTypeArgs texCmdArgs + hi def link texDefName texDef + hi def link texDocType texCmdName + hi def link texDocTypeArgs texCmdArgs hi def link texInputFileOpt texCmdArgs hi def link texInputCurlies texDelimiter - hi def link texLigature texSpecialChar + hi def link texLigature texSpecialChar if !exists("g:tex_no_math") hi def link texMathDelimSet1 texMathDelim hi def link texMathDelimSet2 texMathDelim hi def link texMathDelimKey texMathDelim hi def link texMathMatcher texMath - hi def link texAccent texStatement + hi def link texAccent texStatement hi def link texGreek texStatement hi def link texSuperscript texStatement - hi def link texSubscript texStatement + hi def link texSubscript texStatement hi def link texSuperscripts texSuperscript hi def link texSubscripts texSubscript - hi def link texMathSymbol texStatement - hi def link texMathZoneV texMath - hi def link texMathZoneW texMath - hi def link texMathZoneX texMath - hi def link texMathZoneY texMath - hi def link texMathZoneV texMath - hi def link texMathZoneZ texMath + hi def link texMathSymbol texStatement + hi def link texMathZoneV texMath + hi def link texMathZoneW texMath + hi def link texMathZoneX texMath + hi def link texMathZoneY texMath + hi def link texMathZoneV texMath + hi def link texMathZoneZ texMath endif - hi def link texBeginEnd texCmdName + hi def link texBeginEnd texCmdName hi def link texBeginEndName texSection - hi def link texSpaceCode texStatement + hi def link texSpaceCode texStatement hi def link texStyleStatement texStatement - hi def link texTypeSize texType - hi def link texTypeStyle texType + hi def link texTypeSize texType + hi def link texTypeStyle texType " Basic TeX highlighting groups - hi def link texCmdArgs Number - hi def link texCmdName Statement - hi def link texComment Comment - hi def link texDef Statement - hi def link texDefParm Special - hi def link texDelimiter Delimiter + hi def link texCmdArgs Number + hi def link texCmdName Statement + hi def link texComment Comment + hi def link texDef Statement + hi def link texDefParm Special + hi def link texDelimiter Delimiter hi def link texInput Special - hi def link texInputFile Special + hi def link texInputFile Special hi def link texLength Number hi def link texMath Special - hi def link texMathDelim Statement - hi def link texMathOper Operator + hi def link texMathDelim Statement + hi def link texMathOper Operator hi def link texNewCmd Statement hi def link texNewEnv Statement hi def link texOption Number - hi def link texRefZone Special - hi def link texSection PreCondit + hi def link texRefZone Special + hi def link texSection PreCondit hi def link texSpaceCodeChar Special - hi def link texSpecialChar SpecialChar - hi def link texStatement Statement + hi def link texSpecialChar SpecialChar + hi def link texStatement Statement hi def link texString String hi def link texTodo Todo hi def link texType Type -- cgit From ac107f7fddc59ef286e3ef3979afe0ea5e94633a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 1 May 2017 13:19:45 +0200 Subject: vim-patch:690afe1fef87 Update runtime files. https://github.com/vim/vim/commit/690afe1fef87e7eef6fb7343a926617d5f7315fa --- runtime/syntax/tex.vim | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index dd6690200f..c057b63657 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Sep 20, 2016 -" Version: 101 +" Last Change: Dec 07, 2016 +" Version: 102 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -494,13 +494,11 @@ if !exists("g:tex_no_math") \ ['\\backslash' , '\'] , \ ['\\downarrow' , '↓'] , \ ['\\Downarrow' , '⇓'] , - \ ['\\langle' , '<'] , \ ['\\lbrace' , '['] , \ ['\\lceil' , '⌈'] , \ ['\\lfloor' , '⌊'] , \ ['\\lgroup' , '⌊'] , \ ['\\lmoustache' , '⎛'] , - \ ['\\rangle' , '>'] , \ ['\\rbrace' , ']'] , \ ['\\rceil' , '⌉'] , \ ['\\rfloor' , '⌋'] , @@ -510,6 +508,15 @@ if !exists("g:tex_no_math") \ ['\\Uparrow' , '↑'] , \ ['\\updownarrow', '↕'] , \ ['\\Updownarrow', '⇕']] + if &ambw == "double" || exists("g:tex_usedblwidth") + let s:texMathDelimList= s:texMathDelimList + [ + \ ['\\langle' , '〈'] , + \ ['\\rangle' , '〉'] , + else + let s:texMathDelimList= s:texMathDelimList + [ + \ ['\\langle' , '<'] , + \ ['\\rangle' , '>']] + endif syn match texMathDelim '\\[bB]igg\=[lr]' contained nextgroup=texMathDelimBad for texmath in s:texMathDelimList exe "syn match texMathDelim '\\\\[bB]igg\\=[lr]\\=".texmath[0]."' contained conceal cchar=".texmath[1] @@ -680,6 +687,7 @@ if has("conceal") && &enc == 'utf-8' \ ['backslash' , '∖'], \ ['barwedge' , '⊼'], \ ['because' , '∵'], + \ ['beth' , 'ܒ'], \ ['between' , '≬'], \ ['bigcap' , '∩'], \ ['bigcirc' , '○'], @@ -699,6 +707,7 @@ if has("conceal") && &enc == 'utf-8' \ ['boxminus' , '⊟'], \ ['boxplus' , '⊞'], \ ['boxtimes' , '⊠'], + \ ['Box' , '☐'], \ ['bullet' , '•'], \ ['bumpeq' , '≏'], \ ['Bumpeq' , '≎'], @@ -748,6 +757,7 @@ if has("conceal") && &enc == 'utf-8' \ ['eqslantgtr' , '⪖'], \ ['eqslantless' , '⪕'], \ ['equiv' , '≡'], + \ ['eth' , 'ð'], \ ['exists' , '∃'], \ ['fallingdotseq' , '≒'], \ ['flat' , '♭'], @@ -757,6 +767,7 @@ if has("conceal") && &enc == 'utf-8' \ ['geq' , '≥'], \ ['geqq' , '≧'], \ ['gets' , '←'], + \ ['gimel' , 'ℷ'], \ ['gg' , '⟫'], \ ['gneqq' , '≩'], \ ['gtrdot' , '⋗'], @@ -767,13 +778,17 @@ if has("conceal") && &enc == 'utf-8' \ ['heartsuit' , '♡'], \ ['hookleftarrow' , '↩'], \ ['hookrightarrow' , '↪'], + \ ['iff' , '⇔'], \ ['iiint' , '∭'], \ ['iint' , '∬'], \ ['Im' , 'ℑ'], \ ['imath' , 'ɩ'], + \ ['implies' , '⇒'], \ ['in' , '∈'], \ ['infty' , '∞'], \ ['int' , '∫'], + \ ['jmath' , '𝚥'], + \ ['land' , '∧'], \ ['lceil' , '⌈'], \ ['ldots' , '…'], \ ['le' , '≤'], @@ -800,6 +815,7 @@ if has("conceal") && &enc == 'utf-8' \ ['ll' , '≪'], \ ['lmoustache' , '╭'], \ ['lneqq' , '≨'], + \ ['lor' , '∨'], \ ['ltimes' , '⋉'], \ ['mapsto' , '↦'], \ ['measuredangle' , '∡'], @@ -826,6 +842,7 @@ if has("conceal") && &enc == 'utf-8' \ ['nless' , '≮'], \ ['nmid' , '∤'], \ ['notin' , '∉'], + \ ['nparallel' , '∦'], \ ['nprec' , '⊀'], \ ['nrightarrow' , '↛'], \ ['nRightarrow' , '⇏'], @@ -927,10 +944,12 @@ if has("conceal") && &enc == 'utf-8' \ ['trianglerighteq', '⊵'], \ ['twoheadleftarrow', '↞'], \ ['twoheadrightarrow', '↠'], + \ ['ulcorner' , '⌜'], \ ['uparrow' , '↑'], \ ['Uparrow' , '⇑'], \ ['updownarrow' , '↕'], \ ['Updownarrow' , '⇕'], + \ ['urcorner' , '⌝'], \ ['varnothing' , '∅'], \ ['vartriangle' , '∆'], \ ['vdash' , '⊢'], @@ -946,6 +965,15 @@ if has("conceal") && &enc == 'utf-8' " \ ['jmath' , 'X'] " \ ['uminus' , 'X'] " \ ['uplus' , 'X'] + if &ambw == "double" || exists("g:tex_usedblwidth") + let s:texMathList= s:texMathList + [ + \ ['right\\rangle' , '〉'], + \ ['left\\langle' , '〈']] + else + let s:texMathList= s:texMathList + [ + \ ['right\\rangle' , '>'], + \ ['left\\langle' , '<']] + endif for texmath in s:texMathList if texmath[0] =~# '\w$' exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] -- cgit From deccd843edc9ecda04fae09bb550a90b1ba20632 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 1 May 2017 13:23:39 +0200 Subject: vim-patch:3df0173fa6d0 Updated runtime files. https://github.com/vim/vim/commit/3df0173fa6d0418e89ef4e9c1d04a97c92eec27c --- runtime/syntax/tex.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index c057b63657..ab19da329b 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Dec 07, 2016 -" Version: 102 +" Last Change: Jan 31, 2017 +" Version: 103 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -511,7 +511,7 @@ if !exists("g:tex_no_math") if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '〈'] , - \ ['\\rangle' , '〉'] , + \ ['\\rangle' , '〉']] else let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '<'] , @@ -594,8 +594,6 @@ endif if s:tex_fast =~# 'v' if exists("g:tex_verbspell") && g:tex_verbspell syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell - " listings package: - syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell if b:tex_stylish syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else -- cgit From 2ca59638ba04d11c397496d4f12f4d24e3461f0e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 7 Nov 2017 20:51:49 +0100 Subject: vim-patch:b0d45e7f5354 Update runtime files. https://github.com/vim/vim/commit/b0d45e7f5354375edd02afafde3bd37dac1515ff --- runtime/syntax/tex.vim | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index ab19da329b..6b9e1a8949 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell -" Last Change: Jan 31, 2017 -" Version: 103 +" Last Change: Oct 12, 2017 +" Version: 105 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -259,6 +259,7 @@ syn match texAccent +\\[=^.\~"`']+ syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" + " \begin{}/\end{} section markers: {{{1 syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName if s:tex_fast =~# 'm' @@ -511,7 +512,7 @@ if !exists("g:tex_no_math") if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '〈'] , - \ ['\\rangle' , '〉']] + \ ['\\rangle' , '〉'] , else let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '<'] , @@ -588,12 +589,21 @@ else endif endif +" %begin-include ... %end-include acts like a texDocZone for \include'd files. Permits spell checking, for example, in such files. +if !s:tex_nospell + TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup,@Spell +else + TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup +endif + " Separate lines used for verb` and verb# so that the end conditions {{{1 " will appropriately terminate. " If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. if s:tex_fast =~# 'v' if exists("g:tex_verbspell") && g:tex_verbspell syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell + " listings package: + syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell if b:tex_stylish syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell else @@ -1183,11 +1193,13 @@ if has("conceal") && &enc == 'utf-8' delfun s:SuperSub endif - " Accented characters: {{{2 + " Accented characters and Ligatures: {{{2 if s:tex_conceal =~# 'a' if b:tex_stylish syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 - syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 + syn match texLigature '--' + syn match texLigature '---' else fun! s:Accents(chr,...) let i= 1 @@ -1248,15 +1260,17 @@ if has("conceal") && &enc == 'utf-8' call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ') " \` \' \^ \" \~ \. \= \c \H \k \r \u \v delfun s:Accents - syn match texAccent '\\aa\>' conceal cchar=å - syn match texAccent '\\AA\>' conceal cchar=Å - syn match texAccent '\\o\>' conceal cchar=ø - syn match texAccent '\\O\>' conceal cchar=Ø + syn match texAccent '\\aa\>' conceal cchar=å + syn match texAccent '\\AA\>' conceal cchar=Å + syn match texAccent '\\o\>' conceal cchar=ø + syn match texAccent '\\O\>' conceal cchar=Ø syn match texLigature '\\AE\>' conceal cchar=Æ syn match texLigature '\\ae\>' conceal cchar=æ syn match texLigature '\\oe\>' conceal cchar=œ syn match texLigature '\\OE\>' conceal cchar=Œ syn match texLigature '\\ss\>' conceal cchar=ß + syn match texLigature '--' conceal cchar=– + syn match texLigature '---' conceal cchar=— endif endif endif -- cgit From d0b05e3c362205920a2fe9dc1b3a6c556b3f00d4 Mon Sep 17 00:00:00 2001 From: Hidehito Yabuuchi Date: Fri, 10 Nov 2017 09:38:08 +0900 Subject: runtime: Fix syntax error in `runtime/syntax/tex.vim` (#7518) --- runtime/syntax/tex.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/syntax/tex.vim') diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 6b9e1a8949..d5a5de65c8 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -512,7 +512,7 @@ if !exists("g:tex_no_math") if &ambw == "double" || exists("g:tex_usedblwidth") let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '〈'] , - \ ['\\rangle' , '〉'] , + \ ['\\rangle' , '〉']] else let s:texMathDelimList= s:texMathDelimList + [ \ ['\\langle' , '<'] , -- cgit