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/json.vim | 61 +++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 35 deletions(-) (limited to 'runtime/syntax/json.vim') diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim index 1fdfea2d09..34c26d37d8 100644 --- a/runtime/syntax/json.vim +++ b/runtime/syntax/json.vim @@ -5,9 +5,8 @@ " Version: 0.12 if !exists("main_syntax") - 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 main_syntax = 'json' @@ -93,39 +92,31 @@ syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\ syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold " 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_json_syn_inits") - if version < 508 - let did_json_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink jsonPadding Operator - HiLink jsonString String - HiLink jsonTest Label - HiLink jsonEscape Special - HiLink jsonNumber Number - HiLink jsonBraces Delimiter - HiLink jsonNull Function - HiLink jsonBoolean Boolean - HiLink jsonKeyword Label - - if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) - HiLink jsonNumError Error - HiLink jsonCommentError Error - HiLink jsonSemicolonError Error - HiLink jsonTrailingCommaError Error - HiLink jsonMissingCommaError Error - HiLink jsonStringSQError Error - HiLink jsonNoQuotesError Error - HiLink jsonTripleQuotesError Error - endif - HiLink jsonQuote Quote - HiLink jsonNoise Noise - delcommand HiLink +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link +HiLink jsonPadding Operator +HiLink jsonString String +HiLink jsonTest Label +HiLink jsonEscape Special +HiLink jsonNumber Number +HiLink jsonBraces Delimiter +HiLink jsonNull Function +HiLink jsonBoolean Boolean +HiLink jsonKeyword Label + +if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) +HiLink jsonNumError Error +HiLink jsonCommentError Error +HiLink jsonSemicolonError Error +HiLink jsonTrailingCommaError Error +HiLink jsonMissingCommaError Error +HiLink jsonStringSQError Error +HiLink jsonNoQuotesError Error +HiLink jsonTripleQuotesError Error endif +HiLink jsonQuote Quote +HiLink jsonNoise Noise +delcommand HiLink let b:current_syntax = "json" if main_syntax == 'json' -- 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/json.vim | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'runtime/syntax/json.vim') diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim index 34c26d37d8..d80af84312 100644 --- a/runtime/syntax/json.vim +++ b/runtime/syntax/json.vim @@ -93,30 +93,28 @@ syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ tr " Define the default highlighting. " Only when an item doesn't have highlighting yet -command -nargs=+ HiLink hi def link -HiLink jsonPadding Operator -HiLink jsonString String -HiLink jsonTest Label -HiLink jsonEscape Special -HiLink jsonNumber Number -HiLink jsonBraces Delimiter -HiLink jsonNull Function -HiLink jsonBoolean Boolean -HiLink jsonKeyword Label +hi def link jsonPadding Operator +hi def link jsonString String +hi def link jsonTest Label +hi def link jsonEscape Special +hi def link jsonNumber Number +hi def link jsonBraces Delimiter +hi def link jsonNull Function +hi def link jsonBoolean Boolean +hi def link jsonKeyword Label if (!exists("g:vim_json_warnings") || g:vim_json_warnings==1) -HiLink jsonNumError Error -HiLink jsonCommentError Error -HiLink jsonSemicolonError Error -HiLink jsonTrailingCommaError Error -HiLink jsonMissingCommaError Error -HiLink jsonStringSQError Error -HiLink jsonNoQuotesError Error -HiLink jsonTripleQuotesError Error +hi def link jsonNumError Error +hi def link jsonCommentError Error +hi def link jsonSemicolonError Error +hi def link jsonTrailingCommaError Error +hi def link jsonMissingCommaError Error +hi def link jsonStringSQError Error +hi def link jsonNoQuotesError Error +hi def link jsonTripleQuotesError Error endif -HiLink jsonQuote Quote -HiLink jsonNoise Noise -delcommand HiLink +hi def link jsonQuote Quote +hi def link jsonNoise Noise let b:current_syntax = "json" if main_syntax == 'json' -- cgit