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/bib.vim | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) (limited to 'runtime/syntax/bib.vim') diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index 8bd0528e1e..24b80b51b7 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -8,11 +8,8 @@ " Initialization " ============== -" 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 @@ -91,11 +88,7 @@ syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bib syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField " Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce " an error, so we explicitly distinguish versions with and without folding functionality: -if version < 600 - syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment -else - syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment -endif +syn region bibEntry start=/@\S\+\s*[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment syn region bibComment2 start=/@Comment\s*[{(]/ end=/^\s*[})]/me=e-1 contains=@bibCommentContents nextgroup=bibEntry " Synchronization @@ -107,25 +100,18 @@ syn sync minlines=50 " Highlighting defaults " ===================== " Define the default highlighting. -" 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_bib_syn_inits") - if version < 508 - let did_bib_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink bibType Identifier - HiLink bibEntryKw Statement - HiLink bibNSEntryKw PreProc - HiLink bibKey Special - HiLink bibVariable Constant - HiLink bibUnescapedSpecial Error - HiLink bibComment Comment - HiLink bibComment2 Comment - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link + +HiLink bibType Identifier +HiLink bibEntryKw Statement +HiLink bibNSEntryKw PreProc +HiLink bibKey Special +HiLink bibVariable Constant +HiLink bibUnescapedSpecial Error +HiLink bibComment Comment +HiLink bibComment2 Comment +delcommand HiLink let b:current_syntax = "bib" -- 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/bib.vim | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'runtime/syntax/bib.vim') diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index 24b80b51b7..f96553ec8d 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -101,17 +101,15 @@ syn sync minlines=50 " ===================== " Define the default highlighting. " Only when an item doesn't have highlighting yet -command -nargs=+ HiLink hi def link - -HiLink bibType Identifier -HiLink bibEntryKw Statement -HiLink bibNSEntryKw PreProc -HiLink bibKey Special -HiLink bibVariable Constant -HiLink bibUnescapedSpecial Error -HiLink bibComment Comment -HiLink bibComment2 Comment -delcommand HiLink + +hi def link bibType Identifier +hi def link bibEntryKw Statement +hi def link bibNSEntryKw PreProc +hi def link bibKey Special +hi def link bibVariable Constant +hi def link bibUnescapedSpecial Error +hi def link bibComment Comment +hi def link bibComment2 Comment let b:current_syntax = "bib" -- cgit From 0d565d62ae857fd8e8f8c7f1457579156a76968d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 28 Apr 2017 21:40:21 +0200 Subject: vim-patch:220adb1e9f9e A few more runtime updates. https://github.com/vim/vim/commit/220adb1e9f9e0b27d28185167d2730bf2f93057d --- runtime/syntax/bib.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/syntax/bib.vim') diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index f96553ec8d..f2b99e961b 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -2,7 +2,7 @@ " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige " Filenames: *.bib -" Last Change: 2016 May 31 +" Last Change: 2016 Sep 12 " Thanks to those who pointed out problems with this file or supplied fixes! @@ -71,7 +71,7 @@ syn keyword bibNSEntryKw contained mrclass mrnumber mrreviewer fjournal coden " Clusters " ======== -syn cluster bibVarContents contains=bibUnescapedSpecial,bibBrace,bibParen +syn cluster bibVarContents contains=bibUnescapedSpecial,bibBrace,bibParen,bibMath " This cluster is empty but things can be added externally: "syn cluster bibCommentContents @@ -81,6 +81,7 @@ syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField syn match bibVariable contained /[^{}," \t=]/ syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry +syn region bibMath contained start=/\$/ end=/\$/ skip=/\(\\\$\)/ syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents -- cgit From 4175dfac9a91e30d01e5aec6b45ed81e0288aaf9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 7 Nov 2017 20:43:11 +0100 Subject: vim-patch:01164a6546b4 Long overdue runtime update. https://github.com/vim/vim/commit/01164a6546b4c635daf96a1f17d1cb2d07f32a66 --- runtime/syntax/bib.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/syntax/bib.vim') diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index f2b99e961b..ac8dcda678 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -2,7 +2,7 @@ " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige " Filenames: *.bib -" Last Change: 2016 Sep 12 +" Last Change: 2017 Sep 29 " Thanks to those who pointed out problems with this file or supplied fixes! @@ -81,16 +81,18 @@ syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField syn match bibVariable contained /[^{}," \t=]/ syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry -syn region bibMath contained start=/\$/ end=/\$/ skip=/\(\\\$\)/ +syn region bibMath contained start=/\(\\\)\@