diff options
Diffstat (limited to 'runtime/syntax')
404 files changed, 10504 insertions, 14325 deletions
diff --git a/runtime/syntax/a65.vim b/runtime/syntax/a65.vim index 94198e6a42..b232e826cd 100644 --- a/runtime/syntax/a65.vim +++ b/runtime/syntax/a65.vim @@ -1,13 +1,10 @@ " Vim syntax file " Language: xa 6502 cross assembler " Maintainer: Clemens Kirchgatterer <clemens@1541.org> -" Last Change: 2014 Jan 05 +" Last Change: 2016 Aug 31 -" 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 @@ -138,29 +135,19 @@ syn match a65End excludenl /end$/ contained syn match a65Continue "\\$" contained " 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_a65_syntax_inits") - if version < 508 - let did_a65_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink a65Section Special - HiLink a65Address Special - HiLink a65Comment Comment - HiLink a65PreProc PreProc - HiLink a65Number Number - HiLink a65String String - HiLink a65Type Statement - HiLink a65Opcode Type - HiLink a65PC Error - HiLink a65Todo Todo - HiLink a65HiLo Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link a65Section Special +hi def link a65Address Special +hi def link a65Comment Comment +hi def link a65PreProc PreProc +hi def link a65Number Number +hi def link a65String String +hi def link a65Type Statement +hi def link a65Opcode Type +hi def link a65PC Error +hi def link a65Todo Todo +hi def link a65HiLo Number + let b:current_syntax = "a65" diff --git a/runtime/syntax/abap.vim b/runtime/syntax/abap.vim index 1d1f6afd0d..c2857a5f30 100644 --- a/runtime/syntax/abap.vim +++ b/runtime/syntax/abap.vim @@ -5,11 +5,8 @@ " Last Change: 2013 Jun 13 " Comment: Thanks to EPI-USE Labs for all your assistance. :) -" For version < 6.0: Clear all syntax items -" For version >= 6.0: 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 @@ -43,11 +40,7 @@ syn match abapStringEscape contained "``" syn match abapNumber "\-\=\<\d\+\>" syn region abapHex matchgroup=abapHex start="X'" end="'" -if version >= 600 - setlocal iskeyword=48-57,_,A-Z,a-z,/ -else - set iskeyword=48-57,_,A-Z,a-z,/ -endif +setlocal iskeyword=48-57,_,A-Z,a-z,/ syn match abapNamespace "\</\w\+/" @@ -175,38 +168,28 @@ syn keyword abapTodo contained TODO NOTE syn match abapTodo "\#EC\W\+\w\+" " 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_abap_syntax_inits") - if version < 508 - let did_abap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink abapError Error - HiLink abapComment Comment - HiLink abapInclude Include - HiLink abapStatement Statement - HiLink abapComplexStatement Statement - HiLink abapSpecial Special - HiLink abapNamespace Special - HiLink abapSpecialTables Special - HiLink abapSymbolOperator abapOperator - HiLink abapOperator Operator - HiLink abapCharString String - HiLink abapString String - HiLink abapFloat Float - HiLink abapTypes Type - HiLink abapSymbol Structure - HiLink abapStructure Structure - HiLink abapField Variable - HiLink abapNumber Number - HiLink abapHex Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link abapError Error +hi def link abapComment Comment +hi def link abapInclude Include +hi def link abapStatement Statement +hi def link abapComplexStatement Statement +hi def link abapSpecial Special +hi def link abapNamespace Special +hi def link abapSpecialTables Special +hi def link abapSymbolOperator abapOperator +hi def link abapOperator Operator +hi def link abapCharString String +hi def link abapString String +hi def link abapFloat Float +hi def link abapTypes Type +hi def link abapSymbol Structure +hi def link abapStructure Structure +hi def link abapField Variable +hi def link abapNumber Number +hi def link abapHex Number + let b:current_syntax = "abap" diff --git a/runtime/syntax/abaqus.vim b/runtime/syntax/abaqus.vim index cf4b0828fa..db2717f818 100644 --- a/runtime/syntax/abaqus.vim +++ b/runtime/syntax/abaqus.vim @@ -4,11 +4,8 @@ " Last Change: 2002 Feb 24 " Remark: Huge improvement in folding performance--see filetype plugin -" 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 @@ -25,24 +22,14 @@ syn match abaqusValue "=\s*[^,]*"lc=1 contained display syn match abaqusBadLine "^\s\+\*.*" display " 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_abaqus_syn_inits") - if version < 508 - let did_abaqus_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink abaqusComment Comment - HiLink abaqusKeyword Statement - HiLink abaqusParameter Identifier - HiLink abaqusValue Constant - HiLink abaqusBadLine Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link abaqusComment Comment +hi def link abaqusKeyword Statement +hi def link abaqusParameter Identifier +hi def link abaqusValue Constant +hi def link abaqusBadLine Error + let b:current_syntax = "abaqus" diff --git a/runtime/syntax/abc.vim b/runtime/syntax/abc.vim index 3dc098e730..1a7b3bf4be 100644 --- a/runtime/syntax/abc.vim +++ b/runtime/syntax/abc.vim @@ -4,11 +4,8 @@ " URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim " Last Change: 27th April 2001 -" 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 @@ -36,28 +33,18 @@ syn match abcComment "%.*$" " 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_abc_syn_inits") - if version < 508 - let did_abc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link abcComment Comment +hi def link abcHeadField Type +hi def link abcBodyField Special +hi def link abcBar Statement +hi def link abcTuple Statement +hi def link abcBroken Statement +hi def link abcTie Statement +hi def link abcGuitarChord Identifier +hi def link abcNote Constant - HiLink abcComment Comment - HiLink abcHeadField Type - HiLink abcBodyField Special - HiLink abcBar Statement - HiLink abcTuple Statement - HiLink abcBroken Statement - HiLink abcTie Statement - HiLink abcGuitarChord Identifier - HiLink abcNote Constant - - delcommand HiLink -endif let b:current_syntax = "abc" diff --git a/runtime/syntax/abel.vim b/runtime/syntax/abel.vim index 05e8dac913..67d7e4f786 100644 --- a/runtime/syntax/abel.vim +++ b/runtime/syntax/abel.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <johncook3@gmail.com> " Last Change: 2011 Dec 27 -" 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 @@ -123,48 +120,38 @@ endif syn sync minlines=1 " 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_abel_syn_inits") - if version < 508 - let did_abel_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink abelHeader abelStatement - HiLink abelSection abelStatement - HiLink abelDeclaration abelStatement - HiLink abelLogicalOperator abelOperator - HiLink abelRangeOperator abelOperator - HiLink abelAlternateOperator abelOperator - HiLink abelArithmeticOperator abelOperator - HiLink abelRelationalOperator abelOperator - HiLink abelAssignmentOperator abelOperator - HiLink abelTruthTableOperator abelOperator - HiLink abelSpecifier abelStatement - HiLink abelOperator abelStatement - HiLink abelStatement Statement - HiLink abelIdentifier Identifier - HiLink abelTypeId abelType - HiLink abelTypeIdChar abelType - HiLink abelType Type - HiLink abelNumber abelString - HiLink abelString String - HiLink abelConstant Constant - HiLink abelComment Comment - HiLink abelExtension abelSpecial - HiLink abelSpecialChar abelSpecial - HiLink abelTypeIdEnd abelSpecial - HiLink abelSpecial Special - HiLink abelDirective PreProc - HiLink abelTodo Todo - HiLink abelError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link abelHeader abelStatement +hi def link abelSection abelStatement +hi def link abelDeclaration abelStatement +hi def link abelLogicalOperator abelOperator +hi def link abelRangeOperator abelOperator +hi def link abelAlternateOperator abelOperator +hi def link abelArithmeticOperator abelOperator +hi def link abelRelationalOperator abelOperator +hi def link abelAssignmentOperator abelOperator +hi def link abelTruthTableOperator abelOperator +hi def link abelSpecifier abelStatement +hi def link abelOperator abelStatement +hi def link abelStatement Statement +hi def link abelIdentifier Identifier +hi def link abelTypeId abelType +hi def link abelTypeIdChar abelType +hi def link abelType Type +hi def link abelNumber abelString +hi def link abelString String +hi def link abelConstant Constant +hi def link abelComment Comment +hi def link abelExtension abelSpecial +hi def link abelSpecialChar abelSpecial +hi def link abelTypeIdEnd abelSpecial +hi def link abelSpecial Special +hi def link abelDirective PreProc +hi def link abelTodo Todo +hi def link abelError Error + let b:current_syntax = "abel" diff --git a/runtime/syntax/acedb.vim b/runtime/syntax/acedb.vim index 114e4aba9e..2c2cd701b7 100644 --- a/runtime/syntax/acedb.vim +++ b/runtime/syntax/acedb.vim @@ -7,11 +7,8 @@ " Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm " AceDB software is available from http://www.acedb.org -" 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 @@ -86,35 +83,25 @@ syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline " Rest of syntax highlighting rules start here " 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_acedb_syn_inits") - if version < 508 - let did_acedb_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink acedbMagic Special - HiLink acedbHyb Special - HiLink acedbType Type - HiLink acedbOption Type - HiLink acedbSubclass Type - HiLink acedbSubtag Include - HiLink acedbFlag Include - HiLink acedbTag Include - HiLink acedbClass Todo - HiLink acedbHelp Todo - HiLink acedbXref Identifier - HiLink acedbModifier Label - HiLink acedbComment Comment - HiLink acedbBlock ModeMsg - HiLink acedbNumber Number - HiLink acedbString String +hi def link acedbMagic Special +hi def link acedbHyb Special +hi def link acedbType Type +hi def link acedbOption Type +hi def link acedbSubclass Type +hi def link acedbSubtag Include +hi def link acedbFlag Include +hi def link acedbTag Include +hi def link acedbClass Todo +hi def link acedbHelp Todo +hi def link acedbXref Identifier +hi def link acedbModifier Label +hi def link acedbComment Comment +hi def link acedbBlock ModeMsg +hi def link acedbNumber Number +hi def link acedbString String - delcommand HiLink -endif let b:current_syntax = "acedb" diff --git a/runtime/syntax/aflex.vim b/runtime/syntax/aflex.vim index 592c98e4f3..aa8b5f84fe 100644 --- a/runtime/syntax/aflex.vim +++ b/runtime/syntax/aflex.vim @@ -7,21 +7,14 @@ " Comment: Replaced sourcing c.vim file by ada.vim and rename lex* " in aflex* -" 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 " Read the Ada syntax to start with -if version < 600 - so <sfile>:p:h/ada.vim -else - runtime! syntax/ada.vim - unlet b:current_syntax -endif +runtime! syntax/ada.vim +unlet b:current_syntax " --- AfLex stuff --- @@ -69,31 +62,20 @@ syn sync match aflexSyncPat groupthere aflexPatBlock "^<$" syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$" " 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_aflex_syntax_inits") - if version < 508 - let did_aflex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink aflexSlashQuote aflexPat - HiLink aflexBrace aflexPat - HiLink aflexAbbrvComment aflexPatComment - - HiLink aflexAbbrv SpecialChar - HiLink aflexAbbrvRegExp Macro - HiLink aflexCFunctions Function - HiLink aflexMorePat SpecialChar - HiLink aflexPat Function - HiLink aflexPatComment Comment - HiLink aflexPatString Function - HiLink aflexPatTag Special - HiLink aflexSep Delimiter - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link aflexSlashQuote aflexPat +hi def link aflexBrace aflexPat +hi def link aflexAbbrvComment aflexPatComment + +hi def link aflexAbbrv SpecialChar +hi def link aflexAbbrvRegExp Macro +hi def link aflexCFunctions Function +hi def link aflexMorePat SpecialChar +hi def link aflexPat Function +hi def link aflexPatComment Comment +hi def link aflexPatString Function +hi def link aflexPatTag Special +hi def link aflexSep Delimiter let b:current_syntax = "aflex" diff --git a/runtime/syntax/ahdl.vim b/runtime/syntax/ahdl.vim index b1417c374d..664bd3837d 100644 --- a/runtime/syntax/ahdl.vim +++ b/runtime/syntax/ahdl.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <john.cook@kla-tencor.com> " Last Change: 2001 Apr 25 -" 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 @@ -66,29 +63,19 @@ syn match ahdlSpecialChar "[\[\]().,;]" syn sync minlines=1 " 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_ahdl_syn_inits") - if version < 508 - let did_ahdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink ahdlNumber ahdlString - HiLink ahdlMegafunction ahdlIdentifier - HiLink ahdlSpecialChar SpecialChar - HiLink ahdlKeyword Statement - HiLink ahdlString String - HiLink ahdlComment Comment - HiLink ahdlIdentifier Identifier - HiLink ahdlOperator Operator - HiLink ahdlTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link ahdlNumber ahdlString +hi def link ahdlMegafunction ahdlIdentifier +hi def link ahdlSpecialChar SpecialChar +hi def link ahdlKeyword Statement +hi def link ahdlString String +hi def link ahdlComment Comment +hi def link ahdlIdentifier Identifier +hi def link ahdlOperator Operator +hi def link ahdlTodo Todo + let b:current_syntax = "ahdl" " vim:ts=8 diff --git a/runtime/syntax/amiga.vim b/runtime/syntax/amiga.vim index 4ccab1950f..eab9f66169 100644 --- a/runtime/syntax/amiga.vim +++ b/runtime/syntax/amiga.vim @@ -1,15 +1,12 @@ " Vim syntax file " Language: AmigaDos " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 7 +" Last Change: Aug 31, 2016 +" Version: 9 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_AMIGA -" 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 @@ -72,30 +69,20 @@ syn match amiComment ";.*$" contains=amiCommentGroup syn sync lines=50 " 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_amiga_syn_inits") - if version < 508 - let did_amiga_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink amiAlias Type - HiLink amiComment Comment - HiLink amiDev Type - HiLink amiEcho String - HiLink amiElse Statement - HiLink amiError Error - HiLink amiKey Statement - HiLink amiNumber Number - HiLink amiString String - HiLink amiTest Special - - delcommand HiLink -endif +if !exists("skip_amiga_syntax_inits") + + hi def link amiAlias Type + hi def link amiComment Comment + hi def link amiDev Type + hi def link amiEcho String + hi def link amiElse Statement + hi def link amiError Error + hi def link amiKey Statement + hi def link amiNumber Number + hi def link amiString String + hi def link amiTest Special +endif let b:current_syntax = "amiga" " vim:ts=15 diff --git a/runtime/syntax/aml.vim b/runtime/syntax/aml.vim index 7cb16f1c1f..46621edbe9 100644 --- a/runtime/syntax/aml.vim +++ b/runtime/syntax/aml.vim @@ -9,11 +9,8 @@ " of [], in order to avoid -read highlighted, " or [quote] strings highlighted -" 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 @@ -123,35 +120,25 @@ syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar " 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_aml_syntax_inits") - if version < 508 - let did_aml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink amlComment Comment - HiLink amlNumber Number - HiLink amlQuote String - HiLink amlVar Identifier - HiLink amlVar2 Identifier - HiLink amlFunction PreProc - HiLink amlDir Statement - HiLink amlDir2 Statement - HiLink amlDirSym Statement - HiLink amlOutput Statement - HiLink amlArcCmd ModeMsg - HiLink amlFormedCmd amlArcCmd - HiLink amlTabCmd amlArcCmd - HiLink amlInfoCmd amlArcCmd - HiLink amlVtrCmd amlArcCmd - HiLink amlFormed amlArcCmd - HiLink amlTab amlArcCmd - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link amlComment Comment +hi def link amlNumber Number +hi def link amlQuote String +hi def link amlVar Identifier +hi def link amlVar2 Identifier +hi def link amlFunction PreProc +hi def link amlDir Statement +hi def link amlDir2 Statement +hi def link amlDirSym Statement +hi def link amlOutput Statement +hi def link amlArcCmd ModeMsg +hi def link amlFormedCmd amlArcCmd +hi def link amlTabCmd amlArcCmd +hi def link amlInfoCmd amlArcCmd +hi def link amlVtrCmd amlArcCmd +hi def link amlFormed amlArcCmd +hi def link amlTab amlArcCmd + let b:current_syntax = "aml" diff --git a/runtime/syntax/ampl.vim b/runtime/syntax/ampl.vim index 7f4dfa9942..ad78f7d729 100644 --- a/runtime/syntax/ampl.vim +++ b/runtime/syntax/ampl.vim @@ -3,9 +3,8 @@ " Last Change: 2003 May 11 -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 @@ -115,33 +114,24 @@ syn keyword amplTodo contained TODO FIXME XXX -if version >= 508 || !exists("did_ampl_syntax_inits") - if version < 508 - let did_ampl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default methods for highlighting. Can be overridden later. - HiLink amplEntityKeyword Keyword - HiLink amplType Type - HiLink amplStatement Statement - HiLink amplOperators Operator - HiLink amplBasicOperators Operator - HiLink amplConditional Conditional - HiLink amplRepeat Repeat - HiLink amplStrings String - HiLink amplNumerics Number - HiLink amplSetFunction Function - HiLink amplBuiltInFunction Function - HiLink amplRandomGenerator Function - HiLink amplComment Comment - HiLink amplDotSuffix Special - HiLink amplPiecewise Special +" The default methods for highlighting. Can be overridden later. +hi def link amplEntityKeyword Keyword +hi def link amplType Type +hi def link amplStatement Statement +hi def link amplOperators Operator +hi def link amplBasicOperators Operator +hi def link amplConditional Conditional +hi def link amplRepeat Repeat +hi def link amplStrings String +hi def link amplNumerics Number +hi def link amplSetFunction Function +hi def link amplBuiltInFunction Function +hi def link amplRandomGenerator Function +hi def link amplComment Comment +hi def link amplDotSuffix Special +hi def link amplPiecewise Special - delcommand HiLink -endif let b:current_syntax = "ampl" diff --git a/runtime/syntax/antlr.vim b/runtime/syntax/antlr.vim index 19000293fb..9b0b061ae1 100644 --- a/runtime/syntax/antlr.vim +++ b/runtime/syntax/antlr.vim @@ -4,11 +4,8 @@ " LastChange: 02 May 2001 " Original: Comes from JavaCC.vim -" 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 @@ -18,12 +15,8 @@ endif " Those files usually have the extension *.jj " source the java.vim file -if version < 600 - so <sfile>:p:h/java.vim -else - runtime! syntax/java.vim - unlet b:current_syntax -endif +runtime! syntax/java.vim +unlet b:current_syntax "remove catching errors caused by wrong parenthesis (does not work in antlr "files) (first define them in case they have not been defined in java) @@ -53,17 +46,8 @@ syn match antlrSep "[|:]\|\.\." syn keyword antlrActionToken TOKEN SKIP MORE SPECIAL_TOKEN syn keyword antlrError DEBUG IGNORE_IN_BNF -if version >= 508 || !exists("did_antlr_syntax_inits") - if version < 508 - let did_antlr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink antlrSep Statement - HiLink antlrPackages Statement - delcommand HiLink -endif +hi def link antlrSep Statement +hi def link antlrPackages Statement let b:current_syntax = "antlr" diff --git a/runtime/syntax/apache.vim b/runtime/syntax/apache.vim index 85cda4095a..e2315db0d7 100644 --- a/runtime/syntax/apache.vim +++ b/runtime/syntax/apache.vim @@ -9,13 +9,9 @@ " make it really linewise? " + add `display' where appropriate -" Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case ignore @@ -178,37 +174,28 @@ syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP " Define the default highlighting -if version >= 508 || !exists("did_apache_syntax_inits") - if version < 508 - let did_apache_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink apacheAllowOverride apacheDeclaration - HiLink apacheAllowOverrideValue apacheOption - HiLink apacheAuthType apacheDeclaration - HiLink apacheAuthTypeValue apacheOption - HiLink apacheOptionOption apacheOption - HiLink apacheDeclaration Function - HiLink apacheAnything apacheOption - HiLink apacheOption Number - HiLink apacheComment Comment - HiLink apacheFixme Todo - HiLink apacheLimitSectionKeyword apacheLimitSection - HiLink apacheLimitSection apacheSection - HiLink apacheSection Label - HiLink apacheMethodOption Type - HiLink apacheAllowDeny Include - HiLink apacheAllowDenyValue Identifier - HiLink apacheOrder Special - HiLink apacheOrderValue String - HiLink apacheString String - HiLink apacheError Error - HiLink apacheUserID Number +hi def link apacheAllowOverride apacheDeclaration +hi def link apacheAllowOverrideValue apacheOption +hi def link apacheAuthType apacheDeclaration +hi def link apacheAuthTypeValue apacheOption +hi def link apacheOptionOption apacheOption +hi def link apacheDeclaration Function +hi def link apacheAnything apacheOption +hi def link apacheOption Number +hi def link apacheComment Comment +hi def link apacheFixme Todo +hi def link apacheLimitSectionKeyword apacheLimitSection +hi def link apacheLimitSection apacheSection +hi def link apacheSection Label +hi def link apacheMethodOption Type +hi def link apacheAllowDeny Include +hi def link apacheAllowDenyValue Identifier +hi def link apacheOrder Special +hi def link apacheOrderValue String +hi def link apacheString String +hi def link apacheError Error +hi def link apacheUserID Number - delcommand HiLink -endif let b:current_syntax = "apache" diff --git a/runtime/syntax/apachestyle.vim b/runtime/syntax/apachestyle.vim index 375fc70a9c..3695a11421 100644 --- a/runtime/syntax/apachestyle.vim +++ b/runtime/syntax/apachestyle.vim @@ -20,11 +20,8 @@ " </SubSection> " </Section> -" 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 @@ -41,25 +38,15 @@ syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 syn match apTagError contained /[^>]</ms=s+1 " 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_apachestyle_syn_inits") - if version < 508 - let did_apachestyle_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink apComment Comment - HiLink apOption Keyword - "HiLink apLastValue Identifier ugly? - HiLink apTag Special - HiLink apTagOption Identifier - HiLink apTagError Error +hi def link apComment Comment +hi def link apOption Keyword +"hi def link apLastValue Identifier ugly? +hi def link apTag Special +hi def link apTagOption Identifier +hi def link apTagError Error - delcommand HiLink -endif let b:current_syntax = "apachestyle" " vim: ts=8 diff --git a/runtime/syntax/aptconf.vim b/runtime/syntax/aptconf.vim index 7a31b2d15e..8cb14321e2 100644 --- a/runtime/syntax/aptconf.vim +++ b/runtime/syntax/aptconf.vim @@ -3,12 +3,9 @@ " Maintainer: Yann Amar <quidame@poivron.org> " Last Change: 2015 Dec 22 -" For version 5.x: Clear all syntax items -" For version 6.x and 7.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'aptconf' diff --git a/runtime/syntax/arduino.vim b/runtime/syntax/arduino.vim index 14299a441a..4a4ef82072 100644 --- a/runtime/syntax/arduino.vim +++ b/runtime/syntax/arduino.vim @@ -10,20 +10,13 @@ " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback! -" 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 " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim syn keyword arduinoConstant HIGH LOW INPUT OUTPUT syn keyword arduinoConstant DEC BIN HEX OCT BYTE diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim index e5f16c5bdc..492e3e8e92 100644 --- a/runtime/syntax/asm.vim +++ b/runtime/syntax/asm.vim @@ -7,11 +7,8 @@ " Thanks to Ori Avtalion for feedback on the comment markers! -" For version 5.x: Clear all syntax items -" For version 6.0 and later: 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 @@ -103,37 +100,27 @@ syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*" syn case match " 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_asm_syntax_inits") - if version < 508 - let did_asm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink asmSection Special - HiLink asmLabel Label - HiLink asmComment Comment - HiLink asmTodo Todo - HiLink asmDirective Statement - - HiLink asmInclude Include - HiLink asmCond PreCondit - HiLink asmMacro Macro - - HiLink hexNumber Number - HiLink decNumber Number - HiLink octNumber Number - HiLink binNumber Number - - HiLink asmIdentifier Identifier - HiLink asmType Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link asmSection Special +hi def link asmLabel Label +hi def link asmComment Comment +hi def link asmTodo Todo +hi def link asmDirective Statement + +hi def link asmInclude Include +hi def link asmCond PreCondit +hi def link asmMacro Macro + +hi def link hexNumber Number +hi def link decNumber Number +hi def link octNumber Number +hi def link binNumber Number + +hi def link asmIdentifier Identifier +hi def link asmType Type + let b:current_syntax = "asm" diff --git a/runtime/syntax/asm68k.vim b/runtime/syntax/asm68k.vim index cd23517cad..1607507909 100644 --- a/runtime/syntax/asm68k.vim +++ b/runtime/syntax/asm68k.vim @@ -8,11 +8,8 @@ " Feel free to contribute... " -" 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 @@ -328,63 +325,53 @@ syn match asm68kDirective "\<XREF\(\.S\)\=\s" syn case match " 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_asm68k_syntax_inits") - if version < 508 - let did_asm68k_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " Comment Constant Error Identifier PreProc Special Statement Todo Type - " - " Constant Boolean Character Number String - " Identifier Function - " PreProc Define Include Macro PreCondit - " Special Debug Delimiter SpecialChar SpecialComment Tag - " Statement Conditional Exception Keyword Label Operator Repeat - " Type StorageClass Structure Typedef - - HiLink asm68kComment Comment - HiLink asm68kTodo Todo - - HiLink hexNumber Number " Constant - HiLink octNumber Number " Constant - HiLink binNumber Number " Constant - HiLink decNumber Number " Constant - HiLink floatNumber Number " Constant - HiLink floatExponent Number " Constant - HiLink floatE SpecialChar " Statement - "HiLink floatE Number " Constant - - HiLink asm68kImmediate SpecialChar " Statement - "HiLink asm68kSymbol Constant - - HiLink asm68kString String " Constant - HiLink asm68kCharError Error - HiLink asm68kStringError Error - - HiLink asm68kReg Identifier - HiLink asm68kOperator Identifier - - HiLink asm68kInclude Include " PreProc - HiLink asm68kMacro Macro " PreProc - HiLink asm68kMacroParam Keyword " Statement - - HiLink asm68kDirective Special - HiLink asm68kPreCond Special - - - HiLink asm68kOpcode Statement - HiLink asm68kCond Conditional " Statement - HiLink asm68kRepeat Repeat " Statement - - HiLink asm68kLabel Type - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" Comment Constant Error Identifier PreProc Special Statement Todo Type +" +" Constant Boolean Character Number String +" Identifier Function +" PreProc Define Include Macro PreCondit +" Special Debug Delimiter SpecialChar SpecialComment Tag +" Statement Conditional Exception Keyword Label Operator Repeat +" Type StorageClass Structure Typedef + +hi def link asm68kComment Comment +hi def link asm68kTodo Todo + +hi def link hexNumber Number " Constant +hi def link octNumber Number " Constant +hi def link binNumber Number " Constant +hi def link decNumber Number " Constant +hi def link floatNumber Number " Constant +hi def link floatExponent Number " Constant +hi def link floatE SpecialChar " Statement +"hi def link floatE Number " Constant + +hi def link asm68kImmediate SpecialChar " Statement +"hi def link asm68kSymbol Constant + +hi def link asm68kString String " Constant +hi def link asm68kCharError Error +hi def link asm68kStringError Error + +hi def link asm68kReg Identifier +hi def link asm68kOperator Identifier + +hi def link asm68kInclude Include " PreProc +hi def link asm68kMacro Macro " PreProc +hi def link asm68kMacroParam Keyword " Statement + +hi def link asm68kDirective Special +hi def link asm68kPreCond Special + + +hi def link asm68kOpcode Statement +hi def link asm68kCond Conditional " Statement +hi def link asm68kRepeat Repeat " Statement + +hi def link asm68kLabel Type let b:current_syntax = "asm68k" diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim index 48699d89c5..8560fb7ae4 100644 --- a/runtime/syntax/asmh8300.vim +++ b/runtime/syntax/asmh8300.vim @@ -3,11 +3,8 @@ " Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com> " Last Change: 2002 Sep 19 -" 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 @@ -52,33 +49,19 @@ syn case match " Read the general asm syntax -if version < 600 - source <sfile>:p:h/asm.vim -else - runtime! syntax/asm.vim -endif +runtime! syntax/asm.vim " 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_hitachi_syntax_inits") - if version < 508 - let did_hitachi_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink asmOpcode Statement - HiLink asmRegister Identifier +hi def link asmOpcode Statement +hi def link asmRegister Identifier - " My default-color overrides: - "hi asmOpcode ctermfg=yellow - "hi asmReg ctermfg=lightmagenta +" My default-color overrides: +"hi asmOpcode ctermfg=yellow +"hi asmReg ctermfg=lightmagenta - delcommand HiLink -endif let b:current_syntax = "asmh8300" diff --git a/runtime/syntax/asn.vim b/runtime/syntax/asn.vim index 28c8efba95..e90c7e079c 100644 --- a/runtime/syntax/asn.vim +++ b/runtime/syntax/asn.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/asn.vim " Last Change: 2012 Oct 05 -" 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 @@ -50,34 +47,24 @@ syn match asnBraces "[{}]" syn sync ccomment asnComment " 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_asn_syn_inits") - if version < 508 - let did_asn_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink asnDefinition Function - HiLink asnBraces Function - HiLink asnStructure Statement - HiLink asnBoolValue Boolean - HiLink asnSpecial Special - HiLink asnString String - HiLink asnCharacter Character - HiLink asnSpecialCharacter asnSpecial - HiLink asnNumber asnValue - HiLink asnComment Comment - HiLink asnLineComment asnComment - HiLink asnType Type - HiLink asnTypeInfo PreProc - HiLink asnValue Number - HiLink asnExternal Include - HiLink asnTagModifier Function - HiLink asnFieldOption Type - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link asnDefinition Function +hi def link asnBraces Function +hi def link asnStructure Statement +hi def link asnBoolValue Boolean +hi def link asnSpecial Special +hi def link asnString String +hi def link asnCharacter Character +hi def link asnSpecialCharacter asnSpecial +hi def link asnNumber asnValue +hi def link asnComment Comment +hi def link asnLineComment asnComment +hi def link asnType Type +hi def link asnTypeInfo PreProc +hi def link asnValue Number +hi def link asnExternal Include +hi def link asnTagModifier Function +hi def link asnFieldOption Type let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/aspperl.vim b/runtime/syntax/aspperl.vim index 0f7ef46872..5a9abedb19 100644 --- a/runtime/syntax/aspperl.vim +++ b/runtime/syntax/aspperl.vim @@ -4,11 +4,8 @@ " URL: http://nim.dhs.org/~edh/aspperl.vim " Last Change: 2001 May 09 -" 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 @@ -16,14 +13,9 @@ if !exists("main_syntax") let main_syntax = 'perlscript' endif -if version < 600 - so <sfile>:p:h/html.vim - syn include @AspPerlScript <sfile>:p:h/perl.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syn include @AspPerlScript syntax/perl.vim -endif +runtime! syntax/html.vim +unlet b:current_syntax +syn include @AspPerlScript syntax/perl.vim syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags diff --git a/runtime/syntax/aspvbs.vim b/runtime/syntax/aspvbs.vim index f1435cb04b..f0861d8b5a 100644 --- a/runtime/syntax/aspvbs.vim +++ b/runtime/syntax/aspvbs.vim @@ -11,10 +11,8 @@ " Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in " VBScripts which I've been too scared to do. -" Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -22,11 +20,7 @@ if !exists("main_syntax") let main_syntax = 'aspvbs' endif -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags @@ -163,31 +157,21 @@ syn sync match htmlHighlight grouphere htmlTag "%>" " 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_aspvbs_syn_inits") - if version < 508 - let did_aspvbs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - "HiLink AspVBScript Special - HiLink AspVBSLineNumber Comment - HiLink AspVBSNumber Number - HiLink AspVBSError Error - HiLink AspVBSStatement Statement - HiLink AspVBSString String - HiLink AspVBSComment Comment - HiLink AspVBSTodo Todo - HiLink AspVBSFunction Identifier - HiLink AspVBSMethods PreProc - HiLink AspVBSEvents Special - HiLink AspVBSTypeSpecifier Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +"hi def link AspVBScript Special +hi def link AspVBSLineNumber Comment +hi def link AspVBSNumber Number +hi def link AspVBSError Error +hi def link AspVBSStatement Statement +hi def link AspVBSString String +hi def link AspVBSComment Comment +hi def link AspVBSTodo Todo +hi def link AspVBSFunction Identifier +hi def link AspVBSMethods PreProc +hi def link AspVBSEvents Special +hi def link AspVBSTypeSpecifier Type + let b:current_syntax = "aspvbs" diff --git a/runtime/syntax/asterisk.vim b/runtime/syntax/asterisk.vim index fd4ec39c91..4a922d3f11 100644 --- a/runtime/syntax/asterisk.vim +++ b/runtime/syntax/asterisk.vim @@ -5,10 +5,9 @@ " Updated for 1.2 by Tilghman Lesher (Corydon76) " Last Change: 2015 Feb 27 " version 0.4 -" -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 @@ -57,42 +56,33 @@ syn match asteriskSetting "^port\s*=\s*\d\{1,5}\s*$" contains=aste syn match asteriskSetting "^host\s*=\s*\(dynamic\|\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\|\([[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}\)\)" contains=asteriskIP,asteriskHostname " 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_conf_syntax_inits") - if version < 508 - let did_conf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link asteriskComment Comment +hi def link asteriskExten String +hi def link asteriskContext Preproc +hi def link asteriskPattern Type +hi def link asteriskApp Statement +hi def link asteriskInclude Preproc +hi def link asteriskIncludeBad Error +hi def link asteriskPriority Preproc +hi def link asteriskLabel Type +hi def link asteriskVar String +hi def link asteriskVarLen Function +hi def link asteriskExp Type +hi def link asteriskCodecsPermit Preproc +hi def link asteriskCodecs String +hi def link asteriskType Statement +hi def link asteriskTypeType Type +hi def link asteriskAuth String +hi def link asteriskAuthType Type +hi def link asteriskIPRange Identifier +hi def link asteriskIP Identifier +hi def link asteriskPort Identifier +hi def link asteriskHostname Identifier +hi def link asteriskSetting Statement +hi def link asteriskError Error - HiLink asteriskComment Comment - HiLink asteriskExten String - HiLink asteriskContext Preproc - HiLink asteriskPattern Type - HiLink asteriskApp Statement - HiLink asteriskInclude Preproc - HiLink asteriskIncludeBad Error - HiLink asteriskPriority Preproc - HiLink asteriskLabel Type - HiLink asteriskVar String - HiLink asteriskVarLen Function - HiLink asteriskExp Type - HiLink asteriskCodecsPermit Preproc - HiLink asteriskCodecs String - HiLink asteriskType Statement - HiLink asteriskTypeType Type - HiLink asteriskAuth String - HiLink asteriskAuthType Type - HiLink asteriskIPRange Identifier - HiLink asteriskIP Identifier - HiLink asteriskPort Identifier - HiLink asteriskHostname Identifier - HiLink asteriskSetting Statement - HiLink asteriskError Error - delcommand HiLink -endif let b:current_syntax = "asterisk" " vim: ts=8 sw=2 diff --git a/runtime/syntax/asteriskvm.vim b/runtime/syntax/asteriskvm.vim index a6c9dba418..fa55af5451 100644 --- a/runtime/syntax/asteriskvm.vim +++ b/runtime/syntax/asteriskvm.vim @@ -3,10 +3,9 @@ " Maintainer: Tilghman Lesher (Corydon76) " Last Change: 2006 Mar 21 " version 0.2 -" -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 @@ -33,28 +32,18 @@ syn match mailboxEmail ",\zs[^@=,]*@[[:alnum:]\-\.]\+\.[[:alpha syn match comma "[,|]" contained " 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_conf_syntax_inits") - if version < 508 - let did_conf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink asteriskvmComment Comment - HiLink asteriskvmContext Identifier - HiLink asteriskvmZone Type - HiLink zoneName String - HiLink zoneDef String - HiLink asteriskvmSetting Type - HiLink asteriskvmSettingBool Type - - HiLink asteriskvmMailbox Statement - HiLink mailboxEmail String - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link asteriskvmComment Comment +hi def link asteriskvmContext Identifier +hi def link asteriskvmZone Type +hi def link zoneName String +hi def link zoneDef String +hi def link asteriskvmSetting Type +hi def link asteriskvmSettingBool Type + +hi def link asteriskvmMailbox Statement +hi def link mailboxEmail String let b:current_syntax = "asteriskvm" diff --git a/runtime/syntax/atlas.vim b/runtime/syntax/atlas.vim index b8fe4356b5..1cdceab4ce 100644 --- a/runtime/syntax/atlas.vim +++ b/runtime/syntax/atlas.vim @@ -3,11 +3,8 @@ " Maintainer: Inaki Saez <jisaez@sfe.indra.es> " Last Change: 2001 May 09 -" 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 @@ -61,37 +58,27 @@ syn sync maxlines=100 " 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_atlas_syntax_inits") - if version < 508 - let did_atlas_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink atlasConditional Conditional - HiLink atlasRepeat Repeat - HiLink atlasStatement Statement - HiLink atlasNumber Number - HiLink atlasHexNumber Number - HiLink atlasOctalNumber Number - HiLink atlasBinNumber Number - HiLink atlasDecimalNumber Float - HiLink atlasFormatString String - HiLink atlasString String - HiLink atlasComment Comment - HiLink atlasComment2 Comment - HiLink atlasInclude Include - HiLink atlasDefine Macro - HiLink atlasReserved PreCondit - HiLink atlasStorageClass StorageClass - HiLink atlasIdentifier NONE - HiLink atlasSpecial Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link atlasConditional Conditional +hi def link atlasRepeat Repeat +hi def link atlasStatement Statement +hi def link atlasNumber Number +hi def link atlasHexNumber Number +hi def link atlasOctalNumber Number +hi def link atlasBinNumber Number +hi def link atlasDecimalNumber Float +hi def link atlasFormatString String +hi def link atlasString String +hi def link atlasComment Comment +hi def link atlasComment2 Comment +hi def link atlasInclude Include +hi def link atlasDefine Macro +hi def link atlasReserved PreCondit +hi def link atlasStorageClass StorageClass +hi def link atlasIdentifier NONE +hi def link atlasSpecial Special + let b:current_syntax = "atlas" diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim index eea2a9f38c..2a215a9e04 100644 --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -18,18 +18,12 @@ " EXTRA_SOURCES. " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif " Read the Makefile syntax to start with -if version < 600 - source <sfile>:p:h/make.vim -else - runtime! syntax/make.vim -endif +runtime! syntax/make.vim syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 @@ -59,34 +53,24 @@ syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIde syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution " 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_automake_syntax_inits") - if version < 508 - let did_automake_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink automakePrimary Statement - HiLink automakeSecondary Type - HiLink automakeExtra Special - HiLink automakeOptions Special - HiLink automakeClean Special - HiLink automakeSubdirs Statement - HiLink automakeConditional PreProc - HiLink automakeSubst PreProc - HiLink automakeComment1 makeComment - HiLink automakeComment2 makeComment - HiLink automakeMakeError makeError - HiLink automakeBadSubst makeError - HiLink automakeMakeDString makeDString - HiLink automakeMakeSString makeSString - HiLink automakeMakeBString makeBString +hi def link automakePrimary Statement +hi def link automakeSecondary Type +hi def link automakeExtra Special +hi def link automakeOptions Special +hi def link automakeClean Special +hi def link automakeSubdirs Statement +hi def link automakeConditional PreProc +hi def link automakeSubst PreProc +hi def link automakeComment1 makeComment +hi def link automakeComment2 makeComment +hi def link automakeMakeError makeError +hi def link automakeBadSubst makeError +hi def link automakeMakeDString makeDString +hi def link automakeMakeSString makeSString +hi def link automakeMakeBString makeBString - delcommand HiLink -endif let b:current_syntax = "automake" diff --git a/runtime/syntax/ave.vim b/runtime/syntax/ave.vim index 2a0a9d85af..e63e7d2c30 100644 --- a/runtime/syntax/ave.vim +++ b/runtime/syntax/ave.vim @@ -11,11 +11,8 @@ " I use some technologies to automatically load avenue scripts " into ArcView. -" 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 @@ -37,7 +34,7 @@ syn match aveNumber "[+-]\=\<[0-9]\+\>" " Operator syn keyword aveOperator or and max min xor mod by -" 'not' is a kind of a problem: Its an Operator as well as a method +" 'not' is a kind of a problem: It's an Operator as well as a method " 'not' is only marked as an Operator if not applied as method syn match aveOperator "[^\.]not[^a-zA-Z]" @@ -59,34 +56,24 @@ syn match aveTypos "==" syn match aveTypos "!=" " 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_ave_syn_inits") - if version < 508 - let did_ave_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting+yet - HiLink aveStatement Statement +hi def link aveStatement Statement - HiLink aveString String - HiLink aveNumber Number +hi def link aveString String +hi def link aveNumber Number - HiLink aveFixVariables Special - HiLink aveVariables Identifier - HiLink globalVariables Special - HiLink aveConst Special +hi def link aveFixVariables Special +hi def link aveVariables Identifier +hi def link globalVariables Special +hi def link aveConst Special - HiLink aveClassMethods Function +hi def link aveClassMethods Function - HiLink aveOperator Operator - HiLink aveComment Comment +hi def link aveOperator Operator +hi def link aveComment Comment - HiLink aveTypos Error +hi def link aveTypos Error - delcommand HiLink -endif let b:current_syntax = "ave" diff --git a/runtime/syntax/avra.vim b/runtime/syntax/avra.vim index ebf0aaff11..0e02bd8397 100644 --- a/runtime/syntax/avra.vim +++ b/runtime/syntax/avra.vim @@ -2,14 +2,12 @@ " Language: AVR Assembler (AVRA) " AVRA Home: http://avra.sourceforge.net/index.html " AVRA Version: 1.3.0 +" Last Update: 2016 Oct 7 " Maintainer: Marius Ghita <mhitza@gmail.com> let s:cpo_save = &cpo set cpo&vim -setlocal iskeyword=a-z,A-Z,48-57,.,_ -" 'isident' is a global option, better not set it -" setlocal isident=a-z,A-Z,48-57,.,_ syn case ignore syn keyword avraRegister r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 diff --git a/runtime/syntax/awk.vim b/runtime/syntax/awk.vim index ae0f217580..7c0682ce9f 100644 --- a/runtime/syntax/awk.vim +++ b/runtime/syntax/awk.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: awk, nawk, gawk, mawk " Maintainer: Antonio Colombo <azc100@gmail.com> -" Last Change: 2016 Jul 15 +" Last Change: 2016 Sep 05 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger " The AWK Programming Language, Addison-Wesley, 1988 @@ -71,6 +71,10 @@ syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART syn keyword awkVariables RT SYMTAB +" Arithmetic operators: +, and - take care of ++, and -- +syn match awkOperator "+\|-\|\*\|/\|%\|=" +syn match awkOperator "+=\|-=\|\*=\|/=\|%=" +syn match awkOperator "\^\|\^=" " Octal format character. syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}" @@ -124,11 +128,6 @@ syn case match "syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" -" Arithmetic operators: +, and - take care of ++, and -- -syn match awkOperator "+\|-\|\*\|/\|%\|=" -syn match awkOperator "+=\|-=\|\*=\|/=\|%=" -syn match awkOperator "^\|^=" - " Comparison expressions. syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!=" syn match awkExpression "\~\|\!\~" @@ -167,7 +166,6 @@ syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayE syn sync ccomment awkArray maxlines=10 " Define the default highlighting. -" Only used when an item doesn't have highlighting yet hi def link awkConditional Conditional hi def link awkFunction Function hi def link awkRepeat Repeat diff --git a/runtime/syntax/ayacc.vim b/runtime/syntax/ayacc.vim index fedd0e80a0..6fb6aec85d 100644 --- a/runtime/syntax/ayacc.vim +++ b/runtime/syntax/ayacc.vim @@ -6,21 +6,14 @@ " Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* " in ayacc* -" 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 " Read the Ada syntax to start with -if version < 600 - so <sfile>:p:h/ada.vim -else - runtime! syntax/ada.vim - unlet b:current_syntax -endif +runtime! syntax/ada.vim +unlet b:current_syntax let s:cpo_save = &cpo set cpo&vim @@ -54,35 +47,26 @@ syn match ayaccSep "^[ \t]*%}" syn match ayaccCurlyError "[{}]" syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup -if version >= 508 || !exists("did_ayacc_syntax_inits") - if version < 508 - let did_ayacc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " Internal ayacc highlighting links - HiLink ayaccBrkt ayaccStmt - HiLink ayaccKey ayaccStmt - HiLink ayaccOper ayaccStmt - HiLink ayaccUnionStart ayaccKey +" Internal ayacc highlighting links +hi def link ayaccBrkt ayaccStmt +hi def link ayaccKey ayaccStmt +hi def link ayaccOper ayaccStmt +hi def link ayaccUnionStart ayaccKey - " External ayacc highlighting links - HiLink ayaccCurly Delimiter - HiLink ayaccCurlyError Error - HiLink ayaccDefinition Function - HiLink ayaccDelim Function - HiLink ayaccKeyActn Special - HiLink ayaccSectionSep Todo - HiLink ayaccSep Delimiter - HiLink ayaccStmt Statement - HiLink ayaccType Type +" External ayacc highlighting links +hi def link ayaccCurly Delimiter +hi def link ayaccCurlyError Error +hi def link ayaccDefinition Function +hi def link ayaccDelim Function +hi def link ayaccKeyActn Special +hi def link ayaccSectionSep Todo +hi def link ayaccSep Delimiter +hi def link ayaccStmt Statement +hi def link ayaccType Type - " since Bram doesn't like my Delimiter :| - HiLink Delimiter Type - delcommand HiLink -endif +" since Bram doesn't like my Delimiter :| +hi def link Delimiter Type let b:current_syntax = "ayacc" diff --git a/runtime/syntax/b.vim b/runtime/syntax/b.vim index b470ab9ef3..01532be75d 100644 --- a/runtime/syntax/b.vim +++ b/runtime/syntax/b.vim @@ -5,11 +5,8 @@ " LastChange: 8 Dec 2007 -" 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 @@ -69,58 +66,48 @@ syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error syn sync ccomment bComment minlines=10 " 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_b_syntax_inits") - if version < 508 - let did_b_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink bLabel Label - HiLink bUserLabel Label - HiLink bConditional Conditional - HiLink bRepeat Repeat - HiLink bLogic Special - HiLink bCharacter Character - HiLink bSpecialCharacter bSpecial - HiLink bNumber Number - HiLink bFloat Float - HiLink bOctalError bError - HiLink bParenError bError -" HiLink bInParen bError - HiLink bCommentError bError - HiLink bBoolean Identifier - HiLink bConstant Identifier - HiLink bGuard Identifier - HiLink bOperator Operator - HiLink bKeywords Operator - HiLink bOps Identifier - HiLink bStructure Structure - HiLink bStorageClass StorageClass - HiLink bInclude Include - HiLink bPreProc PreProc - HiLink bDefine Macro - HiLink bIncluded bString - HiLink bError Error - HiLink bStatement Statement - HiLink bPreCondit PreCondit - HiLink bType Type - HiLink bCommentError bError - HiLink bCommentString bString - HiLink bComment2String bString - HiLink bCommentSkip bComment - HiLink bString String - HiLink bComment Comment - HiLink bSpecial SpecialChar - HiLink bTodo Todo - "hi link bIdentifier Identifier - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + + +" The default methods for highlighting. Can be overridden later +hi def link bLabel Label +hi def link bUserLabel Label +hi def link bConditional Conditional +hi def link bRepeat Repeat +hi def link bLogic Special +hi def link bCharacter Character +hi def link bSpecialCharacter bSpecial +hi def link bNumber Number +hi def link bFloat Float +hi def link bOctalError bError +hi def link bParenError bError +" hi def link bInParen bError +hi def link bCommentError bError +hi def link bBoolean Identifier +hi def link bConstant Identifier +hi def link bGuard Identifier +hi def link bOperator Operator +hi def link bKeywords Operator +hi def link bOps Identifier +hi def link bStructure Structure +hi def link bStorageClass StorageClass +hi def link bInclude Include +hi def link bPreProc PreProc +hi def link bDefine Macro +hi def link bIncluded bString +hi def link bError Error +hi def link bStatement Statement +hi def link bPreCondit PreCondit +hi def link bType Type +hi def link bCommentError bError +hi def link bCommentString bString +hi def link bComment2String bString +hi def link bCommentSkip bComment +hi def link bString String +hi def link bComment Comment +hi def link bSpecial SpecialChar +hi def link bTodo Todo +"hi link bIdentifier Identifier let b:current_syntax = "b" diff --git a/runtime/syntax/baan.vim b/runtime/syntax/baan.vim index 5009218b60..9a42a43918 100644 --- a/runtime/syntax/baan.vim +++ b/runtime/syntax/baan.vim @@ -4,15 +4,8 @@ " Originally owned by: Erwin Smit / Her van de Vliert " Last change: v1.17 2006/04/26 10:40:18 -" 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 - if exists("baan_fold") - unlet baan_fold - endif -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -1894,40 +1887,30 @@ syn keyword baanBshell bclm.productidlicensed syn keyword baanBshell bclm.set.desktop " 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_baan_syn_inits") - if version < 508 - let did_baan_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink baanConditional Conditional - HiLink baan3gl Statement - HiLink baan3glpre PreProc - HiLink baan4gl Statement - HiLink baan4glh Statement - HiLink baansql Statement - HiLink baansqlh Statement - HiLink baanDalHook Statement - HiLink baanNumber Number - HiLink baanString String - HiLink baanOpenStringError Error - HiLink baanConstant Constant - HiLink baanComment Comment - HiLink baanCommenth Comment - HiLink baanUncommented Comment - HiLink baanDLLUsage Comment - HiLink baanFunUsage Comment - HiLink baanIdentifier Normal - HiLink baanBshell Function - HiLink baanType Type - HiLink baanStorageClass StorageClass +hi def link baanConditional Conditional +hi def link baan3gl Statement +hi def link baan3glpre PreProc +hi def link baan4gl Statement +hi def link baan4glh Statement +hi def link baansql Statement +hi def link baansqlh Statement +hi def link baanDalHook Statement +hi def link baanNumber Number +hi def link baanString String +hi def link baanOpenStringError Error +hi def link baanConstant Constant +hi def link baanComment Comment +hi def link baanCommenth Comment +hi def link baanUncommented Comment +hi def link baanDLLUsage Comment +hi def link baanFunUsage Comment +hi def link baanIdentifier Normal +hi def link baanBshell Function +hi def link baanType Type +hi def link baanStorageClass StorageClass - delcommand HiLink -endif let b:current_syntax = "baan" diff --git a/runtime/syntax/basic.vim b/runtime/syntax/basic.vim index c72032da27..488ddc0ec4 100644 --- a/runtime/syntax/basic.vim +++ b/runtime/syntax/basic.vim @@ -8,11 +8,8 @@ " This syntax file not a complete implementation yet. Send suggestions to the " maintainer. -" 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 @@ -143,34 +140,24 @@ syn match basicFilenumber "#\d\+" syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR" " 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_basic_syntax_inits") - if version < 508 - let did_basic_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink basicLabel Label - HiLink basicConditional Conditional - HiLink basicRepeat Repeat - HiLink basicLineNumber Comment - HiLink basicNumber Number - HiLink basicError Error - HiLink basicStatement Statement - HiLink basicString String - HiLink basicComment Comment - HiLink basicSpecial Special - HiLink basicTodo Todo - HiLink basicFunction Identifier - HiLink basicTypeSpecifier Type - HiLink basicFilenumber basicTypeSpecifier - "hi basicMathsOperator term=bold cterm=bold gui=bold +hi def link basicLabel Label +hi def link basicConditional Conditional +hi def link basicRepeat Repeat +hi def link basicLineNumber Comment +hi def link basicNumber Number +hi def link basicError Error +hi def link basicStatement Statement +hi def link basicString String +hi def link basicComment Comment +hi def link basicSpecial Special +hi def link basicTodo Todo +hi def link basicFunction Identifier +hi def link basicTypeSpecifier Type +hi def link basicFilenumber basicTypeSpecifier +"hi basicMathsOperator term=bold cterm=bold gui=bold - delcommand HiLink -endif let b:current_syntax = "basic" diff --git a/runtime/syntax/bc.vim b/runtime/syntax/bc.vim index 965afc35b1..4cd9d6388a 100644 --- a/runtime/syntax/bc.vim +++ b/runtime/syntax/bc.vim @@ -5,11 +5,8 @@ " (Dominique Pelle added @Spell) " Available on: www.gjh.sk/~vlado/bc.vim -" 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 @@ -53,27 +50,17 @@ syn match bcParenError ")" syn case match " 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_bc_syntax_inits") - if version < 508 - let did_bc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink bcKeyword Statement - HiLink bcType Type - HiLink bcConstant Constant - HiLink bcNumber Number - HiLink bcComment Comment - HiLink bcString String - HiLink bcSpecialChar SpecialChar - HiLink bcParenError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link bcKeyword Statement +hi def link bcType Type +hi def link bcConstant Constant +hi def link bcNumber Number +hi def link bcComment Comment +hi def link bcString String +hi def link bcSpecialChar SpecialChar +hi def link bcParenError Error + let b:current_syntax = "bc" " vim: ts=8 diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim index 8bd0528e1e..f2b99e961b 100644 --- a/runtime/syntax/bib.vim +++ b/runtime/syntax/bib.vim @@ -2,17 +2,14 @@ " Language: BibTeX (bibliographic database format for (La)TeX) " Maintainer: Bernd Feige <Bernd.Feige@gmx.net> " 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! " 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 @@ -74,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 @@ -84,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 @@ -91,11 +89,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 +101,16 @@ 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 <args> - else - command -nargs=+ HiLink hi def link <args> - 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 + +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" diff --git a/runtime/syntax/bindzone.vim b/runtime/syntax/bindzone.vim index d599a85db2..df3c789d98 100644 --- a/runtime/syntax/bindzone.vim +++ b/runtime/syntax/bindzone.vim @@ -9,11 +9,8 @@ " " $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $ -" 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 @@ -70,40 +67,30 @@ syn region zoneParen contained start="(" end=")" contains=zoneSerial, syn match zoneComment /;.*/ " 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_bind_zone_syn_inits") - if version < 508 - let did_bind_zone_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink zoneDirective Macro - - HiLink zoneUnknown Error - - HiLink zoneOrigin Statement - HiLink zoneOwnerName Statement - HiLink zoneDomain Identifier - - HiLink zoneSpecial Special - HiLink zoneTTL Constant - HiLink zoneClass Include - HiLink zoneRRType Type - - HiLink zoneIPAddr Number - HiLink zoneIP6Addr Number - HiLink zoneText String - HiLink zoneNumber Number - HiLink zoneSerial Special - - HiLink zoneErrParen Error - HiLink zoneComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link zoneDirective Macro + +hi def link zoneUnknown Error + +hi def link zoneOrigin Statement +hi def link zoneOwnerName Statement +hi def link zoneDomain Identifier + +hi def link zoneSpecial Special +hi def link zoneTTL Constant +hi def link zoneClass Include +hi def link zoneRRType Type + +hi def link zoneIPAddr Number +hi def link zoneIP6Addr Number +hi def link zoneText String +hi def link zoneNumber Number +hi def link zoneSerial Special + +hi def link zoneErrParen Error +hi def link zoneComment Comment + let b:current_syntax = "bindzone" diff --git a/runtime/syntax/blank.vim b/runtime/syntax/blank.vim index 60251c966c..6d2e3fd7bd 100644 --- a/runtime/syntax/blank.vim +++ b/runtime/syntax/blank.vim @@ -3,11 +3,8 @@ " Maintainer: Rafal M. Sulejman <unefunge@friko2.onet.pl> " Last change: 2011 Dec 28 by Thilo Six -" 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 @@ -28,22 +25,12 @@ syn match blankNumber "\[[0-9]\+\]" syn case match " 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_blank_syntax_inits") - if version < 508 - let did_blank_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink blankInstruction Statement - HiLink blankNumber Number - HiLink blankString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link blankInstruction Statement +hi def link blankNumber Number +hi def link blankString String + let b:current_syntax = "blank" diff --git a/runtime/syntax/bst.vim b/runtime/syntax/bst.vim index e7836d7811..5ebef16460 100644 --- a/runtime/syntax/bst.vim +++ b/runtime/syntax/bst.vim @@ -4,21 +4,12 @@ " Filenames: *.bst " $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ -" 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 -if version < 600 - command -nargs=1 SetIsk set iskeyword=<args> -else - command -nargs=1 SetIsk setlocal iskeyword=<args> -endif -SetIsk 48-57,#,$,',.,A-Z,a-z -delcommand SetIsk +setlocal iskeyword=48-57,#,$,',.,A-Z,a-z syn case ignore @@ -62,27 +53,17 @@ syn keyword bstField title type syn keyword bstField volume year " 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_bst_syn_inits") - if version < 508 - let did_bst_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink bstComment Comment - HiLink bstString String - HiLink bstCommand PreProc - HiLink bstBuiltIn Statement - HiLink bstField Special - HiLink bstNumber Number - HiLink bstType Type - HiLink bstIdentifier Identifier - HiLink bstError Error - delcommand HiLink -endif +hi def link bstComment Comment +hi def link bstString String +hi def link bstCommand PreProc +hi def link bstBuiltIn Statement +hi def link bstField Special +hi def link bstNumber Number +hi def link bstType Type +hi def link bstIdentifier Identifier +hi def link bstError Error let b:current_syntax = "bst" diff --git a/runtime/syntax/btm.vim b/runtime/syntax/btm.vim index 4fd5b2db99..4f9253ff9f 100644 --- a/runtime/syntax/btm.vim +++ b/runtime/syntax/btm.vim @@ -11,11 +11,8 @@ "//- After unary operators like "defined" can assume token type. "// Should there be more of these? -" 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 @@ -184,45 +181,35 @@ syn keyword btmCommand unlock unset ver verify vol syn keyword btmCommand vscrput y " 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_btm_syntax_inits") - if version < 508 - let did_btm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink btmLabel Special - HiLink btmLabelMark Special - HiLink btmCmdDivider Special - HiLink btmConditional btmStatement - HiLink btmDotBoolOp btmStatement - HiLink btmRepeat btmStatement - HiLink btmEchoCommand btmStatement - HiLink btmEchoParam btmStatement - HiLink btmStatement Statement - HiLink btmTodo Todo - HiLink btmString String - HiLink btmNumber Number - HiLink btmComment Comment - HiLink btmArgument Identifier - HiLink btmVariable Identifier - HiLink btmEcho String - HiLink btmBIFMatch btmStatement - HiLink btmBuiltInFunc btmStatement - HiLink btmBuiltInVar btmStatement - HiLink btmSpecialVar btmStatement - HiLink btmCommand btmStatement - - "optional highlighting - "HiLink btmShowTab Error - "HiLink btmShowTabc Error - "hiLink btmIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link btmLabel Special +hi def link btmLabelMark Special +hi def link btmCmdDivider Special +hi def link btmConditional btmStatement +hi def link btmDotBoolOp btmStatement +hi def link btmRepeat btmStatement +hi def link btmEchoCommand btmStatement +hi def link btmEchoParam btmStatement +hi def link btmStatement Statement +hi def link btmTodo Todo +hi def link btmString String +hi def link btmNumber Number +hi def link btmComment Comment +hi def link btmArgument Identifier +hi def link btmVariable Identifier +hi def link btmEcho String +hi def link btmBIFMatch btmStatement +hi def link btmBuiltInFunc btmStatement +hi def link btmBuiltInVar btmStatement +hi def link btmSpecialVar btmStatement +hi def link btmCommand btmStatement + +"optional highlighting +"hi def link btmShowTab Error +"hi def link btmShowTabc Error +"hi def link btmIdentifier Identifier + let b:current_syntax = "btm" diff --git a/runtime/syntax/bzr.vim b/runtime/syntax/bzr.vim index ef5445bf45..43178b8a1a 100644 --- a/runtime/syntax/bzr.vim +++ b/runtime/syntax/bzr.vim @@ -11,11 +11,8 @@ " Gioele Barabucci " for idea of diff highlighting -" 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 @@ -40,24 +37,14 @@ syn sync clear syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1 " 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_bzr_syn_inits") - if version <= 508 - let did_bzr_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink bzrRemoved Constant - HiLink bzrAdded Identifier - HiLink bzrModified Special - HiLink bzrRenamed Special - HiLink bzrUnchanged Special - HiLink bzrUnknown Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet. + +hi def link bzrRemoved Constant +hi def link bzrAdded Identifier +hi def link bzrModified Special +hi def link bzrRenamed Special +hi def link bzrUnchanged Special +hi def link bzrUnknown Special + let b:current_syntax = "bzr" diff --git a/runtime/syntax/cabal.vim b/runtime/syntax/cabal.vim index 4130bac894..6641294a31 100644 --- a/runtime/syntax/cabal.vim +++ b/runtime/syntax/cabal.vim @@ -18,11 +18,8 @@ " v1.0: Cabal syntax in vimball format " (thanks to Magnus Therning) -" 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 @@ -105,27 +102,17 @@ syn match cabalStatement "\ctype" syn match cabalStatement "\cversion" " 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_cabal_syn_inits") - if version < 508 - let did_cabal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink cabalVersion Number - HiLink cabalTruth Boolean - HiLink cabalComment Comment - HiLink cabalStatement Statement - HiLink cabalCategory Type - HiLink cabalFunction Function - HiLink cabalConditional Conditional - HiLink cabalOperator Operator - HiLink cabalCompiler Constant - delcommand HiLink -endif +hi def link cabalVersion Number +hi def link cabalTruth Boolean +hi def link cabalComment Comment +hi def link cabalStatement Statement +hi def link cabalCategory Type +hi def link cabalFunction Function +hi def link cabalConditional Conditional +hi def link cabalOperator Operator +hi def link cabalCompiler Constant let b:current_syntax = "cabal" diff --git a/runtime/syntax/cf.vim b/runtime/syntax/cf.vim index 63d976d9ce..6310bc3bde 100644 --- a/runtime/syntax/cf.vim +++ b/runtime/syntax/cf.vim @@ -379,61 +379,58 @@ syn region cfqueryTag contained start=+<cfquery+ end=+>+ keepend contains=cfTagN syn region cfSqlregion start=+<cfquery\_[^>]*>+ keepend end=+</cfquery>+me=s-1 matchgroup=NONE contains=@cfSql,cfComment,@htmlTagNameCluster,cfqueryTag,cfHashRegion " Define the highlighting. -command -nargs=+ CfHiLink hi def link <args> if exists("d_noinclude_html") " The default html-style highlighting copied from html.vim. - CfHiLink htmlTag Function - CfHiLink htmlEndTag Identifier - CfHiLink htmlArg Type - CfHiLink htmlTagName htmlStatement - CfHiLink htmlValue String - CfHiLink htmlPreProc PreProc - CfHiLink htmlString String - CfHiLink htmlStatement Statement - CfHiLink htmlValue String - CfHiLink htmlTagError htmlError - CfHiLink htmlError Error + hi def link htmlTag Function + hi def link htmlEndTag Identifier + hi def link htmlArg Type + hi def link htmlTagName htmlStatement + hi def link htmlValue String + hi def link htmlPreProc PreProc + hi def link htmlString String + hi def link htmlStatement Statement + hi def link htmlValue String + hi def link htmlTagError htmlError + hi def link htmlError Error endif -CfHiLink cfTagName Statement -CfHiLink cfCustomTagName Statement -CfHiLink cfArg Type -CfHiLink cfFunctionName Function -CfHiLink cfHashRegion PreProc -CfHiLink cfComment Comment -CfHiLink cfCommentTodo Todo -CfHiLink cfOperator Operator -CfHiLink cfOperatorMatch Operator -CfHiLink cfScope Title -CfHiLink cfBool Constant - -CfHiLink cfscriptBlock Special -CfHiLink cfscriptTag htmlTag -CfHiLink cfSetRegion PreProc -CfHiLink cfSetLHSRegion htmlTag -CfHiLink cfSetTagEnd htmlTag - -CfHiLink cfScriptLineComment Comment -CfHiLink cfScriptComment Comment -CfHiLink cfScriptStringS String -CfHiLink cfScriptStringD String -CfHiLink cfScriptNumber cfScriptValue -CfHiLink cfScriptConditional Conditional -CfHiLink cfScriptRepeat Repeat -CfHiLink cfScriptBranch Conditional -CfHiLink cfScriptSpecial Type -CfHiLink cfScriptStatement Statement -CfHiLink cfScriptBraces Function -CfHiLink cfScriptKeyword Function -CfHiLink cfScriptError Error -CfHiLink cfDeprecatedTag Error -CfHiLink cfDeprecatedFunction Error -CfHiLink cfScrParenError cfScriptError - -CfHiLink cfqueryTag htmlTag - -delcommand CfHiLink +hi def link cfTagName Statement +hi def link cfCustomTagName Statement +hi def link cfArg Type +hi def link cfFunctionName Function +hi def link cfHashRegion PreProc +hi def link cfComment Comment +hi def link cfCommentTodo Todo +hi def link cfOperator Operator +hi def link cfOperatorMatch Operator +hi def link cfScope Title +hi def link cfBool Constant + +hi def link cfscriptBlock Special +hi def link cfscriptTag htmlTag +hi def link cfSetRegion PreProc +hi def link cfSetLHSRegion htmlTag +hi def link cfSetTagEnd htmlTag + +hi def link cfScriptLineComment Comment +hi def link cfScriptComment Comment +hi def link cfScriptStringS String +hi def link cfScriptStringD String +hi def link cfScriptNumber cfScriptValue +hi def link cfScriptConditional Conditional +hi def link cfScriptRepeat Repeat +hi def link cfScriptBranch Conditional +hi def link cfScriptSpecial Type +hi def link cfScriptStatement Statement +hi def link cfScriptBraces Function +hi def link cfScriptKeyword Function +hi def link cfScriptError Error +hi def link cfDeprecatedTag Error +hi def link cfDeprecatedFunction Error +hi def link cfScrParenError cfScriptError + +hi def link cfqueryTag htmlTag let b:current_syntax = "cf" diff --git a/runtime/syntax/cfg.vim b/runtime/syntax/cfg.vim index b82fb26fc0..a50297d418 100644 --- a/runtime/syntax/cfg.vim +++ b/runtime/syntax/cfg.vim @@ -3,11 +3,8 @@ " Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) " Last change: 2012 Aug 11 -" 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 @@ -36,25 +33,16 @@ syn match CfgComment ";.*" syn match CfgComment "\/\/.*" " Define the default hightlighting. -" 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_cfg_syn_inits") - if version < 508 - let did_cfg_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink CfgOnOff Label - HiLink CfgComment Comment - HiLink CfgSection Type - HiLink CfgString String - HiLink CfgParams Keyword - HiLink CfgValues Constant - HiLink CfgDirectory Directory - HiLink UncPath Directory - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link CfgOnOff Label +hi def link CfgComment Comment +hi def link CfgSection Type +hi def link CfgString String +hi def link CfgParams Keyword +hi def link CfgValues Constant +hi def link CfgDirectory Directory +hi def link UncPath Directory + + let b:current_syntax = "cfg" " vim:ts=8 diff --git a/runtime/syntax/ch.vim b/runtime/syntax/ch.vim index add7395093..61f475bc99 100644 --- a/runtime/syntax/ch.vim +++ b/runtime/syntax/ch.vim @@ -8,21 +8,14 @@ " Ch is a C/C++ interpreter with many high level extensions " -" 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 " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " Ch extentions @@ -33,20 +26,12 @@ syn keyword chStructure class syn keyword chType string_t array " Default highlighting -if version >= 508 || !exists("did_ch_syntax_inits") - if version < 508 - let did_ch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink chAccess chStatement - HiLink chExceptions Exception - HiLink chStatement Statement - HiLink chType Type - HiLink chStructure Structure - delcommand HiLink -endif + +hi def link chAccess chStatement +hi def link chExceptions Exception +hi def link chStatement Statement +hi def link chType Type +hi def link chStructure Structure let b:current_syntax = "ch" diff --git a/runtime/syntax/change.vim b/runtime/syntax/change.vim index e9bf88b9d6..a92767e903 100644 --- a/runtime/syntax/change.vim +++ b/runtime/syntax/change.vim @@ -7,11 +7,8 @@ " in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and " "cweb.vim" respectively. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -21,21 +18,11 @@ syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1 syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1 " 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_change_syntax_inits") - if version < 508 - let did_change_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink changeFromMaterial String - HiLink changeToMaterial Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link changeFromMaterial String +hi def link changeToMaterial Statement + let b:current_syntax = "change" diff --git a/runtime/syntax/changelog.vim b/runtime/syntax/changelog.vim index 33d31ba466..cf9021ef05 100644 --- a/runtime/syntax/changelog.vim +++ b/runtime/syntax/changelog.vim @@ -4,11 +4,8 @@ " Maintainer: Corinna Vinschen <vinschen@redhat.com> " Last Change: June 1, 2003 -" 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 @@ -28,17 +25,12 @@ endif syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail -if version < 600 - syn region changelogFiles start="^\s\+[+*]\s" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend - syn region changelogFiles start="^\s\+[([]" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend - syn match changelogColon contained ":\s" -else - syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend - syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend - syn match changelogFuncs contained "(.\{-})" extend - syn match changelogFuncs contained "\[.\{-}]" extend - syn match changelogColon contained ":" -endif +syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend +syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changelogFuncs,changelogError keepend +syn match changelogFuncs contained "(.\{-})" extend +syn match changelogFuncs contained "\[.\{-}]" extend +syn match changelogColon contained ":" + syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>" syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec @@ -46,32 +38,20 @@ syn keyword changelogDay contained mon tue wed thu fri sat sun syn match changelogNumber contained "[.-]*[0-9]\+" " 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_changelog_syntax_inits") - if version < 508 - let did_changelog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link changelogText Normal +hi def link changelogBullet Type +hi def link changelogColon Type +hi def link changelogFiles Comment +hi def link changelogFuncs Comment +hi def link changelogHeader Statement +hi def link changelogMail Special +hi def link changelogNumber Number +hi def link changelogMonth Number +hi def link changelogDay Number +hi def link changelogError Folded - HiLink changelogText Normal - HiLink changelogBullet Type - HiLink changelogColon Type - HiLink changelogFiles Comment - if version >= 600 - HiLink changelogFuncs Comment - endif - HiLink changelogHeader Statement - HiLink changelogMail Special - HiLink changelogNumber Number - HiLink changelogMonth Number - HiLink changelogDay Number - HiLink changelogError Folded - - delcommand HiLink -endif let b:current_syntax = "changelog" diff --git a/runtime/syntax/chaskell.vim b/runtime/syntax/chaskell.vim index 3f764d0e8a..4b1e8c53be 100644 --- a/runtime/syntax/chaskell.vim +++ b/runtime/syntax/chaskell.vim @@ -9,10 +9,6 @@ let b:hs_chs=1 " Include standard Haskell highlighting -if version < 600 - source <sfile>:p:h/haskell.vim -else - runtime! syntax/haskell.vim -endif +runtime! syntax/haskell.vim " vim: ts=8 diff --git a/runtime/syntax/cheetah.vim b/runtime/syntax/cheetah.vim index 7eb17567cf..9567ecbbca 100644 --- a/runtime/syntax/cheetah.vim +++ b/runtime/syntax/cheetah.vim @@ -8,11 +8,8 @@ " PSP-style tags: <% .. %> (obsoleted feature) " doc-strings and header comments (rarely used feature) -" 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 @@ -36,25 +33,15 @@ syn match cheetahComment "##.*$" display syn region cheetahMultiLineComment start="#\*" end="\*#" " 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_cheetah_syn_inits") - if version < 508 - let did_cheetah_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cheetahPlaceHolder Identifier - HiLink cheetahDirective PreCondit - HiLink cheetahKeyword Define - HiLink cheetahContinuation Special - HiLink cheetahComment Comment - HiLink cheetahMultiLineComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link cheetahPlaceHolder Identifier +hi def link cheetahDirective PreCondit +hi def link cheetahKeyword Define +hi def link cheetahContinuation Special +hi def link cheetahComment Comment +hi def link cheetahMultiLineComment Comment + let b:current_syntax = "cheetah" diff --git a/runtime/syntax/chill.vim b/runtime/syntax/chill.vim index e5200fe722..b95df68bc8 100644 --- a/runtime/syntax/chill.vim +++ b/runtime/syntax/chill.vim @@ -11,11 +11,8 @@ " & Communications LTd.) -" 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 @@ -124,67 +121,57 @@ endif exec "syn sync ccomment chillComment minlines=" . chill_minlines " 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_ch_syntax_inits") - if version < 508 - let did_ch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink chillLabel Label - HiLink chillUserLabel Label - HiLink chillConditional Conditional - " hi chillConditional term=bold ctermfg=red guifg=red gui=bold - - HiLink chillRepeat Repeat - HiLink chillProcess Repeat - HiLink chillSignal Repeat - HiLink chillCharacter Character - HiLink chillSpecialCharacter chillSpecial - HiLink chillNumber Number - HiLink chillFloat Float - HiLink chillOctalError chillError - HiLink chillParenError chillError - HiLink chillInParen chillError - HiLink chillCommentError chillError - HiLink chillSpaceError chillError - HiLink chillOperator Operator - HiLink chillStructure Structure - HiLink chillBlock Operator - HiLink chillScope Operator - "hi chillEDML term=underline ctermfg=DarkRed guifg=Red - HiLink chillEDML PreProc - "hi chillBoolConst term=bold ctermfg=brown guifg=brown - HiLink chillBoolConst Constant - "hi chillLogical term=bold ctermfg=brown guifg=brown - HiLink chillLogical Constant - HiLink chillStorageClass StorageClass - HiLink chillInclude Include - HiLink chillPreProc PreProc - HiLink chillDefine Macro - HiLink chillIncluded chillString - HiLink chillError Error - HiLink chillStatement Statement - HiLink chillPreCondit PreCondit - HiLink chillType Type - HiLink chillCommentError chillError - HiLink chillCommentString chillString - HiLink chillComment2String chillString - HiLink chillCommentSkip chillComment - HiLink chillString String - HiLink chillComment Comment - " hi chillComment term=None ctermfg=lightblue guifg=lightblue - HiLink chillSpecial SpecialChar - HiLink chillTodo Todo - HiLink chillBlock Statement - "HiLink chillIdentifier Identifier - HiLink chillBracket Delimiter - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link chillLabel Label +hi def link chillUserLabel Label +hi def link chillConditional Conditional +" hi def link chillConditional term=bold ctermfg=red guifg=red gui=bold + +hi def link chillRepeat Repeat +hi def link chillProcess Repeat +hi def link chillSignal Repeat +hi def link chillCharacter Character +hi def link chillSpecialCharacter chillSpecial +hi def link chillNumber Number +hi def link chillFloat Float +hi def link chillOctalError chillError +hi def link chillParenError chillError +hi def link chillInParen chillError +hi def link chillCommentError chillError +hi def link chillSpaceError chillError +hi def link chillOperator Operator +hi def link chillStructure Structure +hi def link chillBlock Operator +hi def link chillScope Operator +"hi def link chillEDML term=underline ctermfg=DarkRed guifg=Red +hi def link chillEDML PreProc +"hi def link chillBoolConst term=bold ctermfg=brown guifg=brown +hi def link chillBoolConst Constant +"hi def link chillLogical term=bold ctermfg=brown guifg=brown +hi def link chillLogical Constant +hi def link chillStorageClass StorageClass +hi def link chillInclude Include +hi def link chillPreProc PreProc +hi def link chillDefine Macro +hi def link chillIncluded chillString +hi def link chillError Error +hi def link chillStatement Statement +hi def link chillPreCondit PreCondit +hi def link chillType Type +hi def link chillCommentError chillError +hi def link chillCommentString chillString +hi def link chillComment2String chillString +hi def link chillCommentSkip chillComment +hi def link chillString String +hi def link chillComment Comment +" hi def link chillComment term=None ctermfg=lightblue guifg=lightblue +hi def link chillSpecial SpecialChar +hi def link chillTodo Todo +hi def link chillBlock Statement +"hi def link chillIdentifier Identifier +hi def link chillBracket Delimiter + let b:current_syntax = "chill" diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim index 41c045fb09..b765682547 100644 --- a/runtime/syntax/cl.vim +++ b/runtime/syntax/cl.vim @@ -10,19 +10,12 @@ " Version: 6 " Last Change: Mar 06 2013 -" 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 -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- syn case ignore @@ -75,40 +68,30 @@ syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do " 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_cl_syntax_inits") - if version < 508 - let did_cl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink clifError Error - HiLink clSpaceError Error - HiLink clWhile Repeat - HiLink clConditional Conditional - HiLink clDebug Debug - HiLink clNeedsWork Todo - HiLink clTodo Todo - HiLink clComment Comment - HiLink clProcedure Procedure - HiLink clBreak Procedure - HiLink clInclude Include - HiLink clSetOption Statement - HiLink clSet Identifier - HiLink clPreProc PreProc - HiLink clOperator Operator - HiLink clNumber Number - HiLink clString String - HiLink clQuote Delimiter - HiLink clReserved Identifier - HiLink clFunction Function - HiLink clStatement Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link clifError Error +hi def link clSpaceError Error +hi def link clWhile Repeat +hi def link clConditional Conditional +hi def link clDebug Debug +hi def link clNeedsWork Todo +hi def link clTodo Todo +hi def link clComment Comment +hi def link clProcedure Procedure +hi def link clBreak Procedure +hi def link clInclude Include +hi def link clSetOption Statement +hi def link clSet Identifier +hi def link clPreProc PreProc +hi def link clOperator Operator +hi def link clNumber Number +hi def link clString String +hi def link clQuote Delimiter +hi def link clReserved Identifier +hi def link clFunction Function +hi def link clStatement Statement + let b:current_syntax = "cl" diff --git a/runtime/syntax/clean.vim b/runtime/syntax/clean.vim index ea95aa209e..70bf654fb7 100644 --- a/runtime/syntax/clean.vim +++ b/runtime/syntax/clean.vim @@ -4,11 +4,8 @@ " Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> " Last Change: 2013 Oct 15 by Jurriën Stutterheim -" 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 @@ -52,49 +49,39 @@ syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(in " 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_clean_syntax_init") - if version < 508 - let did_clean_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " Comments - HiLink cleanComment Comment - " Constants and denotations - HiLink cleanStringDenot String - HiLink cleanCharDenot Character - HiLink cleanIntegerDenot Number - HiLink cleanBoolDenot Boolean - HiLink cleanRealDenot Float - " Identifiers - " Statements - HiLink cleanTypeClass Keyword - HiLink cleanConditional Conditional - HiLink cleanLabel Label - HiLink cleanKeyword Keyword - " Generic Preprocessing - HiLink cleanIncludeKeyword Include - HiLink cleanModuleSystem PreProc - " Type - HiLink cleanBasicType Type - HiLink cleanSpecialType Type - HiLink cleanFuncTypeDef Typedef - " Special - HiLink cleanSpecial Special - HiLink cleanList Special - HiLink cleanArray Special - HiLink cleanRecord Special - HiLink cleanTuple Special - " Error - " Todo - HiLink cleanTodo Todo + " Comments + hi def link cleanComment Comment + " Constants and denotations + hi def link cleanStringDenot String + hi def link cleanCharDenot Character + hi def link cleanIntegerDenot Number + hi def link cleanBoolDenot Boolean + hi def link cleanRealDenot Float + " Identifiers + " Statements + hi def link cleanTypeClass Keyword + hi def link cleanConditional Conditional + hi def link cleanLabel Label + hi def link cleanKeyword Keyword + " Generic Preprocessing + hi def link cleanIncludeKeyword Include + hi def link cleanModuleSystem PreProc + " Type + hi def link cleanBasicType Type + hi def link cleanSpecialType Type + hi def link cleanFuncTypeDef Typedef + " Special + hi def link cleanSpecial Special + hi def link cleanList Special + hi def link cleanArray Special + hi def link cleanRecord Special + hi def link cleanTuple Special + " Error + " Todo + hi def link cleanTodo Todo - delcommand HiLink -endif let b:current_syntax = "clean" diff --git a/runtime/syntax/clipper.vim b/runtime/syntax/clipper.vim index 6ee3892845..38ba9a4fe9 100644 --- a/runtime/syntax/clipper.vim +++ b/runtime/syntax/clipper.vim @@ -4,11 +4,8 @@ " Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio " Last Change: 2011 Dec 29 by Thilo Six -" 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 @@ -114,32 +111,22 @@ syntax match clipperComment "^\*.*" " 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_clipper_syntax_inits") - if version < 508 - let did_clipper_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink clipperConditional Conditional - HiLink clipperRepeat Repeat - HiLink clipperNumber Number - HiLink clipperInclude Include - HiLink clipperComment Comment - HiLink clipperOperator Operator - HiLink clipperStorageClass StorageClass - HiLink clipperStatement Statement - HiLink clipperString String - HiLink clipperFunction Function - HiLink clipperLineContinuation Special - HiLink clipperDelimiters Delimiter - HiLink clipperUserVariable Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link clipperConditional Conditional +hi def link clipperRepeat Repeat +hi def link clipperNumber Number +hi def link clipperInclude Include +hi def link clipperComment Comment +hi def link clipperOperator Operator +hi def link clipperStorageClass StorageClass +hi def link clipperStatement Statement +hi def link clipperString String +hi def link clipperFunction Function +hi def link clipperLineContinuation Special +hi def link clipperDelimiters Delimiter +hi def link clipperUserVariable Identifier + let b:current_syntax = "clipper" diff --git a/runtime/syntax/cmake.vim b/runtime/syntax/cmake.vim index 4586940c5e..4cc21da8fe 100644 --- a/runtime/syntax/cmake.vim +++ b/runtime/syntax/cmake.vim @@ -12,11 +12,8 @@ " http://www.cmake.org/HTML/Copyright.html " This implies that distribution with Vim is allowed -" 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 @@ -52,32 +49,22 @@ syn keyword cmakeTodo \ contained " 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_cmake_syntax_inits") - if version < 508 - let did_cmake_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink cmakeStatement Statement - HiLink cmakeComment Comment - HiLink cmakeString String - HiLink cmakeVariableValue Type - HiLink cmakeRegistry Underlined - HiLink cmakeArguments Identifier - HiLink cmakeArgument Constant - HiLink cmakeEnvironment Special - HiLink cmakeOperators Operator - HiLink cmakeMacro PreProc - HiLink cmakeError Error - HiLink cmakeTodo TODO - HiLink cmakeEscaped Special +hi def link cmakeStatement Statement +hi def link cmakeComment Comment +hi def link cmakeString String +hi def link cmakeVariableValue Type +hi def link cmakeRegistry Underlined +hi def link cmakeArguments Identifier +hi def link cmakeArgument Constant +hi def link cmakeEnvironment Special +hi def link cmakeOperators Operator +hi def link cmakeMacro PreProc +hi def link cmakeError Error +hi def link cmakeTodo TODO +hi def link cmakeEscaped Special - delcommand HiLink -endif let b:current_syntax = "cmake" diff --git a/runtime/syntax/cobol.vim b/runtime/syntax/cobol.vim index 51ca3d8773..2d481bba0b 100644 --- a/runtime/syntax/cobol.vim +++ b/runtime/syntax/cobol.vim @@ -6,20 +6,13 @@ " James Mitchell <james_mitchell@acm.org>) " Last Change: 2015 Feb 13 -" 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 " MOST important - else most of the keywords wont work! -if version < 600 - set isk=@,48-57,- -else - setlocal isk=@,48-57,- -endif +setlocal isk=@,48-57,- syn case ignore @@ -157,52 +150,42 @@ else endif " 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_cobol_syntax_inits") - if version < 508 - let did_cobol_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cobolBAD Error - HiLink cobolBadID Error - HiLink cobolBadLine Error - if exists("g:cobol_legacy_code") - HiLink cobolMarker Comment - else - HiLink cobolMarker Error - endif - HiLink cobolCALLs Function - HiLink cobolComment Comment - HiLink cobolKeys Comment - HiLink cobolAreaB Special - HiLink cobolCompiler PreProc - HiLink cobolCondFlow Special - HiLink cobolCopy PreProc - HiLink cobolDeclA cobolDecl - HiLink cobolDecl Type - HiLink cobolExtras Special - HiLink cobolGoTo Special - HiLink cobolConstant Constant - HiLink cobolNumber Constant - HiLink cobolPic Constant - HiLink cobolReserved Statement - HiLink cobolDivision Label - HiLink cobolSection Label - HiLink cobolParagraph Label - HiLink cobolDivisionName Keyword - HiLink cobolSectionName Keyword - HiLink cobolParagraphName Keyword - HiLink cobolString Constant - HiLink cobolTodo Todo - HiLink cobolWatch Special - HiLink cobolIndicator Special - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link cobolBAD Error +hi def link cobolBadID Error +hi def link cobolBadLine Error +if exists("g:cobol_legacy_code") + hi def link cobolMarker Comment +else + hi def link cobolMarker Error endif +hi def link cobolCALLs Function +hi def link cobolComment Comment +hi def link cobolKeys Comment +hi def link cobolAreaB Special +hi def link cobolCompiler PreProc +hi def link cobolCondFlow Special +hi def link cobolCopy PreProc +hi def link cobolDeclA cobolDecl +hi def link cobolDecl Type +hi def link cobolExtras Special +hi def link cobolGoTo Special +hi def link cobolConstant Constant +hi def link cobolNumber Constant +hi def link cobolPic Constant +hi def link cobolReserved Statement +hi def link cobolDivision Label +hi def link cobolSection Label +hi def link cobolParagraph Label +hi def link cobolDivisionName Keyword +hi def link cobolSectionName Keyword +hi def link cobolParagraphName Keyword +hi def link cobolString Constant +hi def link cobolTodo Todo +hi def link cobolWatch Special +hi def link cobolIndicator Special + let b:current_syntax = "cobol" diff --git a/runtime/syntax/coco.vim b/runtime/syntax/coco.vim index 4094a55303..ae32348bcb 100644 --- a/runtime/syntax/coco.vim +++ b/runtime/syntax/coco.vim @@ -5,9 +5,8 @@ " Remark: Coco/R syntax partially implemented. " License: Vim license -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 diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim index cd83b24352..c6d4e6b363 100644 --- a/runtime/syntax/config.vim +++ b/runtime/syntax/config.vim @@ -11,11 +11,8 @@ " script, so I wrote this quick and dirty patch. -" 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 @@ -37,28 +34,18 @@ syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" m syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell " 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_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link configdelimiter Delimiter +hi def link configoperator Operator +hi def link configcomment Comment +hi def link configDnl Comment +hi def link configfunction Function +hi def link confignumber Number +hi def link configkeyword Keyword +hi def link configspecial Special +hi def link configstring String - HiLink configdelimiter Delimiter - HiLink configoperator Operator - HiLink configcomment Comment - HiLink configDnl Comment - HiLink configfunction Function - HiLink confignumber Number - HiLink configkeyword Keyword - HiLink configspecial Special - HiLink configstring String - - delcommand HiLink -endif let b:current_syntax = "config" diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index fefd0ff7b0..d669206b3e 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -4,21 +4,14 @@ " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> " Last Change: 2016 Jul 07 -" 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 " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax " C++ extensions syn keyword cppStatement new delete this friend using @@ -60,29 +53,20 @@ endif syn match cppMinMax "[<>]?" " Default highlighting -if version >= 508 || !exists("did_cpp_syntax_inits") - if version < 508 - let did_cpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink cppAccess cppStatement - HiLink cppCast cppStatement - HiLink cppExceptions Exception - HiLink cppOperator Operator - HiLink cppStatement Statement - HiLink cppModifier Type - HiLink cppType Type - HiLink cppStorageClass StorageClass - HiLink cppStructure Structure - HiLink cppBoolean Boolean - HiLink cppConstant Constant - HiLink cppRawStringDelimiter Delimiter - HiLink cppRawString String - HiLink cppNumber Number - delcommand HiLink -endif +hi def link cppAccess cppStatement +hi def link cppCast cppStatement +hi def link cppExceptions Exception +hi def link cppOperator Operator +hi def link cppStatement Statement +hi def link cppModifier Type +hi def link cppType Type +hi def link cppStorageClass StorageClass +hi def link cppStructure Structure +hi def link cppBoolean Boolean +hi def link cppConstant Constant +hi def link cppRawStringDelimiter Delimiter +hi def link cppRawString String +hi def link cppNumber Number let b:current_syntax = "cpp" diff --git a/runtime/syntax/crontab.vim b/runtime/syntax/crontab.vim index fd1c30023f..5e38ffaafe 100644 --- a/runtime/syntax/crontab.vim +++ b/runtime/syntax/crontab.vim @@ -10,11 +10,8 @@ " crontab line format: " Minutes Hours Days Months Days_of_Week Commands # comments -" 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 @@ -39,41 +36,31 @@ syntax match crontabCmnt "^\s*#.*" contains=@Spell syntax match crontabPercent "[^\\]%.*"lc=1 contained " 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_crontab_syn_inits") - if version < 508 - let did_crontab_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink crontabMin Number - HiLink crontabHr PreProc - HiLink crontabDay Type - - HiLink crontabMnth Number - HiLink crontabMnth12 Number - HiLink crontabMnthS Number - HiLink crontabMnthN Number - - HiLink crontabDow PreProc - HiLink crontabDow7 PreProc - HiLink crontabDowS PreProc - HiLink crontabDowN PreProc - - HiLink crontabNick Special - HiLink crontabVar Identifier - HiLink crontabPercent Special +" Only when an item doesn't have highlighting yet + +hi def link crontabMin Number +hi def link crontabHr PreProc +hi def link crontabDay Type + +hi def link crontabMnth Number +hi def link crontabMnth12 Number +hi def link crontabMnthS Number +hi def link crontabMnthN Number + +hi def link crontabDow PreProc +hi def link crontabDow7 PreProc +hi def link crontabDowS PreProc +hi def link crontabDowN PreProc + +hi def link crontabNick Special +hi def link crontabVar Identifier +hi def link crontabPercent Special " comment out next line for to suppress unix commands coloring. - HiLink crontabCmd Statement +hi def link crontabCmd Statement - HiLink crontabCmnt Comment +hi def link crontabCmnt Comment - delcommand HiLink -endif let b:current_syntax = "crontab" diff --git a/runtime/syntax/csc.vim b/runtime/syntax/csc.vim index 5493b17f5f..6e5d8b9f37 100644 --- a/runtime/syntax/csc.vim +++ b/runtime/syntax/csc.vim @@ -3,11 +3,8 @@ " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> " Last change: 2011 Dec 25 by Thilo Six -" 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 @@ -145,7 +142,7 @@ sy match cscBPMacro contained "!" sy match cscBPW "!\s*\a*" contains=cscBPmacro " when wanted, highlighting lhs members or erros in asignments (may lag the editing) -if version >= 600 && exists("csc_asignment") +if exists("csc_asignment") sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained @@ -158,44 +155,34 @@ endif exec "sy sync ccomment cscComment minlines=" . csc_minlines " 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_csc_syntax_inits") - if version < 508 - let did_csc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue + +hi def link cscNumber Number +hi def link cscOctal Number +hi def link cscFloat Float +hi def link cscParenE Error +hi def link cscCommentE Error +hi def link cscSpaceE Error +hi def link cscError Error +hi def link cscString String +hi def link cscComment Comment +hi def link cscTodo Todo +hi def link cscStatement Statement +hi def link cscIfError Error +hi def link cscEqError Error +hi def link cscFunction Statement +hi def link cscCondition Statement +hi def link cscWarn WarningMsg + +hi def link cscComE Error +hi def link cscCom Statement +hi def link cscComW WarningMsg + +hi def link cscBPMacro Identifier +hi def link cscBPW WarningMsg - hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue - - HiLink cscNumber Number - HiLink cscOctal Number - HiLink cscFloat Float - HiLink cscParenE Error - HiLink cscCommentE Error - HiLink cscSpaceE Error - HiLink cscError Error - HiLink cscString String - HiLink cscComment Comment - HiLink cscTodo Todo - HiLink cscStatement Statement - HiLink cscIfError Error - HiLink cscEqError Error - HiLink cscFunction Statement - HiLink cscCondition Statement - HiLink cscWarn WarningMsg - - HiLink cscComE Error - HiLink cscCom Statement - HiLink cscComW WarningMsg - - HiLink cscBPMacro Identifier - HiLink cscBPW WarningMsg - - delcommand HiLink -endif let b:current_syntax = "csc" diff --git a/runtime/syntax/csh.vim b/runtime/syntax/csh.vim index 9dc2c4ef56..c134aa7ef3 100644 --- a/runtime/syntax/csh.vim +++ b/runtime/syntax/csh.vim @@ -1,15 +1,12 @@ " Vim syntax file " Language: C-shell (csh) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 11 +" Last Change: Aug 31, 2016 +" Version: 13 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH -" 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 @@ -100,59 +97,45 @@ syn match cshNumber "-\=\<\d\+\>" "syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>" " Shell Input Redirection (Here Documents) -if version < 600 - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**END[a-zA-Z_0-9]*\**" matchgroup=cshRedir end="^END[a-zA-Z_0-9]*$" - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**EOF\**" matchgroup=cshRedir end="^EOF$" -else - syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$" -endif +syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$" " 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_csh_syntax_inits") - if version < 508 - let did_csh_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cshArgv cshVariables - HiLink cshBckQuote cshCommand - HiLink cshDblQuote cshString - HiLink cshExtVar cshVariables - HiLink cshHereDoc cshString - HiLink cshNoEndlineBQ cshNoEndline - HiLink cshNoEndlineDQ cshNoEndline - HiLink cshNoEndlineSQ cshNoEndline - HiLink cshQtyWord cshVariables - HiLink cshRedir cshOperator - HiLink cshSelector cshVariables - HiLink cshSetStmt cshStatement - HiLink cshSetVariables cshVariables - HiLink cshSnglQuote cshString - HiLink cshSubst cshVariables - - HiLink cshCommand Statement - HiLink cshComment Comment - HiLink cshConditional Conditional - HiLink cshIdentifier Error - HiLink cshModifier Special - HiLink cshNoEndline Error - HiLink cshNumber Number - HiLink cshOperator Operator - HiLink cshRedir Statement - HiLink cshRepeat Repeat - HiLink cshShellVariables Special - HiLink cshSpecial Special - HiLink cshStatement Statement - HiLink cshString String - HiLink cshSubstError Error - HiLink cshTodo Todo - HiLink cshVariables Type - - delcommand HiLink +if !exists("skip_csh_syntax_inits") + + hi def link cshArgv cshVariables + hi def link cshBckQuote cshCommand + hi def link cshDblQuote cshString + hi def link cshExtVar cshVariables + hi def link cshHereDoc cshString + hi def link cshNoEndlineBQ cshNoEndline + hi def link cshNoEndlineDQ cshNoEndline + hi def link cshNoEndlineSQ cshNoEndline + hi def link cshQtyWord cshVariables + hi def link cshRedir cshOperator + hi def link cshSelector cshVariables + hi def link cshSetStmt cshStatement + hi def link cshSetVariables cshVariables + hi def link cshSnglQuote cshString + hi def link cshSubst cshVariables + + hi def link cshCommand Statement + hi def link cshComment Comment + hi def link cshConditional Conditional + hi def link cshIdentifier Error + hi def link cshModifier Special + hi def link cshNoEndline Error + hi def link cshNumber Number + hi def link cshOperator Operator + hi def link cshRedir Statement + hi def link cshRepeat Repeat + hi def link cshShellVariables Special + hi def link cshSpecial Special + hi def link cshStatement Statement + hi def link cshString String + hi def link cshSubstError Error + hi def link cshTodo Todo + hi def link cshVariables Type + endif let b:current_syntax = "csh" diff --git a/runtime/syntax/csp.vim b/runtime/syntax/csp.vim index bd6213efd9..8001b1fe7e 100644 --- a/runtime/syntax/csp.vim +++ b/runtime/syntax/csp.vim @@ -15,11 +15,8 @@ " - The additional syntax for the RT-Tester (pseudo-comments) " should be optional. -" 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 @@ -149,46 +146,36 @@ syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlAr syn sync lines=250 " 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_csp_syn_inits") - if version < 508 - let did_csp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " (For vim version <=5.7, the command groups are defined in - " $VIMRUNTIME/syntax/synload.vim ) - HiLink cspComment Comment - HiLink cspNumber Number - HiLink cspConditional Conditional - HiLink cspOperator Delimiter - HiLink cspKeyword Keyword - HiLink cspReserved SpecialChar - HiLink cspInclude Error - HiLink cspIncludeKeyword Include - HiLink cspIncludeArg Include - HiLink cspAssert PreCondit - HiLink cspType Type - HiLink cspProcess Function - HiLink cspTodo Todo - HiLink cspOldRttComment Define - HiLink cspRttPragmaKeyword Define - HiLink cspSdlRttComment Define - HiLink cspRttPragmaArg Define - HiLink cspRttPragmaSdlArg Define - HiLink cspRttPragmaSdlName Default - HiLink cspRttPragmaSdlTailArg Define - HiLink cspRttPragmaSdlTransName Default - HiLink cspRttPragmaSdlTransTailArg Define - HiLink cspReservedIdentifier Error - " (Currently unused vim method: Debug) - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" (For vim version <=5.7, the command groups are defined in +" $VIMRUNTIME/syntax/synload.vim ) +hi def link cspComment Comment +hi def link cspNumber Number +hi def link cspConditional Conditional +hi def link cspOperator Delimiter +hi def link cspKeyword Keyword +hi def link cspReserved SpecialChar +hi def link cspInclude Error +hi def link cspIncludeKeyword Include +hi def link cspIncludeArg Include +hi def link cspAssert PreCondit +hi def link cspType Type +hi def link cspProcess Function +hi def link cspTodo Todo +hi def link cspOldRttComment Define +hi def link cspRttPragmaKeyword Define +hi def link cspSdlRttComment Define +hi def link cspRttPragmaArg Define +hi def link cspRttPragmaSdlArg Define +hi def link cspRttPragmaSdlName Default +hi def link cspRttPragmaSdlTailArg Define +hi def link cspRttPragmaSdlTransName Default +hi def link cspRttPragmaSdlTransTailArg Define +hi def link cspReservedIdentifier Error +" (Currently unused vim method: Debug) + let b:current_syntax = "csp" diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 51758ca98f..3dc3f5c2d6 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -8,12 +8,9 @@ " URL: https://github.com/JulesWang/css.vim " Last Change: 2015 Apr.17 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'css' @@ -516,139 +513,129 @@ if main_syntax == "css" endif " 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_css_syn_inits") - if version < 508 - let did_css_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink cssComment Comment - HiLink cssVendor Comment - HiLink cssHacks Comment - HiLink cssTagName Statement - HiLink cssDeprecated Error - HiLink cssSelectorOp Special - HiLink cssSelectorOp2 Special - HiLink cssAttrComma Special - - HiLink cssAnimationProp cssProp - HiLink cssBackgroundProp cssProp - HiLink cssBorderProp cssProp - HiLink cssBoxProp cssProp - HiLink cssColorProp cssProp - HiLink cssContentForPagedMediaProp cssProp - HiLink cssDimensionProp cssProp - HiLink cssFlexibleBoxProp cssProp - HiLink cssFontProp cssProp - HiLink cssGeneratedContentProp cssProp - HiLink cssGridProp cssProp - HiLink cssHyerlinkProp cssProp - HiLink cssLineboxProp cssProp - HiLink cssListProp cssProp - HiLink cssMarqueeProp cssProp - HiLink cssMultiColumnProp cssProp - HiLink cssPagedMediaProp cssProp - HiLink cssPositioningProp cssProp - HiLink cssPrintProp cssProp - HiLink cssRubyProp cssProp - HiLink cssSpeechProp cssProp - HiLink cssTableProp cssProp - HiLink cssTextProp cssProp - HiLink cssTransformProp cssProp - HiLink cssTransitionProp cssProp - HiLink cssUIProp cssProp - HiLink cssIEUIProp cssProp - HiLink cssAuralProp cssProp - HiLink cssRenderProp cssProp - HiLink cssMobileTextProp cssProp - - HiLink cssAnimationAttr cssAttr - HiLink cssBackgroundAttr cssAttr - HiLink cssBorderAttr cssAttr - HiLink cssBoxAttr cssAttr - HiLink cssContentForPagedMediaAttr cssAttr - HiLink cssDimensionAttr cssAttr - HiLink cssFlexibleBoxAttr cssAttr - HiLink cssFontAttr cssAttr - HiLink cssGeneratedContentAttr cssAttr - HiLink cssGridAttr cssAttr - HiLink cssHyerlinkAttr cssAttr - HiLink cssLineboxAttr cssAttr - HiLink cssListAttr cssAttr - HiLink cssMarginAttr cssAttr - HiLink cssMarqueeAttr cssAttr - HiLink cssMultiColumnAttr cssAttr - HiLink cssPaddingAttr cssAttr - HiLink cssPagedMediaAttr cssAttr - HiLink cssPositioningAttr cssAttr - HiLink cssGradientAttr cssAttr - HiLink cssPrintAttr cssAttr - HiLink cssRubyAttr cssAttr - HiLink cssSpeechAttr cssAttr - HiLink cssTableAttr cssAttr - HiLink cssTextAttr cssAttr - HiLink cssTransformAttr cssAttr - HiLink cssTransitionAttr cssAttr - HiLink cssUIAttr cssAttr - HiLink cssIEUIAttr cssAttr - HiLink cssAuralAttr cssAttr - HiLink cssRenderAttr cssAttr - HiLink cssCommonAttr cssAttr - - HiLink cssPseudoClassId PreProc - HiLink cssPseudoClassLang Constant - HiLink cssValueLength Number - HiLink cssValueInteger Number - HiLink cssValueNumber Number - HiLink cssValueAngle Number - HiLink cssValueTime Number - HiLink cssValueFrequency Number - HiLink cssFunction Constant - HiLink cssURL String - HiLink cssFunctionName Function - HiLink cssFunctionComma Function - HiLink cssColor Constant - HiLink cssIdentifier Function - HiLink cssInclude Include - HiLink cssIncludeKeyword atKeyword - HiLink cssImportant Special - HiLink cssBraces Function - HiLink cssBraceError Error - HiLink cssError Error - HiLink cssUnicodeEscape Special - HiLink cssStringQQ String - HiLink cssStringQ String - HiLink cssAttributeSelector String - HiLink cssMedia atKeyword - HiLink cssMediaType Special - HiLink cssMediaComma Normal - HiLink cssMediaKeyword Statement - HiLink cssMediaProp cssProp - HiLink cssMediaAttr cssAttr - HiLink cssPage atKeyword - HiLink cssPagePseudo PreProc - HiLink cssPageMargin atKeyword - HiLink cssPageProp cssProp - HiLink cssKeyFrame atKeyword - HiLink cssKeyFrameSelector Constant - HiLink cssFontDescriptor Special - HiLink cssFontDescriptorFunction Constant - HiLink cssFontDescriptorProp cssProp - HiLink cssFontDescriptorAttr cssAttr - HiLink cssUnicodeRange Constant - HiLink cssClassName Function - HiLink cssClassNameDot Function - HiLink cssProp StorageClass - HiLink cssAttr Constant - HiLink cssUnitDecorators Number - HiLink cssNoise Noise - HiLink atKeyword PreProc - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link cssComment Comment +hi def link cssVendor Comment +hi def link cssHacks Comment +hi def link cssTagName Statement +hi def link cssDeprecated Error +hi def link cssSelectorOp Special +hi def link cssSelectorOp2 Special +hi def link cssAttrComma Special + +hi def link cssAnimationProp cssProp +hi def link cssBackgroundProp cssProp +hi def link cssBorderProp cssProp +hi def link cssBoxProp cssProp +hi def link cssColorProp cssProp +hi def link cssContentForPagedMediaProp cssProp +hi def link cssDimensionProp cssProp +hi def link cssFlexibleBoxProp cssProp +hi def link cssFontProp cssProp +hi def link cssGeneratedContentProp cssProp +hi def link cssGridProp cssProp +hi def link cssHyerlinkProp cssProp +hi def link cssLineboxProp cssProp +hi def link cssListProp cssProp +hi def link cssMarqueeProp cssProp +hi def link cssMultiColumnProp cssProp +hi def link cssPagedMediaProp cssProp +hi def link cssPositioningProp cssProp +hi def link cssPrintProp cssProp +hi def link cssRubyProp cssProp +hi def link cssSpeechProp cssProp +hi def link cssTableProp cssProp +hi def link cssTextProp cssProp +hi def link cssTransformProp cssProp +hi def link cssTransitionProp cssProp +hi def link cssUIProp cssProp +hi def link cssIEUIProp cssProp +hi def link cssAuralProp cssProp +hi def link cssRenderProp cssProp +hi def link cssMobileTextProp cssProp + +hi def link cssAnimationAttr cssAttr +hi def link cssBackgroundAttr cssAttr +hi def link cssBorderAttr cssAttr +hi def link cssBoxAttr cssAttr +hi def link cssContentForPagedMediaAttr cssAttr +hi def link cssDimensionAttr cssAttr +hi def link cssFlexibleBoxAttr cssAttr +hi def link cssFontAttr cssAttr +hi def link cssGeneratedContentAttr cssAttr +hi def link cssGridAttr cssAttr +hi def link cssHyerlinkAttr cssAttr +hi def link cssLineboxAttr cssAttr +hi def link cssListAttr cssAttr +hi def link cssMarginAttr cssAttr +hi def link cssMarqueeAttr cssAttr +hi def link cssMultiColumnAttr cssAttr +hi def link cssPaddingAttr cssAttr +hi def link cssPagedMediaAttr cssAttr +hi def link cssPositioningAttr cssAttr +hi def link cssGradientAttr cssAttr +hi def link cssPrintAttr cssAttr +hi def link cssRubyAttr cssAttr +hi def link cssSpeechAttr cssAttr +hi def link cssTableAttr cssAttr +hi def link cssTextAttr cssAttr +hi def link cssTransformAttr cssAttr +hi def link cssTransitionAttr cssAttr +hi def link cssUIAttr cssAttr +hi def link cssIEUIAttr cssAttr +hi def link cssAuralAttr cssAttr +hi def link cssRenderAttr cssAttr +hi def link cssCommonAttr cssAttr + +hi def link cssPseudoClassId PreProc +hi def link cssPseudoClassLang Constant +hi def link cssValueLength Number +hi def link cssValueInteger Number +hi def link cssValueNumber Number +hi def link cssValueAngle Number +hi def link cssValueTime Number +hi def link cssValueFrequency Number +hi def link cssFunction Constant +hi def link cssURL String +hi def link cssFunctionName Function +hi def link cssFunctionComma Function +hi def link cssColor Constant +hi def link cssIdentifier Function +hi def link cssInclude Include +hi def link cssIncludeKeyword atKeyword +hi def link cssImportant Special +hi def link cssBraces Function +hi def link cssBraceError Error +hi def link cssError Error +hi def link cssUnicodeEscape Special +hi def link cssStringQQ String +hi def link cssStringQ String +hi def link cssAttributeSelector String +hi def link cssMedia atKeyword +hi def link cssMediaType Special +hi def link cssMediaComma Normal +hi def link cssMediaKeyword Statement +hi def link cssMediaProp cssProp +hi def link cssMediaAttr cssAttr +hi def link cssPage atKeyword +hi def link cssPagePseudo PreProc +hi def link cssPageMargin atKeyword +hi def link cssPageProp cssProp +hi def link cssKeyFrame atKeyword +hi def link cssKeyFrameSelector Constant +hi def link cssFontDescriptor Special +hi def link cssFontDescriptorFunction Constant +hi def link cssFontDescriptorProp cssProp +hi def link cssFontDescriptorAttr cssAttr +hi def link cssUnicodeRange Constant +hi def link cssClassName Function +hi def link cssClassNameDot Function +hi def link cssProp StorageClass +hi def link cssAttr Constant +hi def link cssUnitDecorators Number +hi def link cssNoise Noise +hi def link atKeyword PreProc let b:current_syntax = "css" diff --git a/runtime/syntax/cterm.vim b/runtime/syntax/cterm.vim index 139a0d5e17..1b6cb2893f 100644 --- a/runtime/syntax/cterm.vim +++ b/runtime/syntax/cterm.vim @@ -4,11 +4,8 @@ " Last Change: 2002 Apr 13 " Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14 -" 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 @@ -142,48 +139,38 @@ syn match ctermCharacter "'[^\\]'" syn match ctermSpecialCharacter "'\\.'" " 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_cterm_syntax_inits") - if version < 508 - let did_cterm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ctermStatement Statement - HiLink ctermFunction Statement - HiLink ctermStrFunction Statement - HiLink ctermIntFunction Statement - HiLink ctermLabel Statement - HiLink ctermConditional Statement - HiLink ctermRepeat Statement - HiLink ctermLibFunc UserDefFunc - HiLink ctermType Type - HiLink ctermFuncArg PreCondit - - HiLink ctermPreVarRO PreCondit - HiLink ctermPreVarRW PreConditBold - HiLink ctermVar Type - - HiLink ctermComment Comment - - HiLink ctermCharacter SpecialChar - HiLink ctermSpecial Special - HiLink ctermSpecialCharacter SpecialChar - HiLink ctermSymbols Special - HiLink ctermString String - HiLink ctermTodo Todo - HiLink ctermOperator Statement - HiLink ctermNumber Number - - " redefine the colors - "hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold - "hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link ctermStatement Statement +hi def link ctermFunction Statement +hi def link ctermStrFunction Statement +hi def link ctermIntFunction Statement +hi def link ctermLabel Statement +hi def link ctermConditional Statement +hi def link ctermRepeat Statement +hi def link ctermLibFunc UserDefFunc +hi def link ctermType Type +hi def link ctermFuncArg PreCondit + +hi def link ctermPreVarRO PreCondit +hi def link ctermPreVarRW PreConditBold +hi def link ctermVar Type + +hi def link ctermComment Comment + +hi def link ctermCharacter SpecialChar +hi def link ctermSpecial Special +hi def link ctermSpecialCharacter SpecialChar +hi def link ctermSymbols Special +hi def link ctermString String +hi def link ctermTodo Todo +hi def link ctermOperator Statement +hi def link ctermNumber Number + +" redefine the colors +"hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold +"hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline + let b:current_syntax = "cterm" diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim index 77930e3fd4..cfc70b9ea8 100644 --- a/runtime/syntax/cuda.vim +++ b/runtime/syntax/cuda.vim @@ -3,20 +3,13 @@ " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net> " Last Change: 2007 Oct 13 -" 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 " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim " CUDA extentions syn keyword cudaStorageClass __device__ __global__ __host__ diff --git a/runtime/syntax/cupl.vim b/runtime/syntax/cupl.vim index 545d873af2..5b93b0db93 100644 --- a/runtime/syntax/cupl.vim +++ b/runtime/syntax/cupl.vim @@ -3,11 +3,8 @@ " Maintainer: John Cook <johncook3@gmail.com> " Last Change: 2011 Dec 27 -" 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 @@ -95,39 +92,29 @@ syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo syn sync minlines=1 " 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_cupl_syn_inits") - if version < 508 - let did_cupl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink cuplHeader cuplStatement - HiLink cuplLogicalOperator cuplOperator - HiLink cuplRangeOperator cuplOperator - HiLink cuplArithmeticOperator cuplOperator - HiLink cuplAssignmentOperator cuplOperator - HiLink cuplEqualityOperator cuplOperator - HiLink cuplTruthTableOperator cuplOperator - HiLink cuplOperator cuplStatement - HiLink cuplFunction cuplStatement - HiLink cuplStatement Statement - HiLink cuplNumberRange cuplNumber - HiLink cuplNumber cuplString - HiLink cuplString String - HiLink cuplComment Comment - HiLink cuplExtension cuplSpecial - HiLink cuplSpecialChar cuplSpecial - HiLink cuplSpecial Special - HiLink cuplDirective PreProc - HiLink cuplTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link cuplHeader cuplStatement +hi def link cuplLogicalOperator cuplOperator +hi def link cuplRangeOperator cuplOperator +hi def link cuplArithmeticOperator cuplOperator +hi def link cuplAssignmentOperator cuplOperator +hi def link cuplEqualityOperator cuplOperator +hi def link cuplTruthTableOperator cuplOperator +hi def link cuplOperator cuplStatement +hi def link cuplFunction cuplStatement +hi def link cuplStatement Statement +hi def link cuplNumberRange cuplNumber +hi def link cuplNumber cuplString +hi def link cuplString String +hi def link cuplComment Comment +hi def link cuplExtension cuplSpecial +hi def link cuplSpecialChar cuplSpecial +hi def link cuplSpecial Special +hi def link cuplDirective PreProc +hi def link cuplTodo Todo + let b:current_syntax = "cupl" diff --git a/runtime/syntax/cuplsim.vim b/runtime/syntax/cuplsim.vim index 18a30ce256..36eb4c3555 100644 --- a/runtime/syntax/cuplsim.vim +++ b/runtime/syntax/cuplsim.vim @@ -3,21 +3,14 @@ " Maintainer: John Cook <john.cook@kla-tencor.com> " Last Change: 2001 Apr 25 -" 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 " Read the CUPL syntax to start with -if version < 600 - source <sfile>:p:h/cupl.vim -else - runtime! syntax/cupl.vim - unlet b:current_syntax -endif +runtime! syntax/cupl.vim +unlet b:current_syntax " omit definition-specific stuff syn clear cuplStatement @@ -53,28 +46,18 @@ syn match cuplsimOutput +"\x\+"+ syn sync minlines=1 " 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_cuplsim_syn_inits") - if version < 508 - let did_cuplsim_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " append to the highlighting links in cupl.vim - " The default highlighting. - HiLink cuplsimOrder cuplStatement - HiLink cuplsimBase cuplStatement - HiLink cuplsimBaseType cuplStatement - HiLink cuplsimVectors cuplStatement - HiLink cuplsimStimulus cuplNumber - HiLink cuplsimOutput cuplNumber - HiLink cuplsimOrderFormat cuplNumber +" Only when an item doesn't have highlighting yet + +" append to the highlighting links in cupl.vim +" The default highlighting. +hi def link cuplsimOrder cuplStatement +hi def link cuplsimBase cuplStatement +hi def link cuplsimBaseType cuplStatement +hi def link cuplsimVectors cuplStatement +hi def link cuplsimStimulus cuplNumber +hi def link cuplsimOutput cuplNumber +hi def link cuplsimOrderFormat cuplNumber - delcommand HiLink -endif let b:current_syntax = "cuplsim" " vim:ts=8 diff --git a/runtime/syntax/cvs.vim b/runtime/syntax/cvs.vim index 94b2a809eb..3eac191637 100644 --- a/runtime/syntax/cvs.vim +++ b/runtime/syntax/cvs.vim @@ -4,11 +4,8 @@ " URL: http://www.zotikos.com/downloads/cvs.vim " Last Change: Sat Nov 24 23:25:11 CET 2001 -" 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 @@ -20,24 +17,14 @@ syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend syn match cvsDir contained "\S\+$" " 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_cvs_syn_inits") - if version < 508 - let did_cvs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink cvsLine Comment - HiLink cvsDir cvsFile - HiLink cvsFile Constant - HiLink cvsFiles cvsCom - HiLink cvsTag cvsCom - HiLink cvsCom Statement +hi def link cvsLine Comment +hi def link cvsDir cvsFile +hi def link cvsFile Constant +hi def link cvsFiles cvsCom +hi def link cvsTag cvsCom +hi def link cvsCom Statement - delcommand HiLink -endif let b:current_syntax = "cvs" diff --git a/runtime/syntax/cweb.vim b/runtime/syntax/cweb.vim index 39b593d2be..4e06b3646d 100644 --- a/runtime/syntax/cweb.vim +++ b/runtime/syntax/cweb.vim @@ -13,11 +13,8 @@ " TODO: names, and leaves C/C++ comments as such. (On the other hand, " TODO: switching to TeX mode in C/C++ comments might be colour overkill.) -" 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 @@ -25,12 +22,8 @@ endif " level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source " code can be seen as a normal TeX document with some C/C++ material " interspersed in certain defined regions. -if version < 600 - source <sfile>:p:h/tex.vim -else - runtime! syntax/tex.vim - unlet b:current_syntax -endif +runtime! syntax/tex.vim +unlet b:current_syntax " Read the C/C++ syntax too; C/C++ syntax items are treated as such in the " C/C++ section of a CWEB chunk or in inner C/C++ context in "|...|" groups. @@ -63,20 +56,10 @@ syntax region webRestrictedTeX start="@[\^\.:t=q]" end="@>" oneline syntax match webIgnoredStuff "@@" " 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_cweb_syntax_inits") - if version < 508 - let did_cweb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink webRestrictedTeX String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link webRestrictedTeX String + let b:current_syntax = "cweb" diff --git a/runtime/syntax/cynlib.vim b/runtime/syntax/cynlib.vim index a9985074d6..24ad2a2e31 100644 --- a/runtime/syntax/cynlib.vim +++ b/runtime/syntax/cynlib.vim @@ -15,22 +15,15 @@ " Remove any old syntax stuff hanging around -" 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 " Read the C++ syntax to start with - this includes the C syntax -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim unlet b:current_syntax " Cynlib extensions @@ -69,23 +62,13 @@ syn match cynlibOperator "<<=" syn keyword cynlibType In Out InST OutST Int Uint Const Cynclock " 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_cynlib_syntax_inits") - if version < 508 - let did_cynlib_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink cynlibOperator Operator - HiLink cynlibMacro Statement - HiLink cynlibFunction Statement - HiLink cynlibppMacro Statement - HiLink cynlibType Type +hi def link cynlibOperator Operator +hi def link cynlibMacro Statement +hi def link cynlibFunction Statement +hi def link cynlibppMacro Statement +hi def link cynlibType Type - delcommand HiLink -endif let b:current_syntax = "cynlib" diff --git a/runtime/syntax/cynpp.vim b/runtime/syntax/cynpp.vim index b984bace35..3064b11a63 100644 --- a/runtime/syntax/cynpp.vim +++ b/runtime/syntax/cynpp.vim @@ -19,21 +19,13 @@ -" Remove any old syntax stuff hanging around -" 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 " Read the Cynlib syntax to start with - this includes the C++ syntax -if version < 600 - source <sfile>:p:h/cynlib.vim -else - runtime! syntax/cynlib.vim -endif +runtime! syntax/cynlib.vim unlet b:current_syntax @@ -49,20 +41,10 @@ syn keyword cynppMacro Thread EndThread syn keyword cynppMacro Instantiate " 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_cynpp_syntax_inits") - if version < 508 - let did_cynpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink cLabel Label - HiLink cynppMacro Statement +hi def link cLabel Label +hi def link cynppMacro Statement - delcommand HiLink -endif let b:current_syntax = "cynpp" diff --git a/runtime/syntax/datascript.vim b/runtime/syntax/datascript.vim index a983b8e34c..7b686a144e 100644 --- a/runtime/syntax/datascript.vim +++ b/runtime/syntax/datascript.vim @@ -8,9 +8,8 @@ " " http://dstools.sourceforge.net/DataScriptLanguageOverview.html -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 diff --git a/runtime/syntax/dcd.vim b/runtime/syntax/dcd.vim index a566745fbe..058d272375 100644 --- a/runtime/syntax/dcd.vim +++ b/runtime/syntax/dcd.vim @@ -3,11 +3,8 @@ " Maintainer: Christopher Shinn <christopher@lucent.com> " Last Change: 2003 Apr 25 -" 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 @@ -40,25 +37,15 @@ syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8 syn region dcdComment start="\*" end="\;" " 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_dcd_syntax_inits") - if version < 508 - let did_dcd_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink dcdFunction Identifier - HiLink dcdLabel Constant - HiLink dcdConditional Conditional - HiLink dcdDisplay Type - HiLink dcdStatement Statement - HiLink dcdSpecial Special - HiLink dcdComment Comment +hi def link dcdFunction Identifier +hi def link dcdLabel Constant +hi def link dcdConditional Conditional +hi def link dcdDisplay Type +hi def link dcdStatement Statement +hi def link dcdSpecial Special +hi def link dcdComment Comment - delcommand HiLink -endif let b:current_syntax = "dcd" diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim index 73bf577e3e..b973db3434 100644 --- a/runtime/syntax/dcl.vim +++ b/runtime/syntax/dcl.vim @@ -1,15 +1,12 @@ " Vim syntax file " Language: DCL (Digital Command Language - vms) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: May 02, 2016 -" Version: 9 +" Last Change: Aug 31, 2016 +" Version: 11 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_DCL -" 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 @@ -111,49 +108,40 @@ syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end= syn match dclError ")" " 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_dcl_syntax_inits") - if version < 508 - let did_dcl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dclLogOper dclError - HiLink dclLogical dclOper - HiLink dclLogSep dclSep - - HiLink dclAssign Operator - HiLink dclCmdProc Special - HiLink dclCmdProcStart Operator - HiLink dclComment Comment - HiLink dclContinue Statement - HiLink dclDevice Identifier - HiLink dclDirPath Identifier - HiLink dclDirPath Identifier - HiLink dclDirSep Delimiter - HiLink dclError Error - HiLink dclExe Statement - HiLink dclFilename NONE - HiLink dclGotoLabel Label - HiLink dclInstr Statement - HiLink dclLexical Function - HiLink dclMdfy Type - HiLink dclMdfyBrkt Delimiter - HiLink dclMdfySep Delimiter - HiLink dclMdfySet Type - HiLink dclMdfySetString String - HiLink dclNumber Number - HiLink dclOper Operator - HiLink dclParam Special - HiLink dclSep Delimiter - HiLink dclStart Delimiter - HiLink dclString String - HiLink dclTodo Todo - - delcommand HiLink +if !exists("skip_dcl_syntax_inits") + + hi def link dclLogOper dclError + hi def link dclLogical dclOper + hi def link dclLogSep dclSep + + hi def link dclAssign Operator + hi def link dclCmdProc Special + hi def link dclCmdProcStart Operator + hi def link dclComment Comment + hi def link dclContinue Statement + hi def link dclDevice Identifier + hi def link dclDirPath Identifier + hi def link dclDirPath Identifier + hi def link dclDirSep Delimiter + hi def link dclError Error + hi def link dclExe Statement + hi def link dclFilename NONE + hi def link dclGotoLabel Label + hi def link dclInstr Statement + hi def link dclLexical Function + hi def link dclMdfy Type + hi def link dclMdfyBrkt Delimiter + hi def link dclMdfySep Delimiter + hi def link dclMdfySet Type + hi def link dclMdfySetString String + hi def link dclNumber Number + hi def link dclOper Operator + hi def link dclParam Special + hi def link dclSep Delimiter + hi def link dclStart Delimiter + hi def link dclString String + hi def link dclTodo Todo + endif let b:current_syntax = "dcl" diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index d0c658c75e..a10e4ad342 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,13 +3,11 @@ " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2016 Apr 24 +" Last Change: 2016 Aug 30 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -36,28 +34,17 @@ syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline " Associate our matches and regions with pretty colours -if version >= 508 || !exists("did_debchangelog_syn_inits") - if version < 508 - let did_debchangelog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink debchangelogHeader Error - HiLink debchangelogFooter Identifier - HiLink debchangelogEntry Normal - HiLink debchangelogCloses Statement - HiLink debchangelogLP Statement - HiLink debchangelogFirstKV Identifier - HiLink debchangelogOtherKV Identifier - HiLink debchangelogName Comment - HiLink debchangelogVersion Identifier - HiLink debchangelogTarget Identifier - HiLink debchangelogEmail Special - - delcommand HiLink -endif +hi def link debchangelogHeader Error +hi def link debchangelogFooter Identifier +hi def link debchangelogEntry Normal +hi def link debchangelogCloses Statement +hi def link debchangelogLP Statement +hi def link debchangelogFirstKV Identifier +hi def link debchangelogOtherKV Identifier +hi def link debchangelogName Comment +hi def link debchangelogVersion Identifier +hi def link debchangelogTarget Identifier +hi def link debchangelogEmail Special let b:current_syntax = "debchangelog" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index 4fb53a55ca..b52c496c95 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,13 +3,11 @@ " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2015 Oct 24 +" Last Change: 2016 Aug 30 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -28,7 +26,7 @@ syn match debControlSpace " " let s:kernels = '\%(linux\|hurd\|kfreebsd\|knetbsd\|kopensolaris\|netbsd\)' let s:archs = '\%(alpha\|amd64\|armeb\|armel\|armhf\|arm64\|avr32\|hppa\|i386' - \ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips\|powerpcspe\|powerpc\|ppc64el' + \ . '\|ia64\|lpia\|m32r\|m68k\|mipsel\|mips64el\|mips\|powerpcspe\|powerpc\|ppc64el' \ . '\|ppc64\|s390x\|s390\|sh3eb\|sh3\|sh4eb\|sh4\|sh\|sparc64\|sparc\|x32\)' let s:pairs = 'hurd-i386\|kfreebsd-i386\|kfreebsd-amd64\|knetbsd-i386\|kopensolaris-i386\|netbsd-alpha\|netbsd-i386' @@ -86,37 +84,26 @@ syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Inde syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^ " end="^$"me=s-1 end="^[^ #]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Associate our matches and regions with pretty colours -if version >= 508 || !exists("did_debcontrol_syn_inits") - if version < 508 - let did_debcontrol_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink debcontrolKey Keyword - HiLink debcontrolField Normal - HiLink debcontrolStrictField Error - HiLink debcontrolDeprecatedKey Error - HiLink debcontrolMultiField Normal - HiLink debcontrolArchitecture Normal - HiLink debcontrolMultiArch Normal - HiLink debcontrolName Normal - HiLink debcontrolPriority Normal - HiLink debcontrolSection Normal - HiLink debcontrolPackageType Normal - HiLink debcontrolVariable Identifier - HiLink debcontrolEmail Identifier - HiLink debcontrolVcsSvn Identifier - HiLink debcontrolVcsCvs Identifier - HiLink debcontrolVcsGit Identifier - HiLink debcontrolHTTPUrl Identifier - HiLink debcontrolDmUpload Identifier - HiLink debcontrolComment Comment - HiLink debcontrolElse Special - - delcommand HiLink -endif +hi def link debcontrolKey Keyword +hi def link debcontrolField Normal +hi def link debcontrolStrictField Error +hi def link debcontrolDeprecatedKey Error +hi def link debcontrolMultiField Normal +hi def link debcontrolArchitecture Normal +hi def link debcontrolMultiArch Normal +hi def link debcontrolName Normal +hi def link debcontrolPriority Normal +hi def link debcontrolSection Normal +hi def link debcontrolPackageType Normal +hi def link debcontrolVariable Identifier +hi def link debcontrolEmail Identifier +hi def link debcontrolVcsSvn Identifier +hi def link debcontrolVcsCvs Identifier +hi def link debcontrolVcsGit Identifier +hi def link debcontrolHTTPUrl Identifier +hi def link debcontrolDmUpload Identifier +hi def link debcontrolComment Comment +hi def link debcontrolElse Special let b:current_syntax = "debcontrol" diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index d35e24729d..2777944971 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,13 +2,11 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2016 Apr 24 +" Last Change: 2016 Sep 27 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim " Standard syntax initialization -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -27,7 +25,7 @@ let s:supported = [ \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', \ - \ 'precise', 'trusty', 'wily', 'xenial', 'yakkety', 'devel' + \ 'precise', 'trusty', 'xenial', 'yakkety', 'devel' \ ] let s:unsupported = [ \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', @@ -36,12 +34,12 @@ let s:unsupported = [ \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy', - \ 'utopic', 'vivid' + \ 'utopic', 'vivid', 'wily' \ ] let &cpo=s:cpo " Match uri's -syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+' exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+' diff --git a/runtime/syntax/def.vim b/runtime/syntax/def.vim index 5efb41bc43..a17714c41e 100644 --- a/runtime/syntax/def.vim +++ b/runtime/syntax/def.vim @@ -5,11 +5,8 @@ " Last Change: $Date: 2007/10/02 13:51:24 $ " $Revision: 1.2 $ -" 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 @@ -32,25 +29,15 @@ syn match defNumber "0x\x\+" " 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_def_syntax_inits") - if version < 508 - let did_def_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink defComment Comment - HiLink defKeyword Keyword - HiLink defStorage StorageClass - HiLink defString String - HiLink defNumber Number - HiLink defOrdinal Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link defComment Comment +hi def link defKeyword Keyword +hi def link defStorage StorageClass +hi def link defString String +hi def link defNumber Number +hi def link defOrdinal Operator + let b:current_syntax = "def" diff --git a/runtime/syntax/desc.vim b/runtime/syntax/desc.vim index ca47176ff7..84b9cd0f34 100644 --- a/runtime/syntax/desc.vim +++ b/runtime/syntax/desc.vim @@ -3,11 +3,8 @@ " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org> " Last Change: 2006 Aug 14 -" 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 @@ -63,40 +60,29 @@ syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descF syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense -" For version 5.7 and earlier: only when not done already -" Define the default highlighting. -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_desc_syntax_inits") - if version < 508 - let did_desc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink descFlag Identifier - HiLink descLicense Identifier - HiLink descCategory Identifier - - HiLink descTag Type - HiLink descUrl Underlined - HiLink descEmail Underlined - - " priority tag colors - HiLink descInstallX Boolean - HiLink descInstallO Type - HiLink descDash Operator - HiLink descDigit Number - HiLink descCompilePriority Number - - " download tag colors - HiLink descSum Number - HiLink descTarball Underlined - - " tag region colors - HiLink descText Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link descFlag Identifier +hi def link descLicense Identifier +hi def link descCategory Identifier + +hi def link descTag Type +hi def link descUrl Underlined +hi def link descEmail Underlined + +" priority tag colors +hi def link descInstallX Boolean +hi def link descInstallO Type +hi def link descDash Operator +hi def link descDigit Number +hi def link descCompilePriority Number + +" download tag colors +hi def link descSum Number +hi def link descTarball Underlined + +" tag region colors +hi def link descText Comment + let b:current_syntax = "desc" diff --git a/runtime/syntax/desktop.vim b/runtime/syntax/desktop.vim index 27dac5c8ee..915107887a 100644 --- a/runtime/syntax/desktop.vim +++ b/runtime/syntax/desktop.vim @@ -7,11 +7,8 @@ " (added "Keywords") " Version Info: desktop.vim 0.9.4-1.2 -" 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 @@ -79,41 +76,31 @@ syn match dtALocale /\[.\{-}\]\s*=\@=/ containedin=ALL " 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_desktop_syntax_inits") - if version < 508 - let did_dosini_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dtGroup Special - HiLink dtComment Comment - HiLink dtDelim String - - HiLink dtLocaleKey Type - HiLink dtLocaleName Identifier - HiLink dtXLocale Identifier - HiLink dtALocale Identifier - - HiLink dtNumericKey Type - - HiLink dtBooleanKey Type - HiLink dtBooleanValue Constant - - HiLink dtStringKey Type - - HiLink dtExecKey Type - HiLink dtExecParam Special - HiLink dtTypeKey Type - HiLink dtTypeValue Constant - HiLink dtNotStLabel Type - HiLink dtXAddKey Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dtGroup Special +hi def link dtComment Comment +hi def link dtDelim String + +hi def link dtLocaleKey Type +hi def link dtLocaleName Identifier +hi def link dtXLocale Identifier +hi def link dtALocale Identifier + +hi def link dtNumericKey Type + +hi def link dtBooleanKey Type +hi def link dtBooleanValue Constant + +hi def link dtStringKey Type + +hi def link dtExecKey Type +hi def link dtExecParam Special +hi def link dtTypeKey Type +hi def link dtTypeValue Constant +hi def link dtNotStLabel Type +hi def link dtXAddKey Type + let b:current_syntax = "desktop" diff --git a/runtime/syntax/diva.vim b/runtime/syntax/diva.vim index 78668fd85a..127a0b4663 100644 --- a/runtime/syntax/diva.vim +++ b/runtime/syntax/diva.vim @@ -11,11 +11,7 @@ " Don't remove any old syntax stuff hanging around! We need stuff " from skill.vim. if !exists("did_skill_syntax_inits") - if version < 600 - so <sfile>:p:h/skill.vim - else - runtime! syntax/skill.vim - endif + runtime! syntax/skill.vim endif syn keyword divaDRCKeywords area enc notch ovlp sep width @@ -81,29 +77,19 @@ syn match divaGeomFunctions "(geom\u\a\+\(45\|90\)\=\>"hs=s+1 syn match divaGeomFunctions "\<geom\u\a\+\(45\|90\)\=("he=e-1 " 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_diva_syntax_inits") - if version < 508 - let did_diva_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink divaDRCKeywords Statement - HiLink divaMeasKeywords Statement - HiLink divaCtrlFunctions Conditional - HiLink divaExtFunctions Function - HiLink divaDRCFunctions Function - HiLink divaFunctions Function - HiLink divaLayerFunctions Function - HiLink divaChkFunctions Function - HiLink divaLVSFunctions Function - HiLink divaGeomFunctions Function +hi def link divaDRCKeywords Statement +hi def link divaMeasKeywords Statement +hi def link divaCtrlFunctions Conditional +hi def link divaExtFunctions Function +hi def link divaDRCFunctions Function +hi def link divaFunctions Function +hi def link divaLayerFunctions Function +hi def link divaChkFunctions Function +hi def link divaLVSFunctions Function +hi def link divaGeomFunctions Function - delcommand HiLink -endif let b:current_syntax = "diva" diff --git a/runtime/syntax/django.vim b/runtime/syntax/django.vim index da315ac302..d3ca4de0e2 100644 --- a/runtime/syntax/django.vim +++ b/runtime/syntax/django.vim @@ -3,11 +3,8 @@ " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2014 Jul 13 -" 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 @@ -68,29 +65,19 @@ syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomm syn region djangoComBlock start="{#" end="#}" contains=djangoTodo " 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_django_syn_inits") - if version < 508 - let did_django_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink djangoTagBlock PreProc - HiLink djangoVarBlock PreProc - HiLink djangoStatement Statement - HiLink djangoFilter Identifier - HiLink djangoArgument Constant - HiLink djangoTagError Error - HiLink djangoVarError Error - HiLink djangoError Error - HiLink djangoComment Comment - HiLink djangoComBlock Comment - HiLink djangoTodo Todo +hi def link djangoTagBlock PreProc +hi def link djangoVarBlock PreProc +hi def link djangoStatement Statement +hi def link djangoFilter Identifier +hi def link djangoArgument Constant +hi def link djangoTagError Error +hi def link djangoVarError Error +hi def link djangoError Error +hi def link djangoComment Comment +hi def link djangoComBlock Comment +hi def link djangoTodo Todo - delcommand HiLink -endif let b:current_syntax = "django" diff --git a/runtime/syntax/dnsmasq.vim b/runtime/syntax/dnsmasq.vim index 9fa32077b6..a4cc8b577b 100644 --- a/runtime/syntax/dnsmasq.vim +++ b/runtime/syntax/dnsmasq.vim @@ -20,10 +20,8 @@ " endif " -" For version 5.x: Clear all syntax items -if v:version < 600 - syntax clear -elseif exists("b:current_syntax") || &compatible +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible finish endif diff --git a/runtime/syntax/docbk.vim b/runtime/syntax/docbk.vim index fc679eecaf..809f2894e6 100644 --- a/runtime/syntax/docbk.vim +++ b/runtime/syntax/docbk.vim @@ -13,11 +13,8 @@ " http://www.open-oasis.org/docbook/ " -" 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 @@ -174,26 +171,15 @@ syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=x syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend " 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_docbk_syn_inits") - if version < 508 - let did_docbk_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - hi DocbkBold term=bold cterm=bold gui=bold - else - command -nargs=+ HiLink hi def link <args> - hi def DocbkBold term=bold cterm=bold gui=bold - endif +" Only when an item doesn't have highlighting yet +hi def DocbkBold term=bold cterm=bold gui=bold - HiLink docbkKeyword Statement - HiLink docbkRegion DocbkBold - HiLink docbkTitle Title - HiLink docbkRemark Comment - HiLink docbkCite Constant +hi def link docbkKeyword Statement +hi def link docbkRegion DocbkBold +hi def link docbkTitle Title +hi def link docbkRemark Comment +hi def link docbkCite Constant - delcommand HiLink -endif let b:current_syntax = "docbk" diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim index d9b1aa6703..249e6f7c46 100644 --- a/runtime/syntax/dosbatch.vim +++ b/runtime/syntax/dosbatch.vim @@ -9,11 +9,8 @@ " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] " -" 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 @@ -111,49 +108,39 @@ syn keyword dosbatchImplicit sort start subst time title tree type ver verify syn keyword dosbatchImplicit vol xcopy " 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_dosbatch_syntax_inits") - if version < 508 - let did_dosbatch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dosbatchTodo Todo - - HiLink dosbatchStatement Statement - HiLink dosbatchCommands dosbatchStatement - HiLink dosbatchLabel Label - HiLink dosbatchConditional Conditional - HiLink dosbatchRepeat Repeat - - HiLink dosbatchOperator Operator - HiLink dosbatchEchoOperator dosbatchOperator - HiLink dosbatchIfOperator dosbatchOperator - - HiLink dosbatchArgument Identifier - HiLink dosbatchIdentifier Identifier - HiLink dosbatchVariable dosbatchIdentifier - - HiLink dosbatchSpecialChar SpecialChar - HiLink dosbatchString String - HiLink dosbatchNumber Number - HiLink dosbatchInteger dosbatchNumber - HiLink dosbatchHex dosbatchNumber - HiLink dosbatchBinary dosbatchNumber - HiLink dosbatchOctal dosbatchNumber - - HiLink dosbatchComment Comment - HiLink dosbatchImplicit Function - - HiLink dosbatchSwitch Special - - HiLink dosbatchCmd PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dosbatchTodo Todo + +hi def link dosbatchStatement Statement +hi def link dosbatchCommands dosbatchStatement +hi def link dosbatchLabel Label +hi def link dosbatchConditional Conditional +hi def link dosbatchRepeat Repeat + +hi def link dosbatchOperator Operator +hi def link dosbatchEchoOperator dosbatchOperator +hi def link dosbatchIfOperator dosbatchOperator + +hi def link dosbatchArgument Identifier +hi def link dosbatchIdentifier Identifier +hi def link dosbatchVariable dosbatchIdentifier + +hi def link dosbatchSpecialChar SpecialChar +hi def link dosbatchString String +hi def link dosbatchNumber Number +hi def link dosbatchInteger dosbatchNumber +hi def link dosbatchHex dosbatchNumber +hi def link dosbatchBinary dosbatchNumber +hi def link dosbatchOctal dosbatchNumber + +hi def link dosbatchComment Comment +hi def link dosbatchImplicit Function + +hi def link dosbatchSwitch Special + +hi def link dosbatchCmd PreProc + let b:current_syntax = "dosbatch" diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim index e474f21116..ccc5e86f1b 100644 --- a/runtime/syntax/dosini.vim +++ b/runtime/syntax/dosini.vim @@ -9,11 +9,8 @@ " Last Change: 2011 Nov 8 -" 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 @@ -28,23 +25,13 @@ syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" " 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_dosini_syntax_inits") - if version < 508 - let did_dosini_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dosiniNumber Number - HiLink dosiniHeader Special - HiLink dosiniComment Comment - HiLink dosiniLabel Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dosiniNumber Number +hi def link dosiniHeader Special +hi def link dosiniComment Comment +hi def link dosiniLabel Type + let b:current_syntax = "dosini" diff --git a/runtime/syntax/dot.vim b/runtime/syntax/dot.vim index 4cc6f4f21d..0fdd6ea080 100644 --- a/runtime/syntax/dot.vim +++ b/runtime/syntax/dot.vim @@ -6,11 +6,8 @@ " Last Change: 2011 May 17 - improved identifier matching + two new keywords " 2001 May 04 - initial version -" 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 @@ -74,36 +71,26 @@ syn sync minlines=50 syn sync maxlines=500 " 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_dot_syntax_inits") - if version < 508 - let did_dot_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dotParErr Error - HiLink dotBraceErr Error - HiLink dotBrackErr Error - - HiLink dotComment Comment - HiLink dotTodo Todo - - HiLink dotParEncl Keyword - HiLink dotBrackEncl Keyword - HiLink dotBraceEncl Keyword - - HiLink dotKeyword Keyword - HiLink dotType Type - HiLink dotKeyChar Keyword - - HiLink dotString String - HiLink dotIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dotParErr Error +hi def link dotBraceErr Error +hi def link dotBrackErr Error + +hi def link dotComment Comment +hi def link dotTodo Todo + +hi def link dotParEncl Keyword +hi def link dotBrackEncl Keyword +hi def link dotBraceEncl Keyword + +hi def link dotKeyword Keyword +hi def link dotType Type +hi def link dotKeyChar Keyword + +hi def link dotString String +hi def link dotIdentifier Identifier + let b:current_syntax = "dot" diff --git a/runtime/syntax/dracula.vim b/runtime/syntax/dracula.vim index 6a3806028e..a373dc200c 100644 --- a/runtime/syntax/dracula.vim +++ b/runtime/syntax/dracula.vim @@ -8,11 +8,8 @@ " the purposes of Design Rule Checking, Layout vs. Schematic " verification, and Layout Parameter Extraction. -" 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 @@ -61,24 +58,14 @@ syn match draculaPreProc "^#.*" syn sync lines=50 " 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_dracula_syn_inits") - if version < 508 - let did_dracula_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink draculaIdentifier Identifier - HiLink draculaStatement Statement - HiLink draculaType Type - HiLink draculaComment Comment - HiLink draculaPreProc PreProc +hi def link draculaIdentifier Identifier +hi def link draculaStatement Statement +hi def link draculaType Type +hi def link draculaComment Comment +hi def link draculaPreProc PreProc - delcommand HiLink -endif let b:current_syntax = "dracula" diff --git a/runtime/syntax/dtd.vim b/runtime/syntax/dtd.vim index 001dbbddd3..ae0bd1288e 100644 --- a/runtime/syntax/dtd.vim +++ b/runtime/syntax/dtd.vim @@ -126,41 +126,31 @@ syn keyword dtdTodo contained TODO FIXME XXX syn sync lines=250 " 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_dtd_syn_inits") - if version < 508 - let did_dtd_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink dtdFunction Function - HiLink dtdTag Normal - HiLink dtdType Type - HiLink dtdAttrType dtdType - HiLink dtdAttrDef dtdType - HiLink dtdConstant Constant - HiLink dtdString dtdConstant - HiLink dtdEnum dtdConstant - HiLink dtdCard dtdFunction - - HiLink dtdEntity Statement - HiLink dtdEntityPunct dtdType - HiLink dtdParamEntityInst dtdConstant - HiLink dtdParamEntityPunct dtdType - HiLink dtdParamEntityDecl dtdType - HiLink dtdParamEntityDPunct dtdComment - - HiLink dtdComment Comment - HiLink dtdTagName Statement - HiLink dtdError Error - HiLink dtdTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link dtdFunction Function +hi def link dtdTag Normal +hi def link dtdType Type +hi def link dtdAttrType dtdType +hi def link dtdAttrDef dtdType +hi def link dtdConstant Constant +hi def link dtdString dtdConstant +hi def link dtdEnum dtdConstant +hi def link dtdCard dtdFunction + +hi def link dtdEntity Statement +hi def link dtdEntityPunct dtdType +hi def link dtdParamEntityInst dtdConstant +hi def link dtdParamEntityPunct dtdType +hi def link dtdParamEntityDecl dtdType +hi def link dtdParamEntityDPunct dtdComment + +hi def link dtdComment Comment +hi def link dtdTagName Statement +hi def link dtdError Error +hi def link dtdTodo Todo + let &cpo = s:dtd_cpo_save unlet s:dtd_cpo_save diff --git a/runtime/syntax/dtml.vim b/runtime/syntax/dtml.vim index 7de722aabd..cb09de8091 100644 --- a/runtime/syntax/dtml.vim +++ b/runtime/syntax/dtml.vim @@ -9,20 +9,13 @@ " hacked out of the Zope Quick Reference in case someone finds something " sensible to do with them. I certainly haven't. -" 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 " First load the HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim syn case match @@ -196,25 +189,15 @@ syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagNa syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster " 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_dtml_syntax_inits") - if version < 508 - let did_dtml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dtmlIsTag PreProc - HiLink dtmlAttribute Identifier - HiLink dtmlMethod Function - HiLink dtmlComment Comment - HiLink dtmlTODO Todo - HiLink dtmlSpecialChar Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dtmlIsTag PreProc +hi def link dtmlAttribute Identifier +hi def link dtmlMethod Function +hi def link dtmlComment Comment +hi def link dtmlTODO Todo +hi def link dtmlSpecialChar Special + let b:current_syntax = "dtml" diff --git a/runtime/syntax/dtrace.vim b/runtime/syntax/dtrace.vim index 493de1ed0f..7ed9766e77 100644 --- a/runtime/syntax/dtrace.vim +++ b/runtime/syntax/dtrace.vim @@ -10,19 +10,14 @@ " http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_lex.l " http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdtrace/common/dt_grammar.y -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 " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim - unlet b:current_syntax -endif +runtime! syntax/c.vim +unlet b:current_syntax syn clear cCommentL " dtrace doesn't support // style comments diff --git a/runtime/syntax/dylan.vim b/runtime/syntax/dylan.vim index 14262d53d6..345e932e60 100644 --- a/runtime/syntax/dylan.vim +++ b/runtime/syntax/dylan.vim @@ -8,21 +8,14 @@ " syntax files. " Part 1: Syntax definition -" 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 syn case ignore -if version < 600 - set lisp -else - setlocal lisp -endif +setlocal lisp " Highlight special characters (those that have backslashes) differently syn match dylanSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" @@ -67,42 +60,32 @@ syn region dylanPrecondit start="^\s*#\s*\(if\>\|else\>\|endif\>\)" skip="\\$" syn region dylanHeader start="^[Mm]odule:" end="^$" " 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_dylan_syntax_inits") - if version < 508 - let did_dylan_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink dylanBlock PreProc - HiLink dylanBoolean Boolean - HiLink dylanCharacter Character - HiLink dylanClass Structure - HiLink dylanClassMods StorageClass - HiLink dylanComment Comment - HiLink dylanConditional Conditional - HiLink dylanConstant Constant - HiLink dylanException Exception - HiLink dylanHeader Macro - HiLink dylanImport Include - HiLink dylanLabel Label - HiLink dylanMiscMods StorageClass - HiLink dylanNumber Number - HiLink dylanOther Keyword - HiLink dylanOperator Operator - HiLink dylanParamDefs Keyword - HiLink dylanPrecondit PreCondit - HiLink dylanRepeat Repeat - HiLink dylanSimpleDefs Keyword - HiLink dylanStatement Macro - HiLink dylanString String - HiLink dylanVariable Identifier +hi def link dylanBlock PreProc +hi def link dylanBoolean Boolean +hi def link dylanCharacter Character +hi def link dylanClass Structure +hi def link dylanClassMods StorageClass +hi def link dylanComment Comment +hi def link dylanConditional Conditional +hi def link dylanConstant Constant +hi def link dylanException Exception +hi def link dylanHeader Macro +hi def link dylanImport Include +hi def link dylanLabel Label +hi def link dylanMiscMods StorageClass +hi def link dylanNumber Number +hi def link dylanOther Keyword +hi def link dylanOperator Operator +hi def link dylanParamDefs Keyword +hi def link dylanPrecondit PreCondit +hi def link dylanRepeat Repeat +hi def link dylanSimpleDefs Keyword +hi def link dylanStatement Macro +hi def link dylanString String +hi def link dylanVariable Identifier - delcommand HiLink -endif let b:current_syntax = "dylan" diff --git a/runtime/syntax/dylanintr.vim b/runtime/syntax/dylanintr.vim index 11ef816681..692db34985 100644 --- a/runtime/syntax/dylanintr.vim +++ b/runtime/syntax/dylanintr.vim @@ -4,11 +4,8 @@ " Last Change: Fri Sep 29 13:53:27 PDT 2000 " -" 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 @@ -26,26 +23,16 @@ syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded "syn keyword intrMods pointer struct " 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_dylan_intr_syntax_inits") - if version < 508 - let did_dylan_intr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dylanintrInfo Special - HiLink dylanintrInterface Operator - HiLink dylanintrMods Type - HiLink dylanintrClass StorageClass - HiLink dylanintrType Type - HiLink dylanintrIncluded String - HiLink dylanintrInclude Include - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dylanintrInfo Special +hi def link dylanintrInterface Operator +hi def link dylanintrMods Type +hi def link dylanintrClass StorageClass +hi def link dylanintrType Type +hi def link dylanintrIncluded String +hi def link dylanintrInclude Include + let b:current_syntax = "dylanintr" diff --git a/runtime/syntax/dylanlid.vim b/runtime/syntax/dylanlid.vim index ec7b40114c..dae0bf94b1 100644 --- a/runtime/syntax/dylanlid.vim +++ b/runtime/syntax/dylanlid.vim @@ -5,11 +5,8 @@ " Last Change: Fri Sep 29 13:50:20 PDT 2000 " -" 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 @@ -21,21 +18,11 @@ syn region dylanlidEntry matchgroup=Statement start=":%" end="$" oneline syn sync lines=50 " 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_dylan_lid_syntax_inits") - if version < 508 - let did_dylan_lid_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink dylanlidInfo Type - HiLink dylanlidEntry String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link dylanlidInfo Type +hi def link dylanlidEntry String + let b:current_syntax = "dylanlid" diff --git a/runtime/syntax/ecd.vim b/runtime/syntax/ecd.vim index fff7a4b883..1276f2bd9d 100644 --- a/runtime/syntax/ecd.vim +++ b/runtime/syntax/ecd.vim @@ -8,10 +8,8 @@ " This syntax file was derived from apachestyle.vim " by Christian Hammers <ch@westend.com> -" 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 @@ -31,26 +29,16 @@ syn match ecdTagN contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1 syn match ecdTagError contained "[^>]<"ms=s+1 " 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_ecd_syn_inits") - if version < 508 - let did_ecd_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ecdComment Comment - HiLink ecdAttr Type - HiLink ecdAttrN Statement - HiLink ecdAttrV Value - HiLink ecdTag Function - HiLink ecdTagN Statement - HiLink ecdTagError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link ecdComment Comment +hi def link ecdAttr Type +hi def link ecdAttrN Statement +hi def link ecdAttrV Value +hi def link ecdTag Function +hi def link ecdTagN Statement +hi def link ecdTagError Error + let b:current_syntax = "ecd" " vim: ts=8 diff --git a/runtime/syntax/edif.vim b/runtime/syntax/edif.vim index 0c17834947..002c9f89e1 100644 --- a/runtime/syntax/edif.vim +++ b/runtime/syntax/edif.vim @@ -8,18 +8,12 @@ " IEC 61690-1 (EDIF Version 3 0 0) " IEC 61690-2 (EDIF Version 4 0 0) -" 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 -if version >= 600 - setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& -else - set iskeyword=A-Z,a-z,_,& -endif +setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber @@ -37,28 +31,15 @@ syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained syn match edifError ")" " synchronization -if version < 600 - syntax sync maxlines=250 -else - syntax sync fromstart -endif +syntax sync fromstart " Define the default highlighting. -if version >= 508 || !exists("did_edif_syntax_inits") - if version < 508 - let did_edif_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink edifInString SpecialChar - HiLink edifKeyword Keyword - HiLink edifNumber Number - HiLink edifInStringError edifError - HiLink edifError Error - HiLink edifString String - delcommand HiLink -endif +hi def link edifInString SpecialChar +hi def link edifKeyword Keyword +hi def link edifNumber Number +hi def link edifInStringError edifError +hi def link edifError Error +hi def link edifString String let b:current_syntax = "edif" diff --git a/runtime/syntax/eiffel.vim b/runtime/syntax/eiffel.vim index a91f85d03e..c6634871cc 100644 --- a/runtime/syntax/eiffel.vim +++ b/runtime/syntax/eiffel.vim @@ -5,11 +5,8 @@ " Contributions from: Thilo Six " " URL: https://github.com/eiffelhub/vim-eiffel -" 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 @@ -141,68 +138,58 @@ endif syn sync lines=40 " 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_eiffel_syntax_inits") - if version < 508 - let did_eiffel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink eiffelKeyword Statement - HiLink eiffelProperty Statement - HiLink eiffelInheritClause Statement - HiLink eiffelStatement Statement - HiLink eiffelDeclaration Statement - HiLink eiffelAssertion Statement - HiLink eiffelDebug Statement - HiLink eiffelException Statement - HiLink eiffelGenericCreate Statement +hi def link eiffelKeyword Statement +hi def link eiffelProperty Statement +hi def link eiffelInheritClause Statement +hi def link eiffelStatement Statement +hi def link eiffelDeclaration Statement +hi def link eiffelAssertion Statement +hi def link eiffelDebug Statement +hi def link eiffelException Statement +hi def link eiffelGenericCreate Statement - HiLink eiffelAgent Statement - HiLink eiffelConvert Statement +hi def link eiffelAgent Statement +hi def link eiffelConvert Statement - HiLink eiffelTopStruct PreProc +hi def link eiffelTopStruct PreProc - HiLink eiffelAll Special - HiLink eiffelAnchored Special - HiLink eiffelBitType Special +hi def link eiffelAll Special +hi def link eiffelAnchored Special +hi def link eiffelBitType Special - HiLink eiffelBool Boolean - HiLink eiffelString String - HiLink eiffelCharacter Character - HiLink eiffelClassName Type - HiLink eiffelNumber Number +hi def link eiffelBool Boolean +hi def link eiffelString String +hi def link eiffelCharacter Character +hi def link eiffelClassName Type +hi def link eiffelNumber Number - HiLink eiffelStringEscape Special +hi def link eiffelStringEscape Special - HiLink eiffelOperator Special - HiLink eiffelArray Special - HiLink eiffelExport Special - HiLink eiffelCreation Special - HiLink eiffelBrackets Special - HiLink eiffelGeneric Special - HiLink eiffelGenericDecl Special - HiLink eiffelConstraint Special - HiLink eiffelCreate Special +hi def link eiffelOperator Special +hi def link eiffelArray Special +hi def link eiffelExport Special +hi def link eiffelCreation Special +hi def link eiffelBrackets Special +hi def link eiffelGeneric Special +hi def link eiffelGenericDecl Special +hi def link eiffelConstraint Special +hi def link eiffelCreate Special - HiLink eiffelPredefined Constant +hi def link eiffelPredefined Constant - HiLink eiffelComment Comment +hi def link eiffelComment Comment - HiLink eiffelError Error - HiLink eiffelBadConstant Error - HiLink eiffelStringError Error - HiLink eiffelParenError Error - HiLink eiffelBracketError Error +hi def link eiffelError Error +hi def link eiffelBadConstant Error +hi def link eiffelStringError Error +hi def link eiffelParenError Error +hi def link eiffelBracketError Error - HiLink eiffelTodo Todo +hi def link eiffelTodo Todo - delcommand HiLink -endif let b:current_syntax = "eiffel" diff --git a/runtime/syntax/elf.vim b/runtime/syntax/elf.vim index 621e063ff8..e695dbc79a 100644 --- a/runtime/syntax/elf.vim +++ b/runtime/syntax/elf.vim @@ -10,11 +10,8 @@ " This is the Applix Inc., Macro and Builder programming language. " It has nothing in common with the binary format called ELF. -" 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 @@ -63,32 +60,22 @@ syn match elfParens "[\[\]()]" syn match elfPunct "[,;]" " 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_elf_syn_inits") - if version < 508 - let did_elf_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later. - HiLink elfComment Comment - HiLink elfPPCom Include - HiLink elfKeyword Keyword - HiLink elfSpecial Special - HiLink elfEnvironment Special - HiLink elfBraceError Error - HiLink elfConditional Conditional - HiLink elfMacro Function - HiLink elfNumber Number - HiLink elfString String - HiLink elfParens Delimiter - HiLink elfPunct Delimiter - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later. +hi def link elfComment Comment +hi def link elfPPCom Include +hi def link elfKeyword Keyword +hi def link elfSpecial Special +hi def link elfEnvironment Special +hi def link elfBraceError Error +hi def link elfConditional Conditional +hi def link elfMacro Function +hi def link elfNumber Number +hi def link elfString String +hi def link elfParens Delimiter +hi def link elfPunct Delimiter + let b:current_syntax = "elf" diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim index e7d5df22aa..ec97af038d 100644 --- a/runtime/syntax/elmfilt.vim +++ b/runtime/syntax/elmfilt.vim @@ -1,15 +1,12 @@ " Vim syntax file " Language: Elm Filter rules " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 6 +" Last Change: Aug 31, 2016 +" Version: 8 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT -" 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 @@ -38,32 +35,23 @@ syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" con syn match elmfiltSpaceError contained "\s.*$" " 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_elmfilt_syntax_inits") - if version < 508 - let did_elmfilt_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +if !exists("skip_elmfilt_syntax_inits") + + hi def link elmfiltAction Statement + hi def link elmfiltArg Special + hi def link elmfiltComment Comment + hi def link elmfiltCond Statement + hi def link elmfiltIf Statement + hi def link elmfiltMatch Special + hi def link elmfiltMatchError Error + hi def link elmfiltNumber Number + hi def link elmfiltOper Operator + hi def link elmfiltOperKey Type + hi def link elmfiltParenError Error + hi def link elmfiltSpaceError Error + hi def link elmfiltString String + hi def link elmfiltThenError Error - HiLink elmfiltAction Statement - HiLink elmfiltArg Special - HiLink elmfiltComment Comment - HiLink elmfiltCond Statement - HiLink elmfiltIf Statement - HiLink elmfiltMatch Special - HiLink elmfiltMatchError Error - HiLink elmfiltNumber Number - HiLink elmfiltOper Operator - HiLink elmfiltOperKey Type - HiLink elmfiltParenError Error - HiLink elmfiltSpaceError Error - HiLink elmfiltString String - HiLink elmfiltThenError Error - - delcommand HiLink endif let b:current_syntax = "elmfilt" diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim index 02597e75f3..11b763409b 100644 --- a/runtime/syntax/erlang.vim +++ b/runtime/syntax/erlang.vim @@ -28,11 +28,8 @@ " " syn keyword erlangAttribute myattr1 myattr2 contained -" 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 @@ -42,9 +39,7 @@ set cpo&vim " Case sensitive syn case match -if version >= 600 - setlocal iskeyword+=$,@-@ -endif +setlocal iskeyword+=$,@-@ " Comments syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo @@ -147,116 +142,106 @@ let b:erlang_syntax_synced = 1 let s:old_style = (exists("g:erlang_old_style_highlight") && \g:erlang_old_style_highlight == 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_erlang_inits") - if version < 508 - let did_erlang_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Comments - HiLink erlangComment Comment - HiLink erlangCommentAnnotation Special - HiLink erlangTodo Todo - HiLink erlangShebang Comment - - " Numbers - HiLink erlangNumberInteger Number - HiLink erlangNumberFloat Float - - " Strings, atoms, characters - HiLink erlangString String - - if s:old_style - HiLink erlangQuotedAtom Type - else - HiLink erlangQuotedAtom String - endif - - HiLink erlangStringModifier Special - HiLink erlangQuotedAtomModifier Special - HiLink erlangModifier Special - - " Operators, separators - HiLink erlangOperator Operator - HiLink erlangRightArrow Operator - if s:old_style - HiLink erlangBracket Normal - HiLink erlangPipe Normal - else - HiLink erlangBracket Delimiter - HiLink erlangPipe Delimiter - endif - - " Atoms, functions, variables, macros - if s:old_style - HiLink erlangAtom Normal - HiLink erlangLocalFuncCall Normal - HiLink erlangLocalFuncRef Normal - HiLink erlangGlobalFuncCall Function - HiLink erlangGlobalFuncRef Function - HiLink erlangVariable Normal - HiLink erlangMacro Normal - HiLink erlangRecord Normal - else - HiLink erlangAtom String - HiLink erlangLocalFuncCall Normal - HiLink erlangLocalFuncRef Normal - HiLink erlangGlobalFuncCall Normal - HiLink erlangGlobalFuncRef Normal - HiLink erlangVariable Identifier - HiLink erlangMacro Macro - HiLink erlangRecord Structure - endif - - " Bitstrings - if !s:old_style - HiLink erlangBitType Type - endif - - " Constants and Directives - if s:old_style - HiLink erlangAttribute Type - HiLink erlangMacroDef Type - HiLink erlangUnknownAttribute Normal - HiLink erlangInclude Type - HiLink erlangRecordDef Type - HiLink erlangDefine Type - HiLink erlangPreCondit Type - HiLink erlangType Type - else - HiLink erlangAttribute Keyword - HiLink erlangMacroDef Macro - HiLink erlangUnknownAttribute Normal - HiLink erlangInclude Include - HiLink erlangRecordDef Keyword - HiLink erlangDefine Define - HiLink erlangPreCondit PreCondit - HiLink erlangType Type - endif - - " Keywords - HiLink erlangKeyword Keyword - - " Build-in-functions (BIFs) - HiLink erlangBIF Function - - if s:old_style - HiLink erlangBoolean Statement - HiLink erlangExtra Statement - HiLink erlangSignal Statement - else - HiLink erlangBoolean Boolean - HiLink erlangExtra Statement - HiLink erlangSignal Statement - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +" Comments +hi def link erlangComment Comment +hi def link erlangCommentAnnotation Special +hi def link erlangTodo Todo +hi def link erlangShebang Comment + +" Numbers +hi def link erlangNumberInteger Number +hi def link erlangNumberFloat Float + +" Strings, atoms, characters +hi def link erlangString String + +if s:old_style +hi def link erlangQuotedAtom Type +else +hi def link erlangQuotedAtom String +endif + +hi def link erlangStringModifier Special +hi def link erlangQuotedAtomModifier Special +hi def link erlangModifier Special + +" Operators, separators +hi def link erlangOperator Operator +hi def link erlangRightArrow Operator +if s:old_style +hi def link erlangBracket Normal +hi def link erlangPipe Normal +else +hi def link erlangBracket Delimiter +hi def link erlangPipe Delimiter +endif + +" Atoms, functions, variables, macros +if s:old_style +hi def link erlangAtom Normal +hi def link erlangLocalFuncCall Normal +hi def link erlangLocalFuncRef Normal +hi def link erlangGlobalFuncCall Function +hi def link erlangGlobalFuncRef Function +hi def link erlangVariable Normal +hi def link erlangMacro Normal +hi def link erlangRecord Normal +else +hi def link erlangAtom String +hi def link erlangLocalFuncCall Normal +hi def link erlangLocalFuncRef Normal +hi def link erlangGlobalFuncCall Normal +hi def link erlangGlobalFuncRef Normal +hi def link erlangVariable Identifier +hi def link erlangMacro Macro +hi def link erlangRecord Structure endif +" Bitstrings +if !s:old_style +hi def link erlangBitType Type +endif + +" Constants and Directives +if s:old_style +hi def link erlangAttribute Type +hi def link erlangMacroDef Type +hi def link erlangUnknownAttribute Normal +hi def link erlangInclude Type +hi def link erlangRecordDef Type +hi def link erlangDefine Type +hi def link erlangPreCondit Type +hi def link erlangType Type +else +hi def link erlangAttribute Keyword +hi def link erlangMacroDef Macro +hi def link erlangUnknownAttribute Normal +hi def link erlangInclude Include +hi def link erlangRecordDef Keyword +hi def link erlangDefine Define +hi def link erlangPreCondit PreCondit +hi def link erlangType Type +endif + +" Keywords +hi def link erlangKeyword Keyword + +" Build-in-functions (BIFs) +hi def link erlangBIF Function + +if s:old_style +hi def link erlangBoolean Statement +hi def link erlangExtra Statement +hi def link erlangSignal Statement +else +hi def link erlangBoolean Boolean +hi def link erlangExtra Statement +hi def link erlangSignal Statement +endif + + let b:current_syntax = "erlang" let &cpo = s:cpo_save diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim index c20b086ba5..4e175bcc25 100644 --- a/runtime/syntax/eruby.vim +++ b/runtime/syntax/eruby.vim @@ -22,7 +22,7 @@ elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' diff --git a/runtime/syntax/esmtprc.vim b/runtime/syntax/esmtprc.vim index b22b1a1416..81f074b59c 100644 --- a/runtime/syntax/esmtprc.vim +++ b/runtime/syntax/esmtprc.vim @@ -3,11 +3,8 @@ " Maintainer: Kornel Kielczewski <kornel@gazeta.pl> " Last Change: 16 Feb 2005 -" 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 diff --git a/runtime/syntax/esqlc.vim b/runtime/syntax/esqlc.vim index 6ad167a7e6..792e5d37f3 100644 --- a/runtime/syntax/esqlc.vim +++ b/runtime/syntax/esqlc.vim @@ -3,20 +3,13 @@ " Maintainer: Jonathan A. George <jageorge@tel.gte.com> " Last Change: 2001 May 09 -" 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 " Read the C++ syntax to start with -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim -endif +runtime! syntax/cpp.vim " ESQL-C extentions @@ -52,24 +45,14 @@ syntax keyword esqlcStatement rename revoke rollback savepoint select set syntax keyword esqlcStatement truncate update " 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_esqlc_syntax_inits") - if version < 508 - let did_esqlc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink esqlcOperator Operator - HiLink esqlcStatement Statement - HiLink esqlcKeyword esqlcSpecial - HiLink esqlcSpecial Special - HiLink esqlcPreProc PreProc +hi def link esqlcOperator Operator +hi def link esqlcStatement Statement +hi def link esqlcKeyword esqlcSpecial +hi def link esqlcSpecial Special +hi def link esqlcPreProc PreProc - delcommand HiLink -endif let b:current_syntax = "esqlc" diff --git a/runtime/syntax/esterel.vim b/runtime/syntax/esterel.vim index d853e75208..b0105216d7 100644 --- a/runtime/syntax/esterel.vim +++ b/runtime/syntax/esterel.vim @@ -6,11 +6,8 @@ " Last Change: Tue May 6 13:29:56 CEST 2008 " Version: 0.8 -" 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 @@ -65,26 +62,17 @@ syn match esterelNone "\<else\s\+if\>$" syn match esterelNone "\<else\s\+if\>\s" " Class Linking -if version >= 508 || !exists("did_esterel_syntax_inits") - if version < 508 - let did_esterel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink esterelStatement Statement - HiLink esterelType Type - HiLink esterelComment Comment - HiLink esterelBoolean Number - HiLink esterelExpressions Number - HiLink esterelIO String - HiLink esterelOperator Type - HiLink esterelSysCall Type - HiLink esterelFunctions Type - HiLink esterelSpecial Special +hi def link esterelStatement Statement +hi def link esterelType Type +hi def link esterelComment Comment +hi def link esterelBoolean Number +hi def link esterelExpressions Number +hi def link esterelIO String +hi def link esterelOperator Type +hi def link esterelSysCall Type +hi def link esterelFunctions Type +hi def link esterelSpecial Special - delcommand HiLink -endif let b:current_syntax = "esterel" diff --git a/runtime/syntax/euphoria3.vim b/runtime/syntax/euphoria3.vim index 1254b96247..ece14027ba 100644 --- a/runtime/syntax/euphoria3.vim +++ b/runtime/syntax/euphoria3.vim @@ -5,10 +5,8 @@ " Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim; " For details see :help ft-euphoria-syntax -" Quit if a (custom) syntax file was already loaded (compatible with Vim 5.8): -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 diff --git a/runtime/syntax/euphoria4.vim b/runtime/syntax/euphoria4.vim index 53f5cea917..5e668a7d67 100644 --- a/runtime/syntax/euphoria4.vim +++ b/runtime/syntax/euphoria4.vim @@ -5,10 +5,8 @@ " Remark: Euphoria has two syntax files, euphoria3.vim and euphoria4.vim; " For details see :help ft-euphoria-syntax -" Quit if a (custom) syntax file was already loaded (compatible with Vim 5.8): -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 diff --git a/runtime/syntax/eviews.vim b/runtime/syntax/eviews.vim index aa65fda3ff..03cfb25e60 100644 --- a/runtime/syntax/eviews.vim +++ b/runtime/syntax/eviews.vim @@ -4,19 +4,12 @@ " Last Change: 2006 Apr 30 " Filenames: *.prg " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim -" 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 -if version >= 600 - setlocal iskeyword=@,48-57,_,. -else - set iskeyword=@,48-57,_,. -endif +setlocal iskeyword=@,48-57,_,. syn case match @@ -69,35 +62,25 @@ syn match eCurlyError /[)\]]/ contained syn match eParenError /[\]}]/ contained " 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_r_syn_inits") - if version < 508 - let did_r_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink eComment Comment - HiLink eConstant Identifier - HiLink eStringId Identifier - HiLink eCommand Type - HiLink eString String - HiLink eNumber Number - HiLink eBoolean Boolean - HiLink eFloat Float - HiLink eConditional Conditional - HiLink eProgLang Statement - HiLink eOVP Statement - HiLink eStdCmd Statement - HiLink eIdentifier Normal - HiLink eDelimiter Delimiter - HiLink eError Error - HiLink eBraceError Error - HiLink eCurlyError Error - HiLink eParenError Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link eComment Comment +hi def link eConstant Identifier +hi def link eStringId Identifier +hi def link eCommand Type +hi def link eString String +hi def link eNumber Number +hi def link eBoolean Boolean +hi def link eFloat Float +hi def link eConditional Conditional +hi def link eProgLang Statement +hi def link eOVP Statement +hi def link eStdCmd Statement +hi def link eIdentifier Normal +hi def link eDelimiter Delimiter +hi def link eError Error +hi def link eBraceError Error +hi def link eCurlyError Error +hi def link eParenError Error let b:current_syntax="eviews" diff --git a/runtime/syntax/exim.vim b/runtime/syntax/exim.vim index ff8066f8af..4edc0d7948 100644 --- a/runtime/syntax/exim.vim +++ b/runtime/syntax/exim.vim @@ -6,12 +6,9 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/exim.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -91,27 +88,18 @@ syn keyword eximKeyword server_prompts server_condition client_send syn keyword eximKeyword server_secret client_name client_secret " Define the default highlighting -if version >= 508 || !exists("did_exim_syntax_inits") - if version < 508 - let did_exim_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink eximComment Comment - HiLink eximFixme Todo - HiLink eximEnd Keyword - HiLink eximNumber Number - HiLink eximDriverName Constant - HiLink eximConstant Constant - HiLink eximTime Constant - HiLink eximKeyword Type - HiLink eximSpecialChar Special - HiLink eximMacroName Preproc - HiLink eximTransport Identifier +hi def link eximComment Comment +hi def link eximFixme Todo +hi def link eximEnd Keyword +hi def link eximNumber Number +hi def link eximDriverName Constant +hi def link eximConstant Constant +hi def link eximTime Constant +hi def link eximKeyword Type +hi def link eximSpecialChar Special +hi def link eximMacroName Preproc +hi def link eximTransport Identifier - delcommand HiLink -endif let b:current_syntax = "exim" diff --git a/runtime/syntax/expect.vim b/runtime/syntax/expect.vim index 6ff7d4142c..75cbd3eddf 100644 --- a/runtime/syntax/expect.vim +++ b/runtime/syntax/expect.vim @@ -4,11 +4,8 @@ " Last Change: 2012 Jun 01 " (Dominique Pelle added @Spell) -" 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 @@ -81,35 +78,25 @@ syn match expectComment "#.*$" contains=@Spell,expectTodo syn match expectSharpBang "\%^#!.*" " 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_expect_syntax_inits") - if version < 508 - let did_expect_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink expectSharpBang PreProc - HiLink expectVariables Special - HiLink expectCommand Function - HiLink expectStatement Statement - HiLink expectConditional Conditional - HiLink expectRepeat Repeat - HiLink expectExpectOpts Keyword - HiLink expectOutVar Special - HiLink expectSpecial Special - HiLink expectNumber Number - - HiLink expectString String - - HiLink expectComment Comment - HiLink expectTodo Todo - "HiLink expectIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link expectSharpBang PreProc +hi def link expectVariables Special +hi def link expectCommand Function +hi def link expectStatement Statement +hi def link expectConditional Conditional +hi def link expectRepeat Repeat +hi def link expectExpectOpts Keyword +hi def link expectOutVar Special +hi def link expectSpecial Special +hi def link expectNumber Number + +hi def link expectString String + +hi def link expectComment Comment +hi def link expectTodo Todo +"hi def link expectIdentifier Identifier + let b:current_syntax = "expect" diff --git a/runtime/syntax/exports.vim b/runtime/syntax/exports.vim index f695dc8d21..55efbb1e50 100644 --- a/runtime/syntax/exports.vim +++ b/runtime/syntax/exports.vim @@ -1,16 +1,13 @@ " Vim syntax file " Language: exports " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 5 +" Last Change: Aug 31, 2016 +" Version: 7 " Notes: This file includes both SysV and BSD 'isms " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS -" 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 @@ -39,31 +36,22 @@ syn match exportsSeparator "[,:]" syn match exportsComment "^\s*#.*$" contains=@Spell " 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_exports_syntax_inits") - if version < 508 - let did_exports_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +if !exists("skip_exports_syntax_inits") - HiLink exportsKeyOptSet exportsKeySettings - HiLink exportsOptSet exportsSettings + hi def link exportsKeyOptSet exportsKeySettings + hi def link exportsOptSet exportsSettings - HiLink exportsComment Comment - HiLink exportsKeyOptions Type - HiLink exportsKeySettings Keyword - HiLink exportsOptions Constant - HiLink exportsSeparator Constant - HiLink exportsSettings Constant + hi def link exportsComment Comment + hi def link exportsKeyOptions Type + hi def link exportsKeySettings Keyword + hi def link exportsOptions Constant + hi def link exportsSeparator Constant + hi def link exportsSettings Constant - HiLink exportsOptError Error - HiLink exportsOptSetError Error - HiLink exportsSetError Error + hi def link exportsOptError Error + hi def link exportsOptSetError Error + hi def link exportsSetError Error - delcommand HiLink endif let b:current_syntax = "exports" diff --git a/runtime/syntax/falcon.vim b/runtime/syntax/falcon.vim index 1f6fefa9ff..e022c7a54a 100644 --- a/runtime/syntax/falcon.vim +++ b/runtime/syntax/falcon.vim @@ -163,34 +163,32 @@ syn sync minlines=10 maxlines=100 " Define the default highlighting if !exists("did_falcon_syn_inits") - command -nargs=+ HiLink hi def link <args> - - HiLink falconKeyword Keyword - HiLink falconCommentString String - HiLink falconTodo Todo - HiLink falconConditional Keyword - HiLink falconRepeat Repeat - HiLink falconcommentSkip Comment - HiLink falconComment Comment - HiLink falconCommentL Comment - HiLink falconConst Constant - HiLink falconConstants Constant - HiLink falconOperator Operator - HiLink falconSymbol Normal - HiLink falconSpaceError Error - HiLink falconHexadecimal Number - HiLink falconOctal Number - HiLink falconIntLiteral Number - HiLink falconFloatLiteral Float - HiLink falconStringEscape Special - HiLink falconStringDelimiter Delimiter - HiLink falconString String - HiLink falconBool Constant - HiLink falconSharpBang PreProc - HiLink falconInclude Include - HiLink falconSymbol Constant - HiLink falconSymbolOther Delimiter - delcommand HiLink + + hi def link falconKeyword Keyword + hi def link falconCommentString String + hi def link falconTodo Todo + hi def link falconConditional Keyword + hi def link falconRepeat Repeat + hi def link falconcommentSkip Comment + hi def link falconComment Comment + hi def link falconCommentL Comment + hi def link falconConst Constant + hi def link falconConstants Constant + hi def link falconOperator Operator + hi def link falconSymbol Normal + hi def link falconSpaceError Error + hi def link falconHexadecimal Number + hi def link falconOctal Number + hi def link falconIntLiteral Number + hi def link falconFloatLiteral Float + hi def link falconStringEscape Special + hi def link falconStringDelimiter Delimiter + hi def link falconString String + hi def link falconBool Constant + hi def link falconSharpBang PreProc + hi def link falconInclude Include + hi def link falconSymbol Constant + hi def link falconSymbolOther Delimiter endif let b:current_syntax = "falcon" diff --git a/runtime/syntax/fasm.vim b/runtime/syntax/fasm.vim index 696e05b4ca..172ba7c9b6 100644 --- a/runtime/syntax/fasm.vim +++ b/runtime/syntax/fasm.vim @@ -6,9 +6,8 @@ " FASM Home: http://flatassembler.net/ " FASM Version: 1.56 -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 diff --git a/runtime/syntax/fdcc.vim b/runtime/syntax/fdcc.vim index 38717ebfb8..f7b296b9c6 100644 --- a/runtime/syntax/fdcc.vim +++ b/runtime/syntax/fdcc.vim @@ -4,11 +4,8 @@ " Last Change: 2004 May 16 " Remarks: FDCC (Formal Definitions of Cultural Conventions) see ISO TR 14652 -" 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 @@ -58,56 +55,46 @@ syn region fdccBlank matchgroup=fdccLCName start=/^LC_NAME$/ end=/^END LC_NAME$/ syn region fdccBlank matchgroup=fdccLCAddress start=/^LC_ADDRESS$/ end=/^END LC_ADDRESS$/ contains=fdccKeywordAddress,fdccString,fdccComment,fdccNumber -" 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_fdcc_syn_inits") - if version < 508 - let did_fdcc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink fdccBlank Blank - - HiLink fdccTodo Todo - HiLink fdccComment Comment - HiLink fdccVariable Type - - HiLink fdccLCIdentification Statement - HiLink fdccLCCtype Statement - HiLink fdccLCCollate Statement - HiLink fdccLCMonetary Statement - HiLink fdccLCNumeric Statement - HiLink fdccLCTime Statement - HiLink fdccLCMessages Statement - HiLink fdccLCPaper Statement - HiLink fdccLCTelephone Statement - HiLink fdccLCMeasurement Statement - HiLink fdccLCName Statement - HiLink fdccLCAddress Statement - - HiLink fdccUnicodeInValid Error - HiLink fdccUnicodeValid String - HiLink fdccString String - HiLink fdccNumber Blank - - HiLink fdccKeywordIdentification fdccKeyword - HiLink fdccKeywordCtype fdccKeyword - HiLink fdccKeywordCollate fdccKeyword - HiLink fdccKeywordMonetary fdccKeyword - HiLink fdccKeywordNumeric fdccKeyword - HiLink fdccKeywordTime fdccKeyword - HiLink fdccKeywordMessages fdccKeyword - HiLink fdccKeywordPaper fdccKeyword - HiLink fdccKeywordTelephone fdccKeyword - HiLink fdccKeywordMeasurement fdccKeyword - HiLink fdccKeywordName fdccKeyword - HiLink fdccKeywordAddress fdccKeyword - HiLink fdccKeyword Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link fdccBlank Blank + +hi def link fdccTodo Todo +hi def link fdccComment Comment +hi def link fdccVariable Type + +hi def link fdccLCIdentification Statement +hi def link fdccLCCtype Statement +hi def link fdccLCCollate Statement +hi def link fdccLCMonetary Statement +hi def link fdccLCNumeric Statement +hi def link fdccLCTime Statement +hi def link fdccLCMessages Statement +hi def link fdccLCPaper Statement +hi def link fdccLCTelephone Statement +hi def link fdccLCMeasurement Statement +hi def link fdccLCName Statement +hi def link fdccLCAddress Statement + +hi def link fdccUnicodeInValid Error +hi def link fdccUnicodeValid String +hi def link fdccString String +hi def link fdccNumber Blank + +hi def link fdccKeywordIdentification fdccKeyword +hi def link fdccKeywordCtype fdccKeyword +hi def link fdccKeywordCollate fdccKeyword +hi def link fdccKeywordMonetary fdccKeyword +hi def link fdccKeywordNumeric fdccKeyword +hi def link fdccKeywordTime fdccKeyword +hi def link fdccKeywordMessages fdccKeyword +hi def link fdccKeywordPaper fdccKeyword +hi def link fdccKeywordTelephone fdccKeyword +hi def link fdccKeywordMeasurement fdccKeyword +hi def link fdccKeywordName fdccKeyword +hi def link fdccKeywordAddress fdccKeyword +hi def link fdccKeyword Identifier + let b:current_syntax = "fdcc" diff --git a/runtime/syntax/fgl.vim b/runtime/syntax/fgl.vim index 1b2fe19a88..1b75d137b6 100644 --- a/runtime/syntax/fgl.vim +++ b/runtime/syntax/fgl.vim @@ -7,11 +7,8 @@ " - Conditionally allow case insensitive keywords (Julian Bridle) " -" 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 @@ -119,28 +116,18 @@ syn match fglSpecial "--@" syn sync ccomment fglComment " 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_fgl_syntax_inits") - if version < 508 - let did_fgl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink fglComment Comment - "HiLink fglKeyword fglSpecial - HiLink fglKeyword fglStatement - HiLink fglNumber Number - HiLink fglOperator fglStatement - HiLink fglSpecial Special - HiLink fglStatement Statement - HiLink fglString String - HiLink fglType Type +hi def link fglComment Comment +"hi def link fglKeyword fglSpecial +hi def link fglKeyword fglStatement +hi def link fglNumber Number +hi def link fglOperator fglStatement +hi def link fglSpecial Special +hi def link fglStatement Statement +hi def link fglString String +hi def link fglType Type - delcommand HiLink -endif let b:current_syntax = "fgl" diff --git a/runtime/syntax/flexwiki.vim b/runtime/syntax/flexwiki.vim index 34f893d927..6b15ab2d90 100644 --- a/runtime/syntax/flexwiki.vim +++ b/runtime/syntax/flexwiki.vim @@ -14,10 +14,8 @@ " regexes, which use a different syntax than Vim (fewer \s). " The primary test case is FlexWiki\FormattingRules.wiki -" Quit if syntax file is 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 diff --git a/runtime/syntax/focexec.vim b/runtime/syntax/focexec.vim index 8be1b65cc4..a75aed47cb 100644 --- a/runtime/syntax/focexec.vim +++ b/runtime/syntax/focexec.vim @@ -11,11 +11,8 @@ " I think some of these things should get different hilights - " should MODIFY commands look different than TABLE? -" 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 @@ -69,32 +66,22 @@ syn match focexecNumber "\<\d\+\.\d*\>" syn match focexecComment "-\*.*" " 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_focexec_syntax_inits") - if version < 508 - let did_focexec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink focexecString1 String - HiLink focexecString2 String - HiLink focexecNumber Number - HiLink focexecComment Comment - HiLink focexecTable Keyword - HiLink focexecModify Keyword - HiLink focexecNormal Keyword - HiLink focexecSet Keyword - HiLink focexecDash Keyword - HiLink focexecFileDef Keyword - HiLink focexecJoin Keyword - HiLink focexecAmperVar Identifier - HiLink focexecFuse Function +hi def link focexecString1 String +hi def link focexecString2 String +hi def link focexecNumber Number +hi def link focexecComment Comment +hi def link focexecTable Keyword +hi def link focexecModify Keyword +hi def link focexecNormal Keyword +hi def link focexecSet Keyword +hi def link focexecDash Keyword +hi def link focexecFileDef Keyword +hi def link focexecJoin Keyword +hi def link focexecAmperVar Identifier +hi def link focexecFuse Function - delcommand HiLink -endif let b:current_syntax = "focexec" diff --git a/runtime/syntax/form.vim b/runtime/syntax/form.vim index 19a47ed6b9..b8cb87c905 100644 --- a/runtime/syntax/form.vim +++ b/runtime/syntax/form.vim @@ -11,11 +11,8 @@ " This syntax file is still in development. Please send suggestions " to the maintainer. -" 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 @@ -109,49 +106,39 @@ syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>" syn sync ccomment formComment minlines=10 " 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_form_syn_inits") - if version < 508 - let did_form_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink formConditional Conditional - HiLink formNumber Number - HiLink formStatement Statement - HiLink formComment Comment - HiLink formPreProc PreProc - HiLink formDirective PreProc - HiLink formType Type - HiLink formString String - HiLink formNestedString String - HiLink formReserved Error - HiLink formTodo Todo - HiLink formSpecial SpecialChar - - if !exists("form_enhanced_color") - HiLink formHeaderStatement Statement - else - " enhanced color mode - HiLink formHeaderStatement HeaderStatement - " dark and a light background for local types - if &background == "dark" - hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold - else - hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold - endif - " change slightly the default for dark gvim - if has("gui_running") && &background == "dark" - hi Conditional guifg=LightBlue gui=bold - hi Statement guifg=LightYellow - endif - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link formConditional Conditional +hi def link formNumber Number +hi def link formStatement Statement +hi def link formComment Comment +hi def link formPreProc PreProc +hi def link formDirective PreProc +hi def link formType Type +hi def link formString String +hi def link formNestedString String +hi def link formReserved Error +hi def link formTodo Todo +hi def link formSpecial SpecialChar + +if !exists("form_enhanced_color") +hi def link formHeaderStatement Statement +else +" enhanced color mode +hi def link formHeaderStatement HeaderStatement +" dark and a light background for local types +if &background == "dark" +hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold +else +hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold endif +" change slightly the default for dark gvim +if has("gui_running") && &background == "dark" +hi Conditional guifg=LightBlue gui=bold +hi Statement guifg=LightYellow +endif +endif + let b:current_syntax = "form" diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim index 99e9400b95..35fafd4349 100644 --- a/runtime/syntax/forth.vim +++ b/runtime/syntax/forth.vim @@ -80,11 +80,8 @@ " -" 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 @@ -104,11 +101,7 @@ syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\=' " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORTH -if version >= 600 - setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 -else - set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 -endif +setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 " when wanted, highlight trailing white space if exists("forth_space_errors") @@ -289,56 +282,46 @@ syn match forthLocals '{ }' " otherwise, at least two spaces between syn region forthDeprecated start='locals|' end='|' " 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_forth_syn_inits") - if version < 508 - let did_forth_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later. +hi def link forthTodo Todo +hi def link forthOperators Operator +hi def link forthMath Number +hi def link forthInteger Number +hi def link forthFloat Float +hi def link forthStack Special +hi def link forthRstack Special +hi def link forthFStack Special +hi def link forthSP Special +hi def link forthMemory Function +hi def link forthAdrArith Function +hi def link forthMemBlks Function +hi def link forthCond Conditional +hi def link forthLoop Repeat +hi def link forthColonDef Define +hi def link forthEndOfColonDef Define +hi def link forthDefine Define +hi def link forthDebug Debug +hi def link forthAssembler Include +hi def link forthCharOps Character +hi def link forthConversion String +hi def link forthForth Statement +hi def link forthVocs Statement +hi def link forthString String +hi def link forthComment Comment +hi def link forthClassDef Define +hi def link forthEndOfClassDef Define +hi def link forthObjectDef Define +hi def link forthEndOfObjectDef Define +hi def link forthInclude Include +hi def link forthLocals Type " nothing else uses type and locals must stand out +hi def link forthDeprecated Error " if you must, change to Type +hi def link forthFileMode Function +hi def link forthFileWords Statement +hi def link forthBlocks Statement +hi def link forthSpaceError Error - " The default methods for highlighting. Can be overridden later. - HiLink forthTodo Todo - HiLink forthOperators Operator - HiLink forthMath Number - HiLink forthInteger Number - HiLink forthFloat Float - HiLink forthStack Special - HiLink forthRstack Special - HiLink forthFStack Special - HiLink forthSP Special - HiLink forthMemory Function - HiLink forthAdrArith Function - HiLink forthMemBlks Function - HiLink forthCond Conditional - HiLink forthLoop Repeat - HiLink forthColonDef Define - HiLink forthEndOfColonDef Define - HiLink forthDefine Define - HiLink forthDebug Debug - HiLink forthAssembler Include - HiLink forthCharOps Character - HiLink forthConversion String - HiLink forthForth Statement - HiLink forthVocs Statement - HiLink forthString String - HiLink forthComment Comment - HiLink forthClassDef Define - HiLink forthEndOfClassDef Define - HiLink forthObjectDef Define - HiLink forthEndOfObjectDef Define - HiLink forthInclude Include - HiLink forthLocals Type " nothing else uses type and locals must stand out - HiLink forthDeprecated Error " if you must, change to Type - HiLink forthFileMode Function - HiLink forthFileWords Statement - HiLink forthBlocks Statement - HiLink forthSpaceError Error - - delcommand HiLink -endif let b:current_syntax = "forth" diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index 06e5390c60..9d9ab69a3a 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,17 +1,17 @@ " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) -" Version: 0.98 -" Last Change: 2016 Aug. 26 +" Version: 0.99 +" Last Change: 2016 Sep. 23 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-syntax from Vim " Credits: -" Version 0.1 (April 2000) was based on the fortran 77 syntax file by Mario Eusebio and -" Preben Guldberg. Since then, useful suggestions and contributions have been made, -" in chronological order, by: +" Version 0.1 (April 2000) for Fortran 95 was based on the Fortran 77 syntax file by +" Mario Eusebio and Preben Guldberg. Since then, useful suggestions and contributions +" have been made, in chronological order, by: " Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, " Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman, " Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, -" Stefano Zaghi and Vishnu Krishnan. +" Stefano Zaghi, Vishnu V. Krishnan and Judicaël Grasset if exists("b:current_syntax") finish @@ -368,6 +368,7 @@ else endif syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell +syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=&\=\s.*$" "cpp is often used with Fortran syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*" @@ -517,6 +518,7 @@ hi def link cIncluded fortranString hi def link cInclude Include hi def link cPreProc PreProc hi def link cPreCondit PreCondit +hi def link fortranOpenMP PreProc hi def link fortranParenError Error hi def link fortranComment Comment hi def link fortranSerialNumber Todo diff --git a/runtime/syntax/foxpro.vim b/runtime/syntax/foxpro.vim index ca5d7e2f9d..795859eac9 100644 --- a/runtime/syntax/foxpro.vim +++ b/runtime/syntax/foxpro.vim @@ -13,9 +13,8 @@ " corrected highlighting of comments at end of line (&&) " " -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 @@ -691,37 +690,27 @@ syn match foxproParenErr ")" syn sync minlines=1 maxlines=3 " 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_foxpro_syn_inits") - if version < 508 - let did_foxpro_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink foxproSpecial Special - HiLink foxproAtSymbol Special - HiLink foxproAtCmd Statement - HiLink foxproPreProc PreProc - HiLink foxproFunc Identifier - HiLink foxproCmd Statement - HiLink foxproEnBlk Type - HiLink foxproSysVar String - HiLink foxproString String - HiLink foxproConst Constant - HiLink foxproNumber Number - HiLink foxproFloat Float - HiLink foxproComment Comment - HiLink foxproParenErr Error - HiLink foxproCBConst PreProc - HiLink foxproCBField Special - HiLink foxproCBVar Identifier - HiLink foxproCBWin Special - HiLink foxproCBObject Identifier +hi def link foxproSpecial Special +hi def link foxproAtSymbol Special +hi def link foxproAtCmd Statement +hi def link foxproPreProc PreProc +hi def link foxproFunc Identifier +hi def link foxproCmd Statement +hi def link foxproEnBlk Type +hi def link foxproSysVar String +hi def link foxproString String +hi def link foxproConst Constant +hi def link foxproNumber Number +hi def link foxproFloat Float +hi def link foxproComment Comment +hi def link foxproParenErr Error +hi def link foxproCBConst PreProc +hi def link foxproCBField Special +hi def link foxproCBVar Identifier +hi def link foxproCBWin Special +hi def link foxproCBObject Identifier - delcommand HiLink -endif let b:current_syntax = "foxpro" diff --git a/runtime/syntax/fstab.vim b/runtime/syntax/fstab.vim index 3006d21fea..39c1a00b39 100644 --- a/runtime/syntax/fstab.vim +++ b/runtime/syntax/fstab.vim @@ -19,9 +19,8 @@ " let fstab_unknown_device_errors = 0 " do not highlight unknown devices as errors -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 @@ -229,66 +228,57 @@ syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster " Whole line comments syn match fsCommentLine /^#.*$/ contains=@Spell -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - HiLink fsOperator Operator - HiLink fsComment Comment - HiLink fsCommentLine Comment - - HiLink fsTypeKeyword Type - HiLink fsDeviceKeyword Identifier - HiLink fsDeviceLabel String - HiLink fsDeviceUUID String - HiLink fsDeviceSshfs String - HiLink fsFreqPassNumber Number - - if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 - HiLink fsTypeUnknown Error - endif - - if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 - HiLink fsDeviceError Error - endif - - HiLink fsMountPointError Error - HiLink fsMountPointKeyword Keyword - HiLink fsFreqPassError Error - - HiLink fsOptionsGeneral Type - HiLink fsOptionsKeywords Keyword - HiLink fsOptionsNumber Number - HiLink fsOptionsNumberOctal Number - HiLink fsOptionsString String - HiLink fsOptionsSize Number - HiLink fsOptionsExt2Check String - HiLink fsOptionsExt2Errors String - HiLink fsOptionsExt3Journal String - HiLink fsOptionsExt3Data String - HiLink fsOptionsExt4Journal String - HiLink fsOptionsExt4Data String - HiLink fsOptionsExt4Barrier Number - HiLink fsOptionsFatCheck String - HiLink fsOptionsConv String - HiLink fsOptionsFatType Number - HiLink fsOptionsYesNo String - HiLink fsOptionsHpfsCase String - HiLink fsOptionsIsoMap String - HiLink fsOptionsReiserHash String - HiLink fsOptionsSshYesNoAsk String - HiLink fsOptionsUfsType String - HiLink fsOptionsUfsError String - - HiLink fsOptionsVfatShortname String - - delcommand HiLink + +hi def link fsOperator Operator +hi def link fsComment Comment +hi def link fsCommentLine Comment + +hi def link fsTypeKeyword Type +hi def link fsDeviceKeyword Identifier +hi def link fsDeviceLabel String +hi def link fsDeviceUUID String +hi def link fsDeviceSshfs String +hi def link fsFreqPassNumber Number + +if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 +hi def link fsTypeUnknown Error endif +if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 +hi def link fsDeviceError Error +endif + +hi def link fsMountPointError Error +hi def link fsMountPointKeyword Keyword +hi def link fsFreqPassError Error + +hi def link fsOptionsGeneral Type +hi def link fsOptionsKeywords Keyword +hi def link fsOptionsNumber Number +hi def link fsOptionsNumberOctal Number +hi def link fsOptionsString String +hi def link fsOptionsSize Number +hi def link fsOptionsExt2Check String +hi def link fsOptionsExt2Errors String +hi def link fsOptionsExt3Journal String +hi def link fsOptionsExt3Data String +hi def link fsOptionsExt4Journal String +hi def link fsOptionsExt4Data String +hi def link fsOptionsExt4Barrier Number +hi def link fsOptionsFatCheck String +hi def link fsOptionsConv String +hi def link fsOptionsFatType Number +hi def link fsOptionsYesNo String +hi def link fsOptionsHpfsCase String +hi def link fsOptionsIsoMap String +hi def link fsOptionsReiserHash String +hi def link fsOptionsSshYesNoAsk String +hi def link fsOptionsUfsType String +hi def link fsOptionsUfsError String + +hi def link fsOptionsVfatShortname String + + let b:current_syntax = "fstab" let &cpo = s:cpo_save diff --git a/runtime/syntax/fvwm2m4.vim b/runtime/syntax/fvwm2m4.vim index 243da18fa7..e296273e31 100644 --- a/runtime/syntax/fvwm2m4.vim +++ b/runtime/syntax/fvwm2m4.vim @@ -5,12 +5,9 @@ " URI: http://physics.muni.cz/~yeti/download/syntax/fvwmm4.vim " Setup -if version >= 600 - if exists('b:current_syntax') - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists('b:current_syntax') + finish endif " Let included files know they are included @@ -19,19 +16,11 @@ if !exists('main_syntax') endif " Include M4 syntax -if version >= 600 - runtime! syntax/m4.vim -else - so <sfile>:p:h/m4.vim -endif +runtime! syntax/m4.vim unlet b:current_syntax " Include Fvwm2 syntax (Fvwm1 doesn't have M4 preprocessor) -if version >= 600 - runtime! syntax/fvwm.vim -else - so <sfile>:p:h/fvwm.vim -endif +runtime! syntax/fvwm.vim unlet b:current_syntax " That's all! diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim index 64e89cce7f..25a21d184e 100644 --- a/runtime/syntax/gdb.vim +++ b/runtime/syntax/gdb.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/gdb.vim " Last Change: 2012 Oct 05 -" 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 @@ -87,27 +84,17 @@ endif exec "syn sync ccomment gdbComment minlines=" . gdb_minlines " 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_gdb_syn_inits") - if version < 508 - let did_gdb_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gdbFuncDef Function - HiLink gdbComment Comment - HiLink gdbStatement Statement - HiLink gdbString String - HiLink gdbCharacter Character - HiLink gdbVariable Identifier - HiLink gdbSet Constant - HiLink gdbInfo Type - HiLink gdbDocument Special - HiLink gdbNumber Number - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link gdbFuncDef Function +hi def link gdbComment Comment +hi def link gdbStatement Statement +hi def link gdbString String +hi def link gdbCharacter Character +hi def link gdbVariable Identifier +hi def link gdbSet Constant +hi def link gdbInfo Type +hi def link gdbDocument Special +hi def link gdbNumber Number let b:current_syntax = "gdb" diff --git a/runtime/syntax/gdmo.vim b/runtime/syntax/gdmo.vim index 86c6d5c76c..009f402ffa 100644 --- a/runtime/syntax/gdmo.vim +++ b/runtime/syntax/gdmo.vim @@ -5,11 +5,8 @@ " URL: http://classicalprogrammer.wikidot.com/local--files/vim-syntax-file-for-gdmo/gdmo.vim " Last change: 8th June, 2011 -" 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 @@ -64,32 +61,22 @@ syn match gdmoBraces "[{}]" syn sync ccomment gdmoComment " 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_gdmo_syntax_inits") - if version < 508 - let did_gdmo_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink gdmoCategory Structure - HiLink gdmoRelationship Macro - HiLink gdmoDefinition Statement - HiLink gdmoReference Type - HiLink gdmoExtension Operator - HiLink gdmoBraces Function - HiLink gdmoSpecial Special - HiLink gdmoString String - HiLink gdmoCharacter Character - HiLink gdmoSpecialCharacter gdmoSpecial - HiLink gdmoComment Comment - HiLink gdmoLineComment gdmoComment - HiLink gdmoType Type +hi def link gdmoCategory Structure +hi def link gdmoRelationship Macro +hi def link gdmoDefinition Statement +hi def link gdmoReference Type +hi def link gdmoExtension Operator +hi def link gdmoBraces Function +hi def link gdmoSpecial Special +hi def link gdmoString String +hi def link gdmoCharacter Character +hi def link gdmoSpecialCharacter gdmoSpecial +hi def link gdmoComment Comment +hi def link gdmoLineComment gdmoComment +hi def link gdmoType Type - delcommand HiLink -endif let b:current_syntax = "gdmo" diff --git a/runtime/syntax/gedcom.vim b/runtime/syntax/gedcom.vim index 98851cc942..cd09e0fa22 100644 --- a/runtime/syntax/gedcom.vim +++ b/runtime/syntax/gedcom.vim @@ -3,11 +3,8 @@ " Maintainer: Paul Johnson (pjcj@transeda.com) " Version 1.059 - 23rd December 1999 -" 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 @@ -41,26 +38,16 @@ syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\| syntax match gedcom_date ".*" contained " 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_gedcom_syntax_inits") - if version < 508 - let did_gedcom_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink gedcom_record Statement - HiLink gedcom_id Comment - HiLink gedcom_ii PreProc - HiLink gedcom_in Type - HiLink gedcom_name PreProc - HiLink gedcom_cname Type - HiLink gedcom_surname Identifier - HiLink gedcom_date Constant +hi def link gedcom_record Statement +hi def link gedcom_id Comment +hi def link gedcom_ii PreProc +hi def link gedcom_in Type +hi def link gedcom_name PreProc +hi def link gedcom_cname Type +hi def link gedcom_surname Identifier +hi def link gedcom_date Constant - delcommand HiLink -endif let b:current_syntax = "gedcom" diff --git a/runtime/syntax/gitcommit.vim b/runtime/syntax/gitcommit.vim index b0315a9465..5e0642fbcc 100644 --- a/runtime/syntax/gitcommit.vim +++ b/runtime/syntax/gitcommit.vim @@ -2,7 +2,7 @@ " Language: git commit file " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.git/COMMIT_EDITMSG -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -39,9 +39,10 @@ syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold -syn match gitcommitDiscardedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite -syn match gitcommitSelectedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite -syn match gitcommitUnmergedType "\t\@<=[a-z][a-z ]*[a-z]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite + +syn match gitcommitDiscardedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite +syn match gitcommitSelectedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite +syn match gitcommitUnmergedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow diff --git a/runtime/syntax/gitrebase.vim b/runtime/syntax/gitrebase.vim index a7460280d3..a944c14dd7 100644 --- a/runtime/syntax/gitrebase.vim +++ b/runtime/syntax/gitrebase.vim @@ -2,7 +2,7 @@ " Language: git rebase --interactive " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: git-rebase-todo -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -18,6 +18,7 @@ syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite +syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseSummary ".*" contains=gitrebaseHash contained syn match gitrebaseCommand ".*" contained syn match gitrebaseComment "^#.*" contains=gitrebaseHash @@ -31,6 +32,7 @@ hi def link gitrebaseEdit PreProc hi def link gitrebaseSquash Type hi def link gitrebaseFixup Special hi def link gitrebaseExec Function +hi def link gitrebaseDrop Comment hi def link gitrebaseSummary String hi def link gitrebaseComment Comment hi def link gitrebaseSquashError Error diff --git a/runtime/syntax/gitsendemail.vim b/runtime/syntax/gitsendemail.vim index 8b938116fa..8fdf6839c8 100644 --- a/runtime/syntax/gitsendemail.vim +++ b/runtime/syntax/gitsendemail.vim @@ -1,14 +1,18 @@ " Vim syntax file " Language: git send-email message " Maintainer: Tim Pope -" Filenames: *.msg.[0-9]* (first line is "From ... # This line is ignored.") -" Last Change: 2010 May 21 +" Filenames: .gitsendemail.* +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish endif runtime! syntax/mail.vim +unlet! b:current_syntax +syn include @gitsendemailDiff syntax/diff.vim +syn region gitsendemailDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^-- %/ fold contains=@gitsendemailDiff + syn case match syn match gitsendemailComment "\%^From.*#.*" diff --git a/runtime/syntax/gkrellmrc.vim b/runtime/syntax/gkrellmrc.vim index 6ce1238416..f005ca2dc8 100644 --- a/runtime/syntax/gkrellmrc.vim +++ b/runtime/syntax/gkrellmrc.vim @@ -6,19 +6,12 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/gkrellmrc.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 syn case match @@ -55,37 +48,28 @@ syn keyword gkrellmrcStyleCmd StyleMeter StyleChart StylePanel syn keyword gkrellmrcStyleItem textcolor alt_textcolor font alt_font transparency border label_position margin margins left_margin right_margin top_margin bottom_margin krell_depth krell_yoff krell_x_hot krell_expand krell_left_margin krell_right_margin " Define the default highlighting -if version >= 508 || !exists("did_gtkrc_syntax_inits") - if version < 508 - let did_gtkrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gkrellmrcComment Comment - HiLink gkrellmrcFixme Todo +hi def link gkrellmrcComment Comment +hi def link gkrellmrcFixme Todo - HiLink gkrellmrcString gkrellmrcConstant - HiLink gkrellmrcNumber gkrellmrcConstant - HiLink gkrellmrcRGBColor gkrellmrcConstant - HiLink gkrellmrcExpandMode gkrellmrcConstant - HiLink gkrellmrcConstant Constant +hi def link gkrellmrcString gkrellmrcConstant +hi def link gkrellmrcNumber gkrellmrcConstant +hi def link gkrellmrcRGBColor gkrellmrcConstant +hi def link gkrellmrcExpandMode gkrellmrcConstant +hi def link gkrellmrcConstant Constant - HiLink gkrellmrcMeterName gkrellmrcClass - HiLink gkrellmrcChartName gkrellmrcClass - HiLink gkrellmrcSpecialClassName gkrellmrcClass - HiLink gkrellmrcClass Type +hi def link gkrellmrcMeterName gkrellmrcClass +hi def link gkrellmrcChartName gkrellmrcClass +hi def link gkrellmrcSpecialClassName gkrellmrcClass +hi def link gkrellmrcClass Type - HiLink gkrellmrcGlobal gkrellmrcItem - HiLink gkrellmrcBuiltinExt gkrellmrcItem - HiLink gkrellmrcStyleItem gkrellmrcItem - HiLink gkrellmrcItem Function +hi def link gkrellmrcGlobal gkrellmrcItem +hi def link gkrellmrcBuiltinExt gkrellmrcItem +hi def link gkrellmrcStyleItem gkrellmrcItem +hi def link gkrellmrcItem Function - HiLink gkrellmrcSetCmd Special - HiLink gkrellmrcStyleCmd Statement +hi def link gkrellmrcSetCmd Special +hi def link gkrellmrcStyleCmd Statement - delcommand HiLink -endif let b:current_syntax = "gkrellmrc" diff --git a/runtime/syntax/gnash.vim b/runtime/syntax/gnash.vim index f9e2b519a5..cce522dd86 100644 --- a/runtime/syntax/gnash.vim +++ b/runtime/syntax/gnash.vim @@ -15,11 +15,8 @@ " Vim is Charityware, see ":help Uganda" " -" 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") || &compatible +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible finish endif diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim index d85932d401..7777cc9e46 100644 --- a/runtime/syntax/gnuplot.vim +++ b/runtime/syntax/gnuplot.vim @@ -20,9 +20,8 @@ " For vim version 5.x: Clear all syntax items " For vim 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 @@ -501,54 +500,44 @@ syn keyword gnuplotStatement shell splot spstats stats system test undefine syn keyword gnuplotStatement unset update " ---- 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_gnuplot_syntax_inits") - if version < 508 - let did_gnuplot_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " ---- Comments ---- " - HiLink gnuplotComment Comment - - " ---- Constants ---- " - HiLink gnuplotString String - HiLink gnuplotNumber Number - HiLink gnuplotFloat Float - - " ---- Identifiers ---- " - HiLink gnuplotIdentifier Identifier - - " ---- Statements ---- " - HiLink gnuplotConditional Conditional - HiLink gnuplotRepeat Repeat - HiLink gnuplotKeyword Keyword - HiLink gnuplotOperator Operator - - " ---- PreProcs ---- " - HiLink gnuplotMacro Macro - - " ---- Types ---- " - HiLink gnuplotStatement Type - HiLink gnuplotFunc Identifier - - " ---- Specials ---- " - HiLink gnuplotSpecial Special - HiLink gnuplotUnit Special - HiLink gnuplotExternal Special - - " ---- Errors ---- " - HiLink gnuplotError Error - HiLink gnuplotOctalError Error - - " ---- Todos ---- " - HiLink gnuplotTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" ---- Comments ---- " +hi def link gnuplotComment Comment + +" ---- Constants ---- " +hi def link gnuplotString String +hi def link gnuplotNumber Number +hi def link gnuplotFloat Float + +" ---- Identifiers ---- " +hi def link gnuplotIdentifier Identifier + +" ---- Statements ---- " +hi def link gnuplotConditional Conditional +hi def link gnuplotRepeat Repeat +hi def link gnuplotKeyword Keyword +hi def link gnuplotOperator Operator + +" ---- PreProcs ---- " +hi def link gnuplotMacro Macro + +" ---- Types ---- " +hi def link gnuplotStatement Type +hi def link gnuplotFunc Identifier + +" ---- Specials ---- " +hi def link gnuplotSpecial Special +hi def link gnuplotUnit Special +hi def link gnuplotExternal Special + +" ---- Errors ---- " +hi def link gnuplotError Error +hi def link gnuplotOctalError Error + +" ---- Todos ---- " +hi def link gnuplotTodo Todo + let b:current_syntax = "gnuplot" diff --git a/runtime/syntax/godoc.vim b/runtime/syntax/godoc.vim index 3a07903a77..0603f51c83 100644 --- a/runtime/syntax/godoc.vim +++ b/runtime/syntax/godoc.vim @@ -10,11 +10,9 @@ endif syn case match syn match godocTitle "^\([A-Z][A-Z ]*\)$" -command -nargs=+ HiLink hi def link <args> -HiLink godocTitle Title +hi def link godocTitle Title -delcommand HiLink let b:current_syntax = 'godoc' diff --git a/runtime/syntax/gp.vim b/runtime/syntax/gp.vim index f46a465215..aecf7df48b 100644 --- a/runtime/syntax/gp.vim +++ b/runtime/syntax/gp.vim @@ -4,9 +4,8 @@ " Last change: 2012 Jan 08 " URL: http://pari.math.u-bordeaux.fr -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 @@ -59,33 +58,24 @@ syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenErro syntax match gpParenError ")" syntax match gpInParen contained "[{}]" -if version >= 508 || !exists("did_gp_syn_inits") - if version < 508 - let did_gp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gpConditional Conditional - HiLink gpRepeat Repeat - HiLink gpError Error - HiLink gpParenError gpError - HiLink gpInParen gpError - HiLink gpStatement Statement - HiLink gpString String - HiLink gpComment Comment - HiLink gpInterface Type - HiLink gpInput Type - HiLink gpInterfaceKey Statement - HiLink gpFunction Function - HiLink gpScope Type - " contained ones - HiLink gpSpecial Special - HiLink gpTodo Todo - HiLink gpArgs Type - delcommand HiLink -endif +hi def link gpConditional Conditional +hi def link gpRepeat Repeat +hi def link gpError Error +hi def link gpParenError gpError +hi def link gpInParen gpError +hi def link gpStatement Statement +hi def link gpString String +hi def link gpComment Comment +hi def link gpInterface Type +hi def link gpInput Type +hi def link gpInterfaceKey Statement +hi def link gpFunction Function +hi def link gpScope Type +" contained ones +hi def link gpSpecial Special +hi def link gpTodo Todo +hi def link gpArgs Type let b:current_syntax = "gp" let &cpo = s:cpo_save diff --git a/runtime/syntax/grads.vim b/runtime/syntax/grads.vim index 0b88549d40..50be14bb22 100644 --- a/runtime/syntax/grads.vim +++ b/runtime/syntax/grads.vim @@ -7,11 +7,8 @@ " This syntax file defines highlighting for only very few features of " the GrADS scripting language. -" 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 @@ -53,34 +50,24 @@ syn match gradsComment "\*.*" " syn match gradsTypos "!=" " 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 hgs highlighting+yet -if version >= 508 || !exists("did_gs_syn_inits") - if version < 508 - let did_gs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't hgs highlighting+yet - HiLink gradsStatement Statement +hi def link gradsStatement Statement - HiLink gradsString String - HiLink gradsNumber Number +hi def link gradsString String +hi def link gradsNumber Number - HiLink gradsFixVariables Special - HiLink gradsVariables Identifier - HiLink gradsglobalVariables Special - HiLink gradsConst Special +hi def link gradsFixVariables Special +hi def link gradsVariables Identifier +hi def link gradsglobalVariables Special +hi def link gradsConst Special - HiLink gradsClassMethods Function +hi def link gradsClassMethods Function - HiLink gradsOperator Operator - HiLink gradsComment Comment +hi def link gradsOperator Operator +hi def link gradsComment Comment - HiLink gradsTypos Error +hi def link gradsTypos Error - delcommand HiLink -endif let b:current_syntax = "grads" diff --git a/runtime/syntax/gretl.vim b/runtime/syntax/gretl.vim index 37299b894a..671142a9ea 100644 --- a/runtime/syntax/gretl.vim +++ b/runtime/syntax/gretl.vim @@ -4,20 +4,13 @@ " Last Change: 2006 Apr 30 " Filenames: *.inp *.gretl " URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim -" 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 -if version >= 600 - setlocal iskeyword=@,48-57,_,. -else - set iskeyword=@,48-57,_,. -endif +setlocal iskeyword=@,48-57,_,. syn case match @@ -68,34 +61,24 @@ syn match gBCend /\*)/ syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)" " 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_r_syn_inits") - if version < 508 - let did_r_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink gComment Comment - HiLink gCommentStart Comment - HiLink gBlockComment Comment - HiLink gString String - HiLink gNumber Number - HiLink gBoolean Boolean - HiLink gFloat Float - HiLink gCommands Repeat - HiLink gGenrFunc Type - HiLink gDelimiter Delimiter - HiLink gError Error - HiLink gBraceError Error - HiLink gCurlyError Error - HiLink gParenError Error - HiLink gIdentifier Normal - HiLink gVariable Identifier - HiLink gArrow Repeat - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link gComment Comment +hi def link gCommentStart Comment +hi def link gBlockComment Comment +hi def link gString String +hi def link gNumber Number +hi def link gBoolean Boolean +hi def link gFloat Float +hi def link gCommands Repeat +hi def link gGenrFunc Type +hi def link gDelimiter Delimiter +hi def link gError Error +hi def link gBraceError Error +hi def link gCurlyError Error +hi def link gParenError Error +hi def link gIdentifier Normal +hi def link gVariable Identifier +hi def link gArrow Repeat let b:current_syntax="gretl" diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index dc39677724..2245b79d04 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -44,11 +44,9 @@ " Let me know if you like it or send me patches, so that I can improve it " when I have time -" Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif " we define it here so that included files can test for it @@ -58,13 +56,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ GroovyHiLink hi link <args> -else - command! -nargs=+ GroovyHiLink hi def link <args> -endif - " ########################## " Java stuff taken from java.vim " some characters that cannot be in a groovy program (outside a string) @@ -144,9 +135,9 @@ if exists("groovy_highlight_groovy_lang_ids") || exists("groovy_highlight_groovy syn keyword groovyJavaLangObject clone equals finalize getClass hashCode syn keyword groovyJavaLangObject notify notifyAll toString wait - GroovyHiLink groovyLangClass groovyConstant - GroovyHiLink groovyJavaLangClass groovyExternal - GroovyHiLink groovyJavaLangObject groovyConstant + hi def link groovyLangClass groovyConstant + hi def link groovyJavaLangClass groovyExternal + hi def link groovyJavaLangObject groovyConstant syn cluster groovyTop add=groovyJavaLangObject,groovyJavaLangClass,groovyLangClass syn cluster groovyClasses add=groovyJavaLangClass,groovyLangClass endif @@ -220,9 +211,9 @@ syn region groovyComment start="/\*" end="\*/" contains=@groovyCommen syn match groovyCommentStar contained "^\s*\*[^/]"me=e-1 syn match groovyCommentStar contained "^\s*\*$" syn match groovyLineComment "//.*" contains=@groovyCommentSpecial2,groovyTodo,@Spell -GroovyHiLink groovyCommentString groovyString -GroovyHiLink groovyComment2String groovyString -GroovyHiLink groovyCommentCharacter groovyCharacter +hi def link groovyCommentString groovyString +hi def link groovyComment2String groovyString +hi def link groovyCommentCharacter groovyCharacter syn cluster groovyTop add=groovyComment,groovyLineComment @@ -263,12 +254,12 @@ endif " syn region groovyELExpr start=+${+ end=+}+ keepend contained syn match groovyELExpr /\${.\{-}}/ contained syn match groovyELExpr /\$[a-zA-Z_][a-zA-Z0-9_.]*/ contained -GroovyHiLink groovyELExpr Identifier +hi def link groovyELExpr Identifier " TODO: better matching. I am waiting to understand how it really works in groovy " syn region groovyClosureParamsBraces start=+|+ end=+|+ contains=groovyClosureParams " syn match groovyClosureParams "[ a-zA-Z0-9_*]\+" contained -" GroovyHiLink groovyClosureParams Identifier +" hi def link groovyClosureParams Identifier " next line disabled, it can cause a crash for a long line "syn match groovyStringError +"\([^"\\]\|\\.\)*$+ @@ -329,23 +320,21 @@ if exists("groovy_highlight_debug") syn cluster groovyTop add=groovyDebug - if version >= 508 || !exists("did_c_syn_inits") - GroovyHiLink groovyDebug Debug - GroovyHiLink groovyDebugString DebugString - GroovyHiLink groovyDebugStringError groovyError - GroovyHiLink groovyDebugType DebugType - GroovyHiLink groovyDebugBoolean DebugBoolean - GroovyHiLink groovyDebugNumber Debug - GroovyHiLink groovyDebugSpecial DebugSpecial - GroovyHiLink groovyDebugSpecialCharacter DebugSpecial - GroovyHiLink groovyDebugCharacter DebugString - GroovyHiLink groovyDebugParen Debug - - GroovyHiLink DebugString String - GroovyHiLink DebugSpecial Special - GroovyHiLink DebugBoolean Boolean - GroovyHiLink DebugType Type - endif + hi def link groovyDebug Debug + hi def link groovyDebugString DebugString + hi def link groovyDebugStringError groovyError + hi def link groovyDebugType DebugType + hi def link groovyDebugBoolean DebugBoolean + hi def link groovyDebugNumber Debug + hi def link groovyDebugSpecial DebugSpecial + hi def link groovyDebugSpecialCharacter DebugSpecial + hi def link groovyDebugCharacter DebugString + hi def link groovyDebugParen Debug + + hi def link DebugString String + hi def link DebugSpecial Special + hi def link DebugBoolean Boolean + hi def link DebugType Type endif " Match all Exception classes @@ -379,7 +368,7 @@ exec "syn sync ccomment groovyComment minlines=" . groovy_minlines if exists("groovy_mark_braces_in_parens_as_errors") syn match groovyInParen contained "[{}]" - GroovyHiLink groovyInParen groovyError + hi def link groovyInParen groovyError syn cluster groovyTop add=groovyInParen endif @@ -388,7 +377,7 @@ syn region groovyParenT transparent matchgroup=groovyParen start="(" end=")" syn region groovyParenT1 transparent matchgroup=groovyParen1 start="(" end=")" contains=@groovyTop,groovyParenT2 contained syn region groovyParenT2 transparent matchgroup=groovyParen2 start="(" end=")" contains=@groovyTop,groovyParenT contained syn match groovyParenError ")" -GroovyHiLink groovyParenError groovyError +hi def link groovyParenError groovyError " catch errors caused by wrong square parenthesis syn region groovyParenT transparent matchgroup=groovyParen start="\[" end="\]" contains=@groovyTop,groovyParenT1 @@ -398,61 +387,54 @@ syn match groovyParenError "\]" " ############################### " java.vim default highlighting -if version >= 508 || !exists("did_groovy_syn_inits") - if version < 508 - let did_groovy_syn_inits = 1 - endif - GroovyHiLink groovyFuncDef Function - GroovyHiLink groovyBraces Function - GroovyHiLink groovyBranch Conditional - GroovyHiLink groovyUserLabelRef groovyUserLabel - GroovyHiLink groovyLabel Label - GroovyHiLink groovyUserLabel Label - GroovyHiLink groovyConditional Conditional - GroovyHiLink groovyRepeat Repeat - GroovyHiLink groovyExceptions Exception - GroovyHiLink groovyAssert Statement - GroovyHiLink groovyStorageClass StorageClass - GroovyHiLink groovyMethodDecl groovyStorageClass - GroovyHiLink groovyClassDecl groovyStorageClass - GroovyHiLink groovyScopeDecl groovyStorageClass - GroovyHiLink groovyBoolean Boolean - GroovyHiLink groovySpecial Special - GroovyHiLink groovySpecialError Error - GroovyHiLink groovySpecialCharError Error - GroovyHiLink groovyString String - GroovyHiLink groovyRegexChar String - GroovyHiLink groovyCharacter Character - GroovyHiLink groovySpecialChar SpecialChar - GroovyHiLink groovyNumber Number - GroovyHiLink groovyError Error - GroovyHiLink groovyStringError Error - GroovyHiLink groovyStatement Statement - GroovyHiLink groovyOperator Operator - GroovyHiLink groovyComment Comment - GroovyHiLink groovyDocComment Comment - GroovyHiLink groovyLineComment Comment - GroovyHiLink groovyConstant Constant - GroovyHiLink groovyTypedef Typedef - GroovyHiLink groovyTodo Todo - - GroovyHiLink groovyCommentTitle SpecialComment - GroovyHiLink groovyDocTags Special - GroovyHiLink groovyDocParam Function - GroovyHiLink groovyCommentStar groovyComment - - GroovyHiLink groovyType Type - GroovyHiLink groovyExternal Include - - GroovyHiLink htmlComment Special - GroovyHiLink htmlCommentPart Special - GroovyHiLink groovySpaceError Error - GroovyHiLink groovyJDKBuiltin Special - GroovyHiLink groovyJDKOperOverl Operator - GroovyHiLink groovyJDKMethods Function -endif - -delcommand GroovyHiLink +hi def link groovyFuncDef Function +hi def link groovyBraces Function +hi def link groovyBranch Conditional +hi def link groovyUserLabelRef groovyUserLabel +hi def link groovyLabel Label +hi def link groovyUserLabel Label +hi def link groovyConditional Conditional +hi def link groovyRepeat Repeat +hi def link groovyExceptions Exception +hi def link groovyAssert Statement +hi def link groovyStorageClass StorageClass +hi def link groovyMethodDecl groovyStorageClass +hi def link groovyClassDecl groovyStorageClass +hi def link groovyScopeDecl groovyStorageClass +hi def link groovyBoolean Boolean +hi def link groovySpecial Special +hi def link groovySpecialError Error +hi def link groovySpecialCharError Error +hi def link groovyString String +hi def link groovyRegexChar String +hi def link groovyCharacter Character +hi def link groovySpecialChar SpecialChar +hi def link groovyNumber Number +hi def link groovyError Error +hi def link groovyStringError Error +hi def link groovyStatement Statement +hi def link groovyOperator Operator +hi def link groovyComment Comment +hi def link groovyDocComment Comment +hi def link groovyLineComment Comment +hi def link groovyConstant Constant +hi def link groovyTypedef Typedef +hi def link groovyTodo Todo + +hi def link groovyCommentTitle SpecialComment +hi def link groovyDocTags Special +hi def link groovyDocParam Function +hi def link groovyCommentStar groovyComment + +hi def link groovyType Type +hi def link groovyExternal Include + +hi def link htmlComment Special +hi def link htmlCommentPart Special +hi def link groovySpaceError Error +hi def link groovyJDKBuiltin Special +hi def link groovyJDKOperOverl Operator +hi def link groovyJDKMethods Function let b:current_syntax = "groovy" diff --git a/runtime/syntax/gsp.vim b/runtime/syntax/gsp.vim index e7b1b1632f..6270b2af64 100644 --- a/runtime/syntax/gsp.vim +++ b/runtime/syntax/gsp.vim @@ -5,11 +5,8 @@ " Filenames: *.gsp " URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim -" 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 @@ -18,21 +15,13 @@ if !exists("main_syntax") endif " Source HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn case match " Include Java syntax -if version < 600 - syn include @gspJava <sfile>:p:h/java.vim -else - syn include @gspJava syntax/java.vim -endif +syn include @gspJava syntax/java.vim let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/syntax/gtkrc.vim b/runtime/syntax/gtkrc.vim index 57054a21d3..9c1bc2abb8 100644 --- a/runtime/syntax/gtkrc.vim +++ b/runtime/syntax/gtkrc.vim @@ -6,19 +6,12 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/gtkrc.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 syn case match @@ -86,57 +79,48 @@ syn sync minlines=50 syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>" " Define the default highlighting -if version >= 508 || !exists("did_gtkrc_syntax_inits") - if version < 508 - let did_gtkrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink gtkrcComment Comment - HiLink gtkrcFixme Todo - - HiLink gtkrcInclude Preproc - - HiLink gtkrcACString gtkrcString - HiLink gtkrcBString gtkrcString - HiLink gtkrcString String - HiLink gtkrcNumber Number - HiLink gtkrcStateName gtkrcConstant - HiLink gtkrcPriorityName gtkrcConstant - HiLink gtkrcTextDirName gtkrcConstant - HiLink gtkrcSettingsName Function - HiLink gtkrcStockName Function - HiLink gtkrcConstant Constant - - HiLink gtkrcPathSpecial gtkrcSpecial - HiLink gtkrcWPathSpecial gtkrcSpecial - HiLink gtkrcRGBColor gtkrcSpecial - HiLink gtkrcKeyMod gtkrcSpecial - HiLink gtkrcSpecial Special - - HiLink gtkrcTop gtkrcKeyword - HiLink gtkrcPathSet gtkrcKeyword - HiLink gtkrcStyleKeyword gtkrcKeyword - HiLink gtkrcFunction gtkrcKeyword - HiLink gtkrcBind gtkrcKeyword - HiLink gtkrcKeyword Keyword - - HiLink gtkrcClassNameGnome gtkrcGtkClass - HiLink gtkrcClassName gtkrcGtkClass - HiLink gtkrcFunctionName gtkrcGtkClass - HiLink gtkrcGtkClass Type - - HiLink gtkrcImage gtkrcOtherword - HiLink gtkrcOtherword Function - - HiLink gtkrcParenError gtkrcError - HiLink gtkrcBraceError gtkrcError - HiLink gtkrcBracketError gtkrcError - HiLink gtkrcError Error - - delcommand HiLink -endif + +hi def link gtkrcComment Comment +hi def link gtkrcFixme Todo + +hi def link gtkrcInclude Preproc + +hi def link gtkrcACString gtkrcString +hi def link gtkrcBString gtkrcString +hi def link gtkrcString String +hi def link gtkrcNumber Number +hi def link gtkrcStateName gtkrcConstant +hi def link gtkrcPriorityName gtkrcConstant +hi def link gtkrcTextDirName gtkrcConstant +hi def link gtkrcSettingsName Function +hi def link gtkrcStockName Function +hi def link gtkrcConstant Constant + +hi def link gtkrcPathSpecial gtkrcSpecial +hi def link gtkrcWPathSpecial gtkrcSpecial +hi def link gtkrcRGBColor gtkrcSpecial +hi def link gtkrcKeyMod gtkrcSpecial +hi def link gtkrcSpecial Special + +hi def link gtkrcTop gtkrcKeyword +hi def link gtkrcPathSet gtkrcKeyword +hi def link gtkrcStyleKeyword gtkrcKeyword +hi def link gtkrcFunction gtkrcKeyword +hi def link gtkrcBind gtkrcKeyword +hi def link gtkrcKeyword Keyword + +hi def link gtkrcClassNameGnome gtkrcGtkClass +hi def link gtkrcClassName gtkrcGtkClass +hi def link gtkrcFunctionName gtkrcGtkClass +hi def link gtkrcGtkClass Type + +hi def link gtkrcImage gtkrcOtherword +hi def link gtkrcOtherword Function + +hi def link gtkrcParenError gtkrcError +hi def link gtkrcBraceError gtkrcError +hi def link gtkrcBracketError gtkrcError +hi def link gtkrcError Error + let b:current_syntax = "gtkrc" diff --git a/runtime/syntax/haml.vim b/runtime/syntax/haml.vim index bf7a073633..5369695c22 100644 --- a/runtime/syntax/haml.vim +++ b/runtime/syntax/haml.vim @@ -2,7 +2,7 @@ " Language: Haml " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.haml -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -67,7 +67,7 @@ syn region hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascri syn region hamlCSSFilter matchgroup=hamlFilter start="^\z(\s*\):css\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,hamlInterpolation keepend syn region hamlSassFilter matchgroup=hamlFilter start="^\z(\s*\):sass\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop -syn region hamlJavascriptBlock start="^\z(\s*\)%script" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend +syn region hamlJavascriptBlock start="^\z(\s*\)%script\%((type=[\"']text/javascript[\"'])\)\=\s*$" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend syn region hamlCssBlock start="^\z(\s*\)%style" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlCss keepend syn match hamlError "\$" contained diff --git a/runtime/syntax/hamster.vim b/runtime/syntax/hamster.vim index bd52300ca0..64d9598a71 100644 --- a/runtime/syntax/hamster.vim +++ b/runtime/syntax/hamster.vim @@ -12,10 +12,8 @@ " for news and mail, a build-in script language, the GUI allows translation to " other languages, it can be used in a network and that's not all features... " -" 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 @@ -358,24 +356,14 @@ syn cluster hamsterComment contains=hamsterHashComment syn sync ccomment hamsterHashComment " 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_hamster_syn_inits") - if version < 508 - let did_hamster_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink hamsterHashComment Comment - HiLink hamsterSpecial Special - HiLink hamsterStatement Statement - HiLink hamsterString String - HiLink hamsterFunction Function +hi def link hamsterHashComment Comment +hi def link hamsterSpecial Special +hi def link hamsterStatement Statement +hi def link hamsterString String +hi def link hamsterFunction Function - delcommand HiLink -endif let b:current_syntax = "hamster" diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim index 8afca048cc..11f4c35a58 100644 --- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -32,10 +32,8 @@ " to attribution of work. " 2008 Dec 15: Added comments as contained element in import statements -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -127,67 +125,57 @@ syntax match cCommentStartError display "/\*"me=e-1 contained syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained " 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_hs_syntax_inits") - if version < 508 - let did_hs_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink hsModule hsStructure - HiLink hsImport Include - HiLink hsImportMod hsImport - HiLink hsInfix PreProc - HiLink hsStructure Structure - HiLink hsStatement Statement - HiLink hsConditional Conditional - HiLink hsSpecialChar SpecialChar - HiLink hsTypedef Typedef - HiLink hsVarSym hsOperator - HiLink hsConSym hsOperator - HiLink hsOperator Operator - if exists("hs_highlight_delimiters") - " Some people find this highlighting distracting. - HiLink hsDelimiter Delimiter - endif - HiLink hsSpecialCharError Error - HiLink hsString String - HiLink hsCharacter Character - HiLink hsNumber Number - HiLink hsFloat Float - HiLink hsConditional Conditional - HiLink hsLiterateComment hsComment - HiLink hsBlockComment hsComment - HiLink hsLineComment hsComment - HiLink hsComment Comment - HiLink hsPragma SpecialComment - HiLink hsBoolean Boolean - HiLink hsType Type - HiLink hsMaybe hsEnumConst - HiLink hsOrdering hsEnumConst - HiLink hsEnumConst Constant - HiLink hsDebug Debug - - HiLink cCppString hsString - HiLink cCommentStart hsComment - HiLink cCommentError hsError - HiLink cCommentStartError hsError - HiLink cInclude Include - HiLink cPreProc PreProc - HiLink cDefine Macro - HiLink cIncluded hsString - HiLink cError Error - HiLink cPreCondit PreCondit - HiLink cComment Comment - HiLink cCppSkip cCppOut - HiLink cCppOut2 cCppOut - HiLink cCppOut Comment - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link hsModule hsStructure +hi def link hsImport Include +hi def link hsImportMod hsImport +hi def link hsInfix PreProc +hi def link hsStructure Structure +hi def link hsStatement Statement +hi def link hsConditional Conditional +hi def link hsSpecialChar SpecialChar +hi def link hsTypedef Typedef +hi def link hsVarSym hsOperator +hi def link hsConSym hsOperator +hi def link hsOperator Operator +if exists("hs_highlight_delimiters") +" Some people find this highlighting distracting. +hi def link hsDelimiter Delimiter endif +hi def link hsSpecialCharError Error +hi def link hsString String +hi def link hsCharacter Character +hi def link hsNumber Number +hi def link hsFloat Float +hi def link hsConditional Conditional +hi def link hsLiterateComment hsComment +hi def link hsBlockComment hsComment +hi def link hsLineComment hsComment +hi def link hsComment Comment +hi def link hsPragma SpecialComment +hi def link hsBoolean Boolean +hi def link hsType Type +hi def link hsMaybe hsEnumConst +hi def link hsOrdering hsEnumConst +hi def link hsEnumConst Constant +hi def link hsDebug Debug + +hi def link cCppString hsString +hi def link cCommentStart hsComment +hi def link cCommentError hsError +hi def link cCommentStartError hsError +hi def link cInclude Include +hi def link cPreProc PreProc +hi def link cDefine Macro +hi def link cIncluded hsString +hi def link cError Error +hi def link cPreCondit PreCondit +hi def link cComment Comment +hi def link cCppSkip cCppOut +hi def link cCppOut2 cCppOut +hi def link cCppOut Comment + let b:current_syntax = "haskell" diff --git a/runtime/syntax/haste.vim b/runtime/syntax/haste.vim index b889c5c594..79e9f5ec56 100644 --- a/runtime/syntax/haste.vim +++ b/runtime/syntax/haste.vim @@ -12,11 +12,8 @@ if exists("b:current_syntax") finish endif -" 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 diff --git a/runtime/syntax/hastepreproc.vim b/runtime/syntax/hastepreproc.vim index 3fcb8ddd31..f08bf3fbf3 100644 --- a/runtime/syntax/hastepreproc.vim +++ b/runtime/syntax/hastepreproc.vim @@ -5,24 +5,13 @@ " files " Version: 0.5 -" HASTE +" quit when a syntax file was already loaded if exists("b:current_syntax") - finish -endif -" 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") finish endif -" Read the C syntax to start with -if version < 600 - so <sfile>:p:h/haste.vim -else - runtime! syntax/haste.vim - unlet b:current_syntax -endif +" Read the haste syntax to start with +runtime! syntax/haste.vim +unlet b:current_syntax " case is significant syn case match diff --git a/runtime/syntax/hb.vim b/runtime/syntax/hb.vim index d4de3ff1e1..7bff1df9fb 100644 --- a/runtime/syntax/hb.vim +++ b/runtime/syntax/hb.vim @@ -4,11 +4,8 @@ " URL: http://bachue.com/hb/vim/syntax/hb.vim " Last Change: 2012 Jan 08 by Thilo Six -" 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 @@ -63,31 +60,21 @@ syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ syn match HBComment "^#.*$" " 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_hb_syntax_inits") - if version < 508 - let did_hb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink HBhtmlString String - HiLink HBhtmlTagN Function - HiLink htmlSpecialChar String - - HiLink HBInvalidLine Error - HiLink HBFoobar Comment - hi HBFileName guibg=lightgray guifg=black - HiLink HBDirectiveError Error - HiLink HBDirectiveBlockEnd HBDirectiveKeyword - hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen - HiLink HBComment Comment - HiLink HBhtmlTagSk Statement - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link HBhtmlString String +hi def link HBhtmlTagN Function +hi def link htmlSpecialChar String + +hi def link HBInvalidLine Error +hi def link HBFoobar Comment +hi HBFileName guibg=lightgray guifg=black +hi def link HBDirectiveError Error +hi def link HBDirectiveBlockEnd HBDirectiveKeyword +hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen +hi def link HBComment Comment +hi def link HBhtmlTagSk Statement + syn sync match Normal grouphere NONE "^:\s*$" syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$" diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index 41bb0b1938..d23aab9f7f 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2016 Apr 01 +" Last Change: 2016 Sep 02 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -50,6 +50,7 @@ else syn match helpIgnore "." contained endif syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: +syn keyword helpWarning WARNING: Warning: syn match helpSpecial "\<N\>" syn match helpSpecial "\<N\.$"me=e-1 syn match helpSpecial "\<N\.\s"me=e-2 @@ -161,6 +162,7 @@ hi def link helpExample Comment hi def link helpOption Type hi def link helpSpecial Special hi def link helpNote Todo +hi def link helpWarning Todo hi def link helpComment Comment hi def link helpConstant Constant diff --git a/runtime/syntax/hercules.vim b/runtime/syntax/hercules.vim index 02d8e9bb78..d305707662 100644 --- a/runtime/syntax/hercules.vim +++ b/runtime/syntax/hercules.vim @@ -7,11 +7,8 @@ " that an IC's physical design matches its logical design and " satisfies manufacturing rules. -" 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 @@ -101,32 +98,21 @@ syn match herculesOutput "error\s*=\s*(.*)" syn sync lines=100 " 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_hercules_syntax_inits") - if version < 508 - let did_hercules_syntax_inits = 1 - " Default methods for highlighting. - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink herculesStatement Statement - HiLink herculesType Type - HiLink herculesComment Comment - HiLink herculesPreProc PreProc - HiLink herculesTodo Todo - HiLink herculesOutput Include - HiLink herculesCmdCmnt Identifier - HiLink herculesNumber Number - HiLink herculesBraceError herculesError - HiLink herculesCurlyError herculesError - HiLink herculesParenError herculesError - HiLink herculesError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link herculesStatement Statement +hi def link herculesType Type +hi def link herculesComment Comment +hi def link herculesPreProc PreProc +hi def link herculesTodo Todo +hi def link herculesOutput Include +hi def link herculesCmdCmnt Identifier +hi def link herculesNumber Number +hi def link herculesBraceError herculesError +hi def link herculesCurlyError herculesError +hi def link herculesParenError herculesError +hi def link herculesError Error + let b:current_syntax = "hercules" diff --git a/runtime/syntax/hex.vim b/runtime/syntax/hex.vim index 40f7f0dd10..35edf08e9f 100644 --- a/runtime/syntax/hex.vim +++ b/runtime/syntax/hex.vim @@ -25,11 +25,8 @@ " States in parentheses in the upper format description indicate that they " should not appear in a valid file. -" 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 @@ -68,34 +65,24 @@ syn match hexChecksum "[0-9a-fA-F]\{2}$" contained syn region hexExtAdrBlock start="^:[0-9a-fA-F]\{7}[24]" skip="^:[0-9a-fA-F]\{7}0" end="^:"me=s-1 fold transparent " 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_hex_syntax_inits") - if version < 508 - let did_hex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default methods for highlighting. Can be overridden later - HiLink hexRecStart hexRecType - HiLink hexDataByteCount Constant - hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic - HiLink hexDataAddress Comment - HiLink hexNoAddress DiffAdd - HiLink hexRecTypeUnknown hexRecType - HiLink hexRecType WarningMsg - hi def hexDataFieldUnknown term=italic cterm=italic gui=italic - hi def hexDataOdd term=bold cterm=bold gui=bold - hi def hexDataEven term=NONE cterm=NONE gui=NONE - HiLink hexDataUnexpected Error - HiLink hexExtendedAddress hexDataAddress - HiLink hexStartAddress hexDataAddress - HiLink hexChecksum DiffChange +" The default methods for highlighting. Can be overridden later +hi def link hexRecStart hexRecType +hi def link hexDataByteCount Constant +hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic +hi def link hexDataAddress Comment +hi def link hexNoAddress DiffAdd +hi def link hexRecTypeUnknown hexRecType +hi def link hexRecType WarningMsg +hi def hexDataFieldUnknown term=italic cterm=italic gui=italic +hi def hexDataOdd term=bold cterm=bold gui=bold +hi def hexDataEven term=NONE cterm=NONE gui=NONE +hi def link hexDataUnexpected Error +hi def link hexExtendedAddress hexDataAddress +hi def link hexStartAddress hexDataAddress +hi def link hexChecksum DiffChange - delcommand HiLink -endif let b:current_syntax = "hex" diff --git a/runtime/syntax/hog.vim b/runtime/syntax/hog.vim index f37f7ae899..7206815202 100644 --- a/runtime/syntax/hog.vim +++ b/runtime/syntax/hog.vim @@ -4,9 +4,8 @@ " Last Change: 2015 Oct 24 -> Rename syntax items from Snort -> Hog " 2012 Oct 24 -> Originalish release -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 diff --git a/runtime/syntax/hostsaccess.vim b/runtime/syntax/hostsaccess.vim index 8a9f02eff5..7201816f48 100644 --- a/runtime/syntax/hostsaccess.vim +++ b/runtime/syntax/hostsaccess.vim @@ -15,12 +15,8 @@ if exists("b:current_syntax") endif " For a starter we just use conf.vim for highlighting -if version < 600 - so <sfile>:p:h/conf.vim -else - runtime! syntax/conf.vim - unlet b:current_syntax -endif +runtime! syntax/conf.vim +unlet b:current_syntax let b:current_syntax = "hostsaccess" diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index ab1f9b3c13..336d8c9f44 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -7,12 +7,9 @@ " Please check :help html.vim for some comments and a description of the options -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif let main_syntax = 'html' @@ -21,13 +18,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ HtmlHiLink hi link <args> -else - command! -nargs=+ HtmlHiLink hi def link <args> -endif - syntax spell toplevel syn case ignore @@ -171,7 +161,7 @@ if main_syntax != 'java' || exists("java_javascript") unlet b:current_syntax syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent - HtmlHiLink htmlScriptTag htmlTag + hi def link htmlScriptTag htmlTag " html events (i.e. arguments that include javascript commands) if exists("html_extended_events") @@ -183,8 +173,8 @@ if main_syntax != 'java' || exists("java_javascript") endif syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript - HtmlHiLink htmlEventSQ htmlEvent - HtmlHiLink htmlEventDQ htmlEvent + hi def link htmlEventSQ htmlEvent + hi def link htmlEventDQ htmlEvent " a javascript expression is used as an arg value syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc @@ -207,7 +197,7 @@ if main_syntax != 'java' || exists("java_css") syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc syn match htmlCssStyleComment contained "\(<!--\|-->\)" syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc - HtmlHiLink htmlStyleArg htmlString + hi def link htmlStyleArg htmlString endif if main_syntax == "html" @@ -221,73 +211,66 @@ if main_syntax == "html" endif " The default highlighting. -if version >= 508 || !exists("did_html_syn_inits") - if version < 508 - let did_html_syn_inits = 1 - endif - HtmlHiLink htmlTag Function - HtmlHiLink htmlEndTag Identifier - HtmlHiLink htmlArg Type - HtmlHiLink htmlTagName htmlStatement - HtmlHiLink htmlSpecialTagName Exception - HtmlHiLink htmlValue String - HtmlHiLink htmlSpecialChar Special - - if !exists("html_no_rendering") - HtmlHiLink htmlH1 Title - HtmlHiLink htmlH2 htmlH1 - HtmlHiLink htmlH3 htmlH2 - HtmlHiLink htmlH4 htmlH3 - HtmlHiLink htmlH5 htmlH4 - HtmlHiLink htmlH6 htmlH5 - HtmlHiLink htmlHead PreProc - HtmlHiLink htmlTitle Title - HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBold htmlBoldUnderline - HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic - HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderline htmlUnderlineItalic - HtmlHiLink htmlItalicBold htmlBoldItalic - HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic - HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic - HtmlHiLink htmlLink Underlined - HtmlHiLink htmlLeadingSpace None - if !exists("html_my_rendering") - hi def htmlBold term=bold cterm=bold gui=bold - hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline - hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline - hi def htmlUnderline term=underline cterm=underline gui=underline - hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline - hi def htmlItalic term=italic cterm=italic gui=italic - endif +hi def link htmlTag Function +hi def link htmlEndTag Identifier +hi def link htmlArg Type +hi def link htmlTagName htmlStatement +hi def link htmlSpecialTagName Exception +hi def link htmlValue String +hi def link htmlSpecialChar Special + +if !exists("html_no_rendering") + hi def link htmlH1 Title + hi def link htmlH2 htmlH1 + hi def link htmlH3 htmlH2 + hi def link htmlH4 htmlH3 + hi def link htmlH5 htmlH4 + hi def link htmlH6 htmlH5 + hi def link htmlHead PreProc + hi def link htmlTitle Title + hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic + hi def link htmlUnderlineBold htmlBoldUnderline + hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic + hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic + hi def link htmlItalicUnderline htmlUnderlineItalic + hi def link htmlItalicBold htmlBoldItalic + hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic + hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic + hi def link htmlLink Underlined + hi def link htmlLeadingSpace None + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic endif - - HtmlHiLink htmlPreStmt PreProc - HtmlHiLink htmlPreError Error - HtmlHiLink htmlPreProc PreProc - HtmlHiLink htmlPreAttr String - HtmlHiLink htmlPreProcAttrName PreProc - HtmlHiLink htmlPreProcAttrError Error - HtmlHiLink htmlSpecial Special - HtmlHiLink htmlSpecialChar Special - HtmlHiLink htmlString String - HtmlHiLink htmlStatement Statement - HtmlHiLink htmlComment Comment - HtmlHiLink htmlCommentPart Comment - HtmlHiLink htmlValue String - HtmlHiLink htmlCommentError htmlError - HtmlHiLink htmlTagError htmlError - HtmlHiLink htmlEvent javaScript - HtmlHiLink htmlError Error - - HtmlHiLink javaScript Special - HtmlHiLink javaScriptExpression javaScript - HtmlHiLink htmlCssStyleComment Comment - HtmlHiLink htmlCssDefinition Special endif -delcommand HtmlHiLink +hi def link htmlPreStmt PreProc +hi def link htmlPreError Error +hi def link htmlPreProc PreProc +hi def link htmlPreAttr String +hi def link htmlPreProcAttrName PreProc +hi def link htmlPreProcAttrError Error +hi def link htmlSpecial Special +hi def link htmlSpecialChar Special +hi def link htmlString String +hi def link htmlStatement Statement +hi def link htmlComment Comment +hi def link htmlCommentPart Comment +hi def link htmlValue String +hi def link htmlCommentError htmlError +hi def link htmlTagError htmlError +hi def link htmlEvent javaScript +hi def link htmlError Error + +hi def link javaScript Special +hi def link javaScriptExpression javaScript +hi def link htmlCssStyleComment Comment +hi def link htmlCssDefinition Special let b:current_syntax = "html" diff --git a/runtime/syntax/htmlcheetah.vim b/runtime/syntax/htmlcheetah.vim index f57df90dea..0721c76b44 100644 --- a/runtime/syntax/htmlcheetah.vim +++ b/runtime/syntax/htmlcheetah.vim @@ -3,11 +3,8 @@ " Maintainer: Max Ischenko <mfi@ukr.net> " Last Change: 2003-05-11 -" 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 @@ -15,14 +12,9 @@ if !exists("main_syntax") let main_syntax = 'html' endif -if version < 600 - so <sfile>:p:h/cheetah.vim - so <sfile>:p:h/html.vim -else - runtime! syntax/cheetah.vim - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/cheetah.vim +runtime! syntax/html.vim +unlet b:current_syntax syntax cluster htmlPreproc add=cheetahPlaceHolder syntax cluster htmlString add=cheetahPlaceHolder diff --git a/runtime/syntax/htmldjango.vim b/runtime/syntax/htmldjango.vim index 58afd1b62d..07b1c375e8 100644 --- a/runtime/syntax/htmldjango.vim +++ b/runtime/syntax/htmldjango.vim @@ -3,11 +3,8 @@ " Maintainer: Dave Hodder <dmh@dmh.org.uk> " Last Change: 2014 Jul 13 -" 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 @@ -15,14 +12,9 @@ if !exists("main_syntax") let main_syntax = 'html' endif -if version < 600 - so <sfile>:p:h/django.vim - so <sfile>:p:h/html.vim -else - runtime! syntax/django.vim - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/django.vim +runtime! syntax/html.vim +unlet b:current_syntax syn cluster djangoBlocks add=djangoTagBlock,djangoVarBlock,djangoComment,djangoComBlock diff --git a/runtime/syntax/htmlm4.vim b/runtime/syntax/htmlm4.vim index 3119d2d1ad..ee1f06e5f4 100644 --- a/runtime/syntax/htmlm4.vim +++ b/runtime/syntax/htmlm4.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/htmlm4.vim " Last Change: 2001 Apr 30 -" 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 @@ -17,19 +14,12 @@ if !exists("main_syntax") let main_syntax='htmlm4' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax syn case match -if version < 600 - so <sfile>:p:h/m4.vim -else - runtime! syntax/m4.vim -endif +runtime! syntax/m4.vim + unlet b:current_syntax syn cluster htmlPreproc add=@m4Top syn cluster m4StringContents add=htmlTag,htmlEndTag diff --git a/runtime/syntax/htmlos.vim b/runtime/syntax/htmlos.vim index f31b9f6543..b54ca7a921 100644 --- a/runtime/syntax/htmlos.vim +++ b/runtime/syntax/htmlos.vim @@ -6,11 +6,8 @@ " Last Change: 2003 May 11 " -" 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 @@ -18,12 +15,8 @@ if !exists("main_syntax") let main_syntax = 'htmlos' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=htmlosRegion @@ -121,42 +114,32 @@ else endif " 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_htmlos_syn_inits") - if version < 508 - let did_htmlos_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink htmlosSpecialIdentifier Operator - HiLink htmlosIdentifier Identifier - HiLink htmlosStorageClass StorageClass - HiLink htmlosComment Comment - HiLink htmlosBoolean Boolean - HiLink htmlosStringSingle String - HiLink htmlosStringDouble String - HiLink htmlosNumber Number - HiLink htmlosFloat Float - HiLink htmlosFunctions Function - HiLink htmlosRepeat Repeat - HiLink htmlosConditional Conditional - HiLink htmlosLabel Label - HiLink htmlosStatement Statement - HiLink htmlosKeyword Statement - HiLink htmlosType Type - HiLink htmlosDefine Define - HiLink htmlosParent Delimiter - HiLink htmlosError Error - HiLink htmlosTodo Todo - HiLink htmlosOperator Operator - HiLink htmlosRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link htmlosSpecialIdentifier Operator +hi def link htmlosIdentifier Identifier +hi def link htmlosStorageClass StorageClass +hi def link htmlosComment Comment +hi def link htmlosBoolean Boolean +hi def link htmlosStringSingle String +hi def link htmlosStringDouble String +hi def link htmlosNumber Number +hi def link htmlosFloat Float +hi def link htmlosFunctions Function +hi def link htmlosRepeat Repeat +hi def link htmlosConditional Conditional +hi def link htmlosLabel Label +hi def link htmlosStatement Statement +hi def link htmlosKeyword Statement +hi def link htmlosType Type +hi def link htmlosDefine Define +hi def link htmlosParent Delimiter +hi def link htmlosError Error +hi def link htmlosTodo Todo +hi def link htmlosOperator Operator +hi def link htmlosRelation Operator + let b:current_syntax = "htmlos" if main_syntax == 'htmlos' diff --git a/runtime/syntax/ia64.vim b/runtime/syntax/ia64.vim index ebfdc95bae..544fcd402c 100644 --- a/runtime/syntax/ia64.vim +++ b/runtime/syntax/ia64.vim @@ -6,11 +6,8 @@ " File Version: 0.7 " Last Change: 2006 Sep 08 -" 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 @@ -19,11 +16,7 @@ endif syn case ignore " Identifier Keyword characters (defines \k) -if version >= 600 - setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ -else - set iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ -endif +setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ syn sync minlines=5 @@ -268,43 +261,33 @@ syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\ syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" " 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_ia64_syn_inits") - if version < 508 - let did_ia64_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - "put masm groups with our groups - HiLink masmOperator ia64operator - HiLink masmDirective ia64Directive - HiLink masmOpcode ia64Opcode - HiLink masmIdentifier ia64Identifier - HiLink masmFloat ia64Float +"put masm groups with our groups +hi def link masmOperator ia64operator +hi def link masmDirective ia64Directive +hi def link masmOpcode ia64Opcode +hi def link masmIdentifier ia64Identifier +hi def link masmFloat ia64Float - "ia64 specific stuff - HiLink ia64Label Define - HiLink ia64Comment Comment - HiLink ia64Directive Type - HiLink ia64opcode Statement - HiLink ia64registers Operator - HiLink ia64string String - HiLink ia64Hex Number - HiLink ia64Binary Number - HiLink ia64Octal Number - HiLink ia64Float Float - HiLink ia64Decimal Number - HiLink ia64Identifier Identifier - HiLink ia64data Type - HiLink ia64delimiter Delimiter - HiLink ia64operator Operator - HiLink ia64Todo Todo +"ia64 specific stuff +hi def link ia64Label Define +hi def link ia64Comment Comment +hi def link ia64Directive Type +hi def link ia64opcode Statement +hi def link ia64registers Operator +hi def link ia64string String +hi def link ia64Hex Number +hi def link ia64Binary Number +hi def link ia64Octal Number +hi def link ia64Float Float +hi def link ia64Decimal Number +hi def link ia64Identifier Identifier +hi def link ia64data Type +hi def link ia64delimiter Delimiter +hi def link ia64operator Operator +hi def link ia64Todo Todo - delcommand HiLink -endif let b:current_syntax = "ia64" diff --git a/runtime/syntax/icemenu.vim b/runtime/syntax/icemenu.vim index d3a733d579..6513287dfc 100644 --- a/runtime/syntax/icemenu.vim +++ b/runtime/syntax/icemenu.vim @@ -6,10 +6,8 @@ " Comment: Icewm is a lightweight window manager. This adds syntax " highlighting when editing your user's menu file (~/.icewm/menu). -" clear existing 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 diff --git a/runtime/syntax/icon.vim b/runtime/syntax/icon.vim index 1a73c43d8f..179d75cd28 100644 --- a/runtime/syntax/icon.vim +++ b/runtime/syntax/icon.vim @@ -4,11 +4,8 @@ " URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim " Last Change: 2003 May 11 -" 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 @@ -157,56 +154,46 @@ exec "syn sync ccomment iconComment minlines=" . icon_minlines " 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 -if version >= 508 || !exists("did_icon_syn_inits") - if version < 508 - let did_icon_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - - " HiLink iconSpecialCharacter iconSpecial - - HiLink iconOctalError iconError - HiLink iconParenError iconError - HiLink iconInParen iconError - HiLink iconCommentError iconError - HiLink iconSpaceError iconError - HiLink iconCommentError iconError - HiLink iconIncluded iconString - HiLink iconCommentString iconString - HiLink iconComment2String iconString - HiLink iconCommentSkip iconComment - - HiLink iconUserLabel Label - HiLink iconCharacter Character - HiLink iconNumber Number - HiLink iconRadix Number - HiLink iconFloat Float - HiLink iconInclude Include - HiLink iconPreProc PreProc - HiLink iconDefine Macro - HiLink iconError Error - HiLink iconStatement Statement - HiLink iconPreCondit PreCondit - HiLink iconString String - HiLink iconCset String - HiLink iconComment Comment - HiLink iconSpecial SpecialChar - HiLink iconTodo Todo - HiLink iconStorageClass StorageClass - HiLink iconFunction Statement - HiLink iconReserved Label - HiLink iconKeyword Operator - - "HiLink iconIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting + +" The default methods for highlighting. Can be overridden later + +" hi def link iconSpecialCharacter iconSpecial + +hi def link iconOctalError iconError +hi def link iconParenError iconError +hi def link iconInParen iconError +hi def link iconCommentError iconError +hi def link iconSpaceError iconError +hi def link iconCommentError iconError +hi def link iconIncluded iconString +hi def link iconCommentString iconString +hi def link iconComment2String iconString +hi def link iconCommentSkip iconComment + +hi def link iconUserLabel Label +hi def link iconCharacter Character +hi def link iconNumber Number +hi def link iconRadix Number +hi def link iconFloat Float +hi def link iconInclude Include +hi def link iconPreProc PreProc +hi def link iconDefine Macro +hi def link iconError Error +hi def link iconStatement Statement +hi def link iconPreCondit PreCondit +hi def link iconString String +hi def link iconCset String +hi def link iconComment Comment +hi def link iconSpecial SpecialChar +hi def link iconTodo Todo +hi def link iconStorageClass StorageClass +hi def link iconFunction Statement +hi def link iconReserved Label +hi def link iconKeyword Operator + +"hi def link iconIdentifier Identifier + let b:current_syntax = "icon" diff --git a/runtime/syntax/idl.vim b/runtime/syntax/idl.vim index c51850b13a..6a4ce7e087 100644 --- a/runtime/syntax/idl.vim +++ b/runtime/syntax/idl.vim @@ -222,100 +222,98 @@ try if !exists("did_idl_syntax_inits") let did_idl_syntax_inits = 1 " The default methods for highlighting. Can be overridden later - command -nargs=+ HiLink hi def link <args> - - HiLink idlInclude Include - HiLink idlPreProc PreProc - HiLink idlPreCondit PreCondit - HiLink idlDefine Macro - HiLink idlIncluded String - HiLink idlString String - HiLink idlComment Comment - HiLink idlTodo Todo - HiLink idlLiteral Number - HiLink idlUuid Number - HiLink idlType Type - HiLink idlVariantType idlType - - HiLink idlModule Keyword - HiLink idlInterface Keyword - HiLink idlEnum Keyword - HiLink idlStruct Keyword - HiLink idlUnion Keyword - HiLink idlTypedef Keyword - HiLink idlException Keyword - HiLink idlTypedefOtherTypeQualifier keyword - - HiLink idlModuleName Typedef - HiLink idlInterfaceName Typedef - HiLink idlEnumName Typedef - HiLink idlStructName Typedef - HiLink idlUnionName Typedef - - HiLink idlBaseTypeInt idlType - HiLink idlBaseType idlType - HiLink idlSeqType idlType - HiLink idlD1 Paren - HiLink idlD2 Paren - HiLink idlD3 Paren - HiLink idlD4 Paren - "HiLink idlArraySize Paren - "HiLink idlArraySize1 Paren - HiLink idlModuleContent Paren - HiLink idlUnionContent Paren - HiLink idlStructContent Paren - HiLink idlEnumContents Paren - HiLink idlInterfaceContent Paren - - HiLink idlSimpDecl Identifier - HiLink idlROAttr StorageClass - HiLink idlAttr Keyword - HiLink idlConst StorageClass - - HiLink idlOneWayOp StorageClass - HiLink idlOp idlType - HiLink idlParmType idlType - HiLink idlOpName Function - HiLink idlOpParms SpecialComment - HiLink idlParmName Identifier - HiLink idlInheritFrom Identifier - HiLink idlAttribute SpecialComment - - HiLink idlId Constant - "HiLink idlCase Keyword - HiLink idlCaseLabel Constant - - HiLink idlErrorBracket Error - HiLink idlErrorBrace Error - HiLink idlErrorSquareBracket Error - - HiLink idlImport Keyword - HiLink idlImportString idlString - HiLink idlCoclassAttribute StorageClass - HiLink idlLibrary Keyword - HiLink idlImportlib Keyword - HiLink idlCoclass Keyword - HiLink idlLibraryName Typedef - HiLink idlCoclassName Typedef - " hi idlLibraryContent guifg=red - HiLink idlTypedefDecl Typedef - HiLink idlDefEnum Keyword - HiLink idlDefv1Enum Keyword - HiLink idlDefEnumName Typedef - HiLink idlDefEnumContents Paren - HiLink idlDefBaseTypeInt idlType - HiLink idlDefBaseType idlType - HiLink idlDefSeqType idlType - HiLink idlInterfaceSections Label + + hi def link idlInclude Include + hi def link idlPreProc PreProc + hi def link idlPreCondit PreCondit + hi def link idlDefine Macro + hi def link idlIncluded String + hi def link idlString String + hi def link idlComment Comment + hi def link idlTodo Todo + hi def link idlLiteral Number + hi def link idlUuid Number + hi def link idlType Type + hi def link idlVariantType idlType + + hi def link idlModule Keyword + hi def link idlInterface Keyword + hi def link idlEnum Keyword + hi def link idlStruct Keyword + hi def link idlUnion Keyword + hi def link idlTypedef Keyword + hi def link idlException Keyword + hi def link idlTypedefOtherTypeQualifier keyword + + hi def link idlModuleName Typedef + hi def link idlInterfaceName Typedef + hi def link idlEnumName Typedef + hi def link idlStructName Typedef + hi def link idlUnionName Typedef + + hi def link idlBaseTypeInt idlType + hi def link idlBaseType idlType + hi def link idlSeqType idlType + hi def link idlD1 Paren + hi def link idlD2 Paren + hi def link idlD3 Paren + hi def link idlD4 Paren + "hi def link idlArraySize Paren + "hi def link idlArraySize1 Paren + hi def link idlModuleContent Paren + hi def link idlUnionContent Paren + hi def link idlStructContent Paren + hi def link idlEnumContents Paren + hi def link idlInterfaceContent Paren + + hi def link idlSimpDecl Identifier + hi def link idlROAttr StorageClass + hi def link idlAttr Keyword + hi def link idlConst StorageClass + + hi def link idlOneWayOp StorageClass + hi def link idlOp idlType + hi def link idlParmType idlType + hi def link idlOpName Function + hi def link idlOpParms SpecialComment + hi def link idlParmName Identifier + hi def link idlInheritFrom Identifier + hi def link idlAttribute SpecialComment + + hi def link idlId Constant + "hi def link idlCase Keyword + hi def link idlCaseLabel Constant + + hi def link idlErrorBracket Error + hi def link idlErrorBrace Error + hi def link idlErrorSquareBracket Error + + hi def link idlImport Keyword + hi def link idlImportString idlString + hi def link idlCoclassAttribute StorageClass + hi def link idlLibrary Keyword + hi def link idlImportlib Keyword + hi def link idlCoclass Keyword + hi def link idlLibraryName Typedef + hi def link idlCoclassName Typedef + " hi def link idlLibraryContent guifg=red + hi def link idlTypedefDecl Typedef + hi def link idlDefEnum Keyword + hi def link idlDefv1Enum Keyword + hi def link idlDefEnumName Typedef + hi def link idlDefEnumContents Paren + hi def link idlDefBaseTypeInt idlType + hi def link idlDefBaseType idlType + hi def link idlDefSeqType idlType + hi def link idlInterfaceSections Label if exists("idlsyntax_showerror") if exists("idlsyntax_showerror_soft") hi default idlError guibg=#d0ffd0 else - HiLink idlError Error + hi def link idlError Error endif endif - delcommand HiLink endif let b:current_syntax = "idl" diff --git a/runtime/syntax/idlang.vim b/runtime/syntax/idlang.vim index 670d080a7d..14e976ce05 100644 --- a/runtime/syntax/idlang.vim +++ b/runtime/syntax/idlang.vim @@ -4,11 +4,8 @@ " Created by: Hermann Rochholz <Hermann.Rochholz AT gmx.de> " Remove any old syntax stuff hanging around -" 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 @@ -219,35 +216,25 @@ syn keyword idlangRoutine XSQ_TEST XSURFACE XVAREDIT XVOLUME XVOLUME_ROTATE syn keyword idlangRoutine XVOLUME_WRITE_IMAGE XYOUTS ZOOM ZOOM_24 " 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_idlang_syn_inits") - if version < 508 - let did_idlang_syn_inits = 1 - command -nargs=+ HiLink hi link <args> -else - command -nargs=+ HiLink hi def link <args> -endif +" Only when an item doesn't have highlighting yet + +hi def link idlangConditional Conditional +hi def link idlangRoutine Type +hi def link idlangStatement Statement +hi def link idlangContinueLine Todo +hi def link idlangRealNumber Float +hi def link idlangNumber Number +hi def link idlangString String +hi def link idlangOperator Operator +hi def link idlangComment Comment +hi def link idlangTodo Todo +hi def link idlangPreCondit Identifier +hi def link idlangDblCommaError Error +hi def link idlangStop Error +hi def link idlangStrucvar PreProc +hi def link idlangSystem Identifier +hi def link idlangKeyword Special - HiLink idlangConditional Conditional - HiLink idlangRoutine Type - HiLink idlangStatement Statement - HiLink idlangContinueLine Todo - HiLink idlangRealNumber Float - HiLink idlangNumber Number - HiLink idlangString String - HiLink idlangOperator Operator - HiLink idlangComment Comment - HiLink idlangTodo Todo - HiLink idlangPreCondit Identifier - HiLink idlangDblCommaError Error - HiLink idlangStop Error - HiLink idlangStrucvar PreProc - HiLink idlangSystem Identifier - HiLink idlangKeyword Special - - delcommand HiLink -endif let b:current_syntax = "idlang" " vim: ts=18 diff --git a/runtime/syntax/inform.vim b/runtime/syntax/inform.vim index d8ba43dcee..e3e1b3e1f0 100644 --- a/runtime/syntax/inform.vim +++ b/runtime/syntax/inform.vim @@ -4,10 +4,8 @@ " URL: http://www.gowarthomas.com/informvim " Last Change: 2006 April 20 -" 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 @@ -294,13 +292,8 @@ endif " Handling for different versions of VIM. -if version >= 600 - setlocal iskeyword+=$ - command -nargs=+ SynDisplay syntax <args> display -else - set iskeyword+=$ - command -nargs=+ SynDisplay syntax <args> -endif +setlocal iskeyword+=$ +command -nargs=+ SynDisplay syntax <args> display " Grammar sections. @@ -347,61 +340,52 @@ syn sync maxlines=500 delcommand SynDisplay " The default highlighting. -if version >= 508 || !exists("did_inform_syn_inits") - if version < 508 - let did_inform_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink informDefine Define - HiLink informType Type - HiLink informInclude Include - HiLink informPreCondit PreCondit - HiLink informPreProc PreProc - HiLink informGramPreProc PreProc - HiLink informAsm Special - if !exists("inform_suppress_obsolete") - HiLink informAsmObsolete informError - HiLink informKeywordObsolete informError - else - HiLink informAsmObsolete Special - HiLink informKeywordObsolete Keyword - endif - HiLink informPredicate Operator - HiLink informSysFunc Identifier - HiLink informSysConst Identifier - HiLink informConditional Conditional - HiLink informRepeat Repeat - HiLink informStatement Statement - HiLink informOperator Operator - HiLink informKeyword Keyword - HiLink informGrammar Keyword - HiLink informDictString String - HiLink informNumber Number - HiLink informError Error - HiLink informString String - HiLink informComment Comment - HiLink informAccent Special - HiLink informStringUnicode Special - HiLink informStringCode Special - HiLink informTodo Todo - if !exists("inform_highlight_simple") - HiLink informLibAttrib Identifier - HiLink informLibProp Identifier - HiLink informLibObj Identifier - HiLink informLibRoutine Identifier - HiLink informLibVariable Identifier - HiLink informLibConst Identifier - HiLink informLibAction Identifier - endif - HiLink informBadDictString informError - HiLink informBadAccent informError - HiLink informBadStrUnicode informError - delcommand HiLink +hi def link informDefine Define +hi def link informType Type +hi def link informInclude Include +hi def link informPreCondit PreCondit +hi def link informPreProc PreProc +hi def link informGramPreProc PreProc +hi def link informAsm Special +if !exists("inform_suppress_obsolete") +hi def link informAsmObsolete informError +hi def link informKeywordObsolete informError +else +hi def link informAsmObsolete Special +hi def link informKeywordObsolete Keyword endif +hi def link informPredicate Operator +hi def link informSysFunc Identifier +hi def link informSysConst Identifier +hi def link informConditional Conditional +hi def link informRepeat Repeat +hi def link informStatement Statement +hi def link informOperator Operator +hi def link informKeyword Keyword +hi def link informGrammar Keyword +hi def link informDictString String +hi def link informNumber Number +hi def link informError Error +hi def link informString String +hi def link informComment Comment +hi def link informAccent Special +hi def link informStringUnicode Special +hi def link informStringCode Special +hi def link informTodo Todo +if !exists("inform_highlight_simple") +hi def link informLibAttrib Identifier +hi def link informLibProp Identifier +hi def link informLibObj Identifier +hi def link informLibRoutine Identifier +hi def link informLibVariable Identifier +hi def link informLibConst Identifier +hi def link informLibAction Identifier +endif +hi def link informBadDictString informError +hi def link informBadAccent informError +hi def link informBadStrUnicode informError + let b:current_syntax = "inform" diff --git a/runtime/syntax/inittab.vim b/runtime/syntax/inittab.vim index b7472f9e0f..82bf660105 100644 --- a/runtime/syntax/inittab.vim +++ b/runtime/syntax/inittab.vim @@ -6,12 +6,9 @@ " URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -45,31 +42,22 @@ syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment " Define the default highlighting -if version >= 508 || !exists("did_inittab_syntax_inits") - if version < 508 - let did_inittab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink inittabComment Comment - HiLink inittabFixme Todo - HiLink inittabActionName Type - HiLink inittabError Error - HiLink inittabId Identifier - HiLink inittabRunLevels Special +hi def link inittabComment Comment +hi def link inittabFixme Todo +hi def link inittabActionName Type +hi def link inittabError Error +hi def link inittabId Identifier +hi def link inittabRunLevels Special - HiLink inittabColonProcess inittabColon - HiLink inittabColonAction inittabColon - HiLink inittabColonRunLevels inittabColon - HiLink inittabColon PreProc +hi def link inittabColonProcess inittabColon +hi def link inittabColonAction inittabColon +hi def link inittabColonRunLevels inittabColon +hi def link inittabColon PreProc - HiLink inittabShString String - HiLink inittabShOption Special - HiLink inittabShCommand Statement +hi def link inittabShString String +hi def link inittabShOption Special +hi def link inittabShCommand Statement - delcommand HiLink -endif let b:current_syntax = "inittab" diff --git a/runtime/syntax/ipfilter.vim b/runtime/syntax/ipfilter.vim index db99812852..a7b7df2bac 100644 --- a/runtime/syntax/ipfilter.vim +++ b/runtime/syntax/ipfilter.vim @@ -9,11 +9,8 @@ " not correctly identified. " Please send comments to hendrik@scholz.net -" 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 diff --git a/runtime/syntax/ishd.vim b/runtime/syntax/ishd.vim index 1c011f1b92..3c468e361f 100644 --- a/runtime/syntax/ishd.vim +++ b/runtime/syntax/ishd.vim @@ -3,11 +3,8 @@ " Maintainer: Robert M. Cortopassi <cortopar@mindspring.com> " Last Change: 2001 May 09 -" 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 @@ -387,35 +384,25 @@ syn cluster ishdPreProcGroup contains=ishdPreCondit,ishdIncluded,ishdInclude,ish syn region ishdDefine start="^\s*#\s*\(define\|undef\)\>" end="$" contains=ALLBUT,@ishdPreProcGroup " 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_is_syntax_inits") - if version < 508 - let did_is_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink ishdNumber Number - HiLink ishdError Error - HiLink ishdStatement Statement - HiLink ishdString String - HiLink ishdComment Comment - HiLink ishdTodo Todo - HiLink ishdFunction Identifier - HiLink ishdConstant PreProc - HiLink ishdType Type - HiLink ishdInclude Include - HiLink ishdDefine Macro - HiLink ishdIncluded String - HiLink ishdPreCondit PreCondit - HiLink ishdHashIf0Skip ishdHashIf0 - HiLink ishdHashIf0End ishdHashIf0 - HiLink ishdHashIf0 Comment +hi def link ishdNumber Number +hi def link ishdError Error +hi def link ishdStatement Statement +hi def link ishdString String +hi def link ishdComment Comment +hi def link ishdTodo Todo +hi def link ishdFunction Identifier +hi def link ishdConstant PreProc +hi def link ishdType Type +hi def link ishdInclude Include +hi def link ishdDefine Macro +hi def link ishdIncluded String +hi def link ishdPreCondit PreCondit +hi def link ishdHashIf0Skip ishdHashIf0 +hi def link ishdHashIf0End ishdHashIf0 +hi def link ishdHashIf0 Comment - delcommand HiLink -endif let b:current_syntax = "ishd" diff --git a/runtime/syntax/iss.vim b/runtime/syntax/iss.vim index 26d9150b5a..e58c618b7f 100644 --- a/runtime/syntax/iss.vim +++ b/runtime/syntax/iss.vim @@ -9,11 +9,8 @@ " - Pascal scripting syntax is not recognized. " - Embedded double quotes confuse string matches. e.g. "asfd""asfa" -" 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 @@ -105,44 +102,34 @@ syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart uncheck " 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_iss_syntax_inits") - if version < 508 - let did_iss_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink issSection Special - HiLink issComment Comment - HiLink issDirective Type - HiLink issParam Type - HiLink issFolder Special - HiLink issString String - HiLink issURL Include - HiLink issPreProc PreProc - - HiLink issDirsFlags Keyword - HiLink issFilesCopyMode Keyword - HiLink issFilesAttribs Keyword - HiLink issFilesPermissions Keyword - HiLink issFilesFlags Keyword - HiLink issIconsFlags Keyword - HiLink issINIFlags Keyword - HiLink issRegRootKey Keyword - HiLink issRegValueType Keyword - HiLink issRegFlags Keyword - HiLink issRunFlags Keyword - HiLink issTypesFlags Keyword - HiLink issComponentsFlags Keyword - HiLink issInstallDeleteType Keyword - HiLink issTasksFlags Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link issSection Special +hi def link issComment Comment +hi def link issDirective Type +hi def link issParam Type +hi def link issFolder Special +hi def link issString String +hi def link issURL Include +hi def link issPreProc PreProc + +hi def link issDirsFlags Keyword +hi def link issFilesCopyMode Keyword +hi def link issFilesAttribs Keyword +hi def link issFilesPermissions Keyword +hi def link issFilesFlags Keyword +hi def link issIconsFlags Keyword +hi def link issINIFlags Keyword +hi def link issRegRootKey Keyword +hi def link issRegValueType Keyword +hi def link issRegFlags Keyword +hi def link issRunFlags Keyword +hi def link issTypesFlags Keyword +hi def link issComponentsFlags Keyword +hi def link issInstallDeleteType Keyword +hi def link issTasksFlags Keyword + let b:current_syntax = "iss" diff --git a/runtime/syntax/ist.vim b/runtime/syntax/ist.vim index 131d833cbc..e34edac272 100644 --- a/runtime/syntax/ist.vim +++ b/runtime/syntax/ist.vim @@ -3,22 +3,15 @@ " Maintainer: Peter Meszaros <pmeszaros@effice.hu> " Last Change: 2012 Jan 08 by Thilo Six -" 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:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=$,@,48-57,_ -else - set iskeyword=$,@,48-57,_ -endif +setlocal iskeyword=$,@,48-57,_ syn case ignore syn keyword IstInpSpec actual arg_close arg_open encap escape @@ -45,28 +38,18 @@ syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained syn match IstTodo "DEBUG\|TODO" contained " 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_dummy_syn_inits") - if version < 508 - let did_dummy_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink IstInpSpec Type - HiLink IstOutSpec Identifier - HiLink IstString String - HiLink IstNumber Number - HiLink IstComment Comment - HiLink IstTodo Todo - HiLink IstSpecial Special - HiLink IstDoubleQuote Label - HiLink IstCharacter Label +" Only when an item doesn't have highlighting yet + +hi def link IstInpSpec Type +hi def link IstOutSpec Identifier +hi def link IstString String +hi def link IstNumber Number +hi def link IstComment Comment +hi def link IstTodo Todo +hi def link IstSpecial Special +hi def link IstDoubleQuote Label +hi def link IstCharacter Label - delcommand HiLink -endif let b:current_syntax = "ist" diff --git a/runtime/syntax/jal.vim b/runtime/syntax/jal.vim index d0ba672851..460bc01752 100644 --- a/runtime/syntax/jal.vim +++ b/runtime/syntax/jal.vim @@ -9,11 +9,8 @@ " " TODO test. -" 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 @@ -171,77 +168,67 @@ endif " 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_jal_syn_inits") -if version < 508 - let did_jal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> -else - command -nargs=+ HiLink hi def link <args> -endif +" Only when an item doesn't have highlighting yet + +hi def link jalAcces jalStatement +hi def link jalBoolean Boolean +hi def link jalBit Boolean +hi def link jalComment Comment +hi def link jalConditional Conditional +hi def link jalConstant Constant +hi def link jalDelimiter Identifier +hi def link jalDirective PreProc +hi def link jalException Exception +hi def link jalFloat Float +hi def link jalFunction Function +hi def link jalPsudoVarsKey Function +hi def link jalLabel Label +hi def link jalMatrixDelimiter Identifier +hi def link jalModifier Type +hi def link jalNumber Number +hi def link jalBinNumber Number +hi def link jalHexNumber Number +hi def link jalOperator Operator +hi def link jalPredefined Constant +hi def link jalPreProc PreProc +hi def link jalRepeat Repeat +hi def link jalStatement Statement +hi def link jalString String +hi def link jalStringEscape Special +hi def link jalStringEscapeGPC Special +hi def link jalStringError Error +hi def link jalStruct jalStatement +hi def link jalSymbolOperator jalOperator +hi def link jalTodo Todo +hi def link jalType Type +hi def link jalUnclassified Statement +hi def link jalAsm Assembler +hi def link jalError Error +hi def link jalAsmKey Statement +hi def link jalPIC Statement + +hi def link jalShowTab Error + +hi def link picTodo Todo +hi def link picComment Comment +hi def link picDirective Statement +hi def link picLabel Label +hi def link picString String + +hi def link picOpcode Keyword +hi def link picRegister Structure +hi def link picRegisterPart Special +hi def link picPinDir SPecial +hi def link picPortDir SPecial + +hi def link picASCII String +hi def link picBinary Number +hi def link picDecimal Number +hi def link picHexadecimal Number +hi def link picOctal Number + +hi def link picIdentifier Identifier - HiLink jalAcces jalStatement - HiLink jalBoolean Boolean - HiLink jalBit Boolean - HiLink jalComment Comment - HiLink jalConditional Conditional - HiLink jalConstant Constant - HiLink jalDelimiter Identifier - HiLink jalDirective PreProc - HiLink jalException Exception - HiLink jalFloat Float - HiLink jalFunction Function - HiLink jalPsudoVarsKey Function - HiLink jalLabel Label - HiLink jalMatrixDelimiter Identifier - HiLink jalModifier Type - HiLink jalNumber Number - HiLink jalBinNumber Number - HiLink jalHexNumber Number - HiLink jalOperator Operator - HiLink jalPredefined Constant - HiLink jalPreProc PreProc - HiLink jalRepeat Repeat - HiLink jalStatement Statement - HiLink jalString String - HiLink jalStringEscape Special - HiLink jalStringEscapeGPC Special - HiLink jalStringError Error - HiLink jalStruct jalStatement - HiLink jalSymbolOperator jalOperator - HiLink jalTodo Todo - HiLink jalType Type - HiLink jalUnclassified Statement - HiLink jalAsm Assembler - HiLink jalError Error - HiLink jalAsmKey Statement - HiLink jalPIC Statement - - HiLink jalShowTab Error - - HiLink picTodo Todo - HiLink picComment Comment - HiLink picDirective Statement - HiLink picLabel Label - HiLink picString String - - HiLink picOpcode Keyword - HiLink picRegister Structure - HiLink picRegisterPart Special - HiLink picPinDir SPecial - HiLink picPortDir SPecial - - HiLink picASCII String - HiLink picBinary Number - HiLink picDecimal Number - HiLink picHexadecimal Number - HiLink picOctal Number - - HiLink picIdentifier Identifier - - delcommand HiLink -endif let b:current_syntax = "jal" diff --git a/runtime/syntax/jam.vim b/runtime/syntax/jam.vim index cbd99bb9ce..fc7f49d1f0 100644 --- a/runtime/syntax/jam.vim +++ b/runtime/syntax/jam.vim @@ -3,22 +3,15 @@ " Maintainer: Ralf Lemke (ralflemk@t-online.de) " Last change: 2012 Jan 08 by Thilo Six -" 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:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- " A bunch of useful jam keywords syn keyword jamStatement break call dbms flush global include msg parms proc public receive return send unload vars @@ -167,88 +160,78 @@ syntax match jamCommentError "\*/" syntax match jamOperator3Error "*/" " 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_jam_syn_inits") - if version < 508 - let did_jam_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jamCommentL jamComment - HiLink jamCommentL2 jamComment - HiLink jamOperator3Error jamError - HiLink jamConditional Conditional - HiLink jamRepeat Repeat - HiLink jamCharacter Character - HiLink jamSpecialCharacter jamSpecial - HiLink jamNumber Number - HiLink jamParenError jamError - HiLink jamErrInParen jamError - HiLink jamErrInBracket jamError - HiLink jamCommentError jamError - HiLink jamSpaceError jamError - HiLink jamSpecialError jamError - HiLink jamOperator1 jamOperator - HiLink jamOperator2 jamOperator - HiLink jamOperator3 jamOperator - HiLink jamOperator4 jamOperator - HiLink jamOperator5 jamOperator - HiLink jamOperator6 jamOperator - HiLink jamOperator7 jamOperator - HiLink jamOperator8 jamOperator - HiLink jamOperator9 jamOperator - HiLink jamOperator10 jamOperator - HiLink jamOperator11 jamOperator - HiLink jamOperator12 jamOperator - HiLink jamOperator13 jamOperator - HiLink jamOperator14 jamOperator - HiLink jamError Error - HiLink jamStatement Statement - HiLink jamPreCondit PreCondit - HiLink jamCommentError jamError - HiLink jamCommentString jamString - HiLink jamComment2String jamString - HiLink jamCommentSkip jamComment - HiLink jamString String - HiLink jamComment Comment - HiLink jamSpecial SpecialChar - HiLink jamTodo Todo - HiLink jamCppSkip jamCppOut - HiLink jamCppOut2 jamCppOut - HiLink jamCppOut Comment - HiLink jamDBState1 Identifier - HiLink jamDBState2 Identifier - HiLink jamSQLState1 jamSQL - HiLink jamSQLState2 jamSQL - HiLink jamLibFunc1 jamLibFunc - HiLink jamLibFunc2 jamLibFunc - HiLink jamLibFunc3 jamLibFunc - HiLink jamLibFunc4 jamLibFunc - HiLink jamLibFunc5 jamLibFunc - HiLink jamLibFunc6 jamLibFunc - HiLink jamLibFunc7 jamLibFunc - HiLink jamLibFunc8 jamLibFunc - HiLink jamLibFunc9 jamLibFunc - HiLink jamVariable1 jamVariablen - HiLink jamVariable2 jamVariablen - HiLink jamVariable3 jamVariablen - HiLink jamVariable4 jamVariablen - HiLink jamVariable5 jamVariablen - HiLink jamVariable6 jamVariablen - HiLink jamVariable7 jamVariablen - HiLink jamVariable8 jamVariablen - HiLink jamVariable9 jamVariablen - HiLink jamVariable10 jamVariablen - HiLink jamVariablen Constant - HiLink jamSQL Type - HiLink jamLibFunc PreProc - HiLink jamOperator Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link jamCommentL jamComment +hi def link jamCommentL2 jamComment +hi def link jamOperator3Error jamError +hi def link jamConditional Conditional +hi def link jamRepeat Repeat +hi def link jamCharacter Character +hi def link jamSpecialCharacter jamSpecial +hi def link jamNumber Number +hi def link jamParenError jamError +hi def link jamErrInParen jamError +hi def link jamErrInBracket jamError +hi def link jamCommentError jamError +hi def link jamSpaceError jamError +hi def link jamSpecialError jamError +hi def link jamOperator1 jamOperator +hi def link jamOperator2 jamOperator +hi def link jamOperator3 jamOperator +hi def link jamOperator4 jamOperator +hi def link jamOperator5 jamOperator +hi def link jamOperator6 jamOperator +hi def link jamOperator7 jamOperator +hi def link jamOperator8 jamOperator +hi def link jamOperator9 jamOperator +hi def link jamOperator10 jamOperator +hi def link jamOperator11 jamOperator +hi def link jamOperator12 jamOperator +hi def link jamOperator13 jamOperator +hi def link jamOperator14 jamOperator +hi def link jamError Error +hi def link jamStatement Statement +hi def link jamPreCondit PreCondit +hi def link jamCommentError jamError +hi def link jamCommentString jamString +hi def link jamComment2String jamString +hi def link jamCommentSkip jamComment +hi def link jamString String +hi def link jamComment Comment +hi def link jamSpecial SpecialChar +hi def link jamTodo Todo +hi def link jamCppSkip jamCppOut +hi def link jamCppOut2 jamCppOut +hi def link jamCppOut Comment +hi def link jamDBState1 Identifier +hi def link jamDBState2 Identifier +hi def link jamSQLState1 jamSQL +hi def link jamSQLState2 jamSQL +hi def link jamLibFunc1 jamLibFunc +hi def link jamLibFunc2 jamLibFunc +hi def link jamLibFunc3 jamLibFunc +hi def link jamLibFunc4 jamLibFunc +hi def link jamLibFunc5 jamLibFunc +hi def link jamLibFunc6 jamLibFunc +hi def link jamLibFunc7 jamLibFunc +hi def link jamLibFunc8 jamLibFunc +hi def link jamLibFunc9 jamLibFunc +hi def link jamVariable1 jamVariablen +hi def link jamVariable2 jamVariablen +hi def link jamVariable3 jamVariablen +hi def link jamVariable4 jamVariablen +hi def link jamVariable5 jamVariablen +hi def link jamVariable6 jamVariablen +hi def link jamVariable7 jamVariablen +hi def link jamVariable8 jamVariablen +hi def link jamVariable9 jamVariablen +hi def link jamVariable10 jamVariablen +hi def link jamVariablen Constant +hi def link jamSQL Type +hi def link jamLibFunc PreProc +hi def link jamOperator Special + let b:current_syntax = "jam" diff --git a/runtime/syntax/jargon.vim b/runtime/syntax/jargon.vim index 25a88bc981..415f2bc972 100644 --- a/runtime/syntax/jargon.vim +++ b/runtime/syntax/jargon.vim @@ -3,11 +3,8 @@ " Maintainer: <rms@poczta.onet.pl> " Last Change: 2001 May 26 " -" 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 @@ -17,20 +14,10 @@ syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+ syn match jargonMark /{[^}]*}/ " 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_jargon_syntax_inits") - if version < 508 - let did_jargon_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink jargonChaptTitle Title - HiLink jargonEmailAddr Comment - HiLink jargonUrl Comment - HiLink jargonMark Label - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link jargonChaptTitle Title +hi def link jargonEmailAddr Comment +hi def link jargonUrl Comment +hi def link jargonMark Label let b:current_syntax = "jargon" diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index e113a904c3..89320597f1 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -6,11 +6,9 @@ " Please check :help java.vim for comments on some of the options available. -" Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") + if exists("b:current_syntax") finish endif " we define it here so that included files can test for it @@ -21,13 +19,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" don't use standard HiLink, it will not work with included syntax files -if version < 508 - command! -nargs=+ JavaHiLink hi link <args> -else - command! -nargs=+ JavaHiLink hi def link <args> -endif - " some characters that cannot be in a java program (outside a string) syn match javaError "[\\@`]" syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/" @@ -36,7 +27,7 @@ syn match javaOK "\.\.\." " use separate name so that it can be deleted in javacc.vim syn match javaError2 "#\|=<" -JavaHiLink javaError2 javaError +hi def link javaError2 javaError @@ -79,32 +70,32 @@ if exists("java_highlight_all") || exists("java_highlight_java") || exists("ja syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException syn cluster javaTop add=javaR_JavaLang syn cluster javaClasses add=javaR_JavaLang - JavaHiLink javaR_JavaLang javaR_Java + hi def link javaR_JavaLang javaR_Java syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary syn cluster javaTop add=javaC_JavaLang syn cluster javaClasses add=javaC_JavaLang - JavaHiLink javaC_JavaLang javaC_Java + hi def link javaC_JavaLang javaC_Java syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError syn cluster javaTop add=javaE_JavaLang syn cluster javaClasses add=javaE_JavaLang - JavaHiLink javaE_JavaLang javaE_Java + hi def link javaE_JavaLang javaE_Java syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException syn cluster javaTop add=javaX_JavaLang syn cluster javaClasses add=javaX_JavaLang - JavaHiLink javaX_JavaLang javaX_Java + hi def link javaX_JavaLang javaX_Java - JavaHiLink javaR_Java javaR_ - JavaHiLink javaC_Java javaC_ - JavaHiLink javaE_Java javaE_ - JavaHiLink javaX_Java javaX_ - JavaHiLink javaX_ javaExceptions - JavaHiLink javaR_ javaExceptions - JavaHiLink javaE_ javaExceptions - JavaHiLink javaC_ javaConstant + hi def link javaR_Java javaR_ + hi def link javaC_Java javaC_ + hi def link javaE_Java javaE_ + hi def link javaX_Java javaX_ + hi def link javaX_ javaExceptions + hi def link javaR_ javaExceptions + hi def link javaE_ javaExceptions + hi def link javaC_ javaConstant syn keyword javaLangObject clone equals finalize getClass hashCode syn keyword javaLangObject notify notifyAll toString wait - JavaHiLink javaLangObject javaConstant + hi def link javaLangObject javaConstant syn cluster javaTop add=javaLangObject endif @@ -147,9 +138,9 @@ syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,ja syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 syn match javaCommentStar contained "^\s*\*$" syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell -JavaHiLink javaCommentString javaString -JavaHiLink javaComment2String javaString -JavaHiLink javaCommentCharacter javaCharacter +hi def link javaCommentString javaString +hi def link javaComment2String javaString +hi def link javaCommentCharacter javaCharacter syn cluster javaTop add=javaComment,javaLineComment @@ -242,28 +233,26 @@ if exists("java_highlight_debug") syn cluster javaTop add=javaDebug - if version >= 508 || !exists("did_c_syn_inits") - JavaHiLink javaDebug Debug - JavaHiLink javaDebugString DebugString - JavaHiLink javaDebugStringError javaError - JavaHiLink javaDebugType DebugType - JavaHiLink javaDebugBoolean DebugBoolean - JavaHiLink javaDebugNumber Debug - JavaHiLink javaDebugSpecial DebugSpecial - JavaHiLink javaDebugSpecialCharacter DebugSpecial - JavaHiLink javaDebugCharacter DebugString - JavaHiLink javaDebugParen Debug - - JavaHiLink DebugString String - JavaHiLink DebugSpecial Special - JavaHiLink DebugBoolean Boolean - JavaHiLink DebugType Type - endif + hi def link javaDebug Debug + hi def link javaDebugString DebugString + hi def link javaDebugStringError javaError + hi def link javaDebugType DebugType + hi def link javaDebugBoolean DebugBoolean + hi def link javaDebugNumber Debug + hi def link javaDebugSpecial DebugSpecial + hi def link javaDebugSpecialCharacter DebugSpecial + hi def link javaDebugCharacter DebugString + hi def link javaDebugParen Debug + + hi def link DebugString String + hi def link DebugSpecial Special + hi def link DebugBoolean Boolean + hi def link DebugType Type endif if exists("java_mark_braces_in_parens_as_errors") syn match javaInParen contained "[{}]" - JavaHiLink javaInParen javaError + hi def link javaInParen javaError syn cluster javaTop add=javaInParen endif @@ -278,7 +267,7 @@ syn region javaParenT1 transparent matchgroup=javaParen1 start="\[" end="\]" co syn region javaParenT2 transparent matchgroup=javaParen2 start="\[" end="\]" contains=@javaTop,javaParenT contained syn match javaParenError "\]" -JavaHiLink javaParenError javaError +hi def link javaParenError javaError if exists("java_highlight_functions") syn match javaLambdaDef "([a-zA-Z0-9_<>\[\], \t]*)\s*->" @@ -291,61 +280,54 @@ endif exec "syn sync ccomment javaComment minlines=" . java_minlines " The default highlighting. -if version >= 508 || !exists("did_java_syn_inits") - if version < 508 - let did_java_syn_inits = 1 - endif - JavaHiLink javaLambdaDef Function - JavaHiLink javaFuncDef Function - JavaHiLink javaVarArg Function - JavaHiLink javaBraces Function - JavaHiLink javaBranch Conditional - JavaHiLink javaUserLabelRef javaUserLabel - JavaHiLink javaLabel Label - JavaHiLink javaUserLabel Label - JavaHiLink javaConditional Conditional - JavaHiLink javaRepeat Repeat - JavaHiLink javaExceptions Exception - JavaHiLink javaAssert Statement - JavaHiLink javaStorageClass StorageClass - JavaHiLink javaMethodDecl javaStorageClass - JavaHiLink javaClassDecl javaStorageClass - JavaHiLink javaScopeDecl javaStorageClass - JavaHiLink javaBoolean Boolean - JavaHiLink javaSpecial Special - JavaHiLink javaSpecialError Error - JavaHiLink javaSpecialCharError Error - JavaHiLink javaString String - JavaHiLink javaCharacter Character - JavaHiLink javaSpecialChar SpecialChar - JavaHiLink javaNumber Number - JavaHiLink javaError Error - JavaHiLink javaStringError Error - JavaHiLink javaStatement Statement - JavaHiLink javaOperator Operator - JavaHiLink javaComment Comment - JavaHiLink javaDocComment Comment - JavaHiLink javaLineComment Comment - JavaHiLink javaConstant Constant - JavaHiLink javaTypedef Typedef - JavaHiLink javaTodo Todo - JavaHiLink javaAnnotation PreProc - - JavaHiLink javaCommentTitle SpecialComment - JavaHiLink javaDocTags Special - JavaHiLink javaDocParam Function - JavaHiLink javaDocSeeTagParam Function - JavaHiLink javaCommentStar javaComment - - JavaHiLink javaType Type - JavaHiLink javaExternal Include - - JavaHiLink htmlComment Special - JavaHiLink htmlCommentPart Special - JavaHiLink javaSpaceError Error -endif - -delcommand JavaHiLink +hi def link javaLambdaDef Function +hi def link javaFuncDef Function +hi def link javaVarArg Function +hi def link javaBraces Function +hi def link javaBranch Conditional +hi def link javaUserLabelRef javaUserLabel +hi def link javaLabel Label +hi def link javaUserLabel Label +hi def link javaConditional Conditional +hi def link javaRepeat Repeat +hi def link javaExceptions Exception +hi def link javaAssert Statement +hi def link javaStorageClass StorageClass +hi def link javaMethodDecl javaStorageClass +hi def link javaClassDecl javaStorageClass +hi def link javaScopeDecl javaStorageClass +hi def link javaBoolean Boolean +hi def link javaSpecial Special +hi def link javaSpecialError Error +hi def link javaSpecialCharError Error +hi def link javaString String +hi def link javaCharacter Character +hi def link javaSpecialChar SpecialChar +hi def link javaNumber Number +hi def link javaError Error +hi def link javaStringError Error +hi def link javaStatement Statement +hi def link javaOperator Operator +hi def link javaComment Comment +hi def link javaDocComment Comment +hi def link javaLineComment Comment +hi def link javaConstant Constant +hi def link javaTypedef Typedef +hi def link javaTodo Todo +hi def link javaAnnotation PreProc + +hi def link javaCommentTitle SpecialComment +hi def link javaDocTags Special +hi def link javaDocParam Function +hi def link javaDocSeeTagParam Function +hi def link javaCommentStar javaComment + +hi def link javaType Type +hi def link javaExternal Include + +hi def link htmlComment Special +hi def link htmlCommentPart Special +hi def link javaSpaceError Error let b:current_syntax = "java" diff --git a/runtime/syntax/javacc.vim b/runtime/syntax/javacc.vim index 5458de754e..a80572d510 100644 --- a/runtime/syntax/javacc.vim +++ b/runtime/syntax/javacc.vim @@ -7,11 +7,8 @@ " Uses java.vim, and adds a few special things for JavaCC Parser files. " Those files usually have the extension *.jj -" 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 @@ -19,11 +16,7 @@ let s:cpo_save = &cpo set cpo&vim " source the java.vim file -if version < 600 - source <sfile>:p:h/java.vim -else - runtime! syntax/java.vim -endif +runtime! syntax/java.vim unlet b:current_syntax "remove catching errors caused by wrong parenthesis (does not work in javacc @@ -58,22 +51,12 @@ syn keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN syn keyword javaccError DEBUG IGNORE_IN_BNF " 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_css_syn_inits") - if version < 508 - let did_css_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink javaccSpecToken Statement - HiLink javaccActionToken Type - HiLink javaccPackages javaScopeDecl - HiLink javaccToken String - HiLink javaccError Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link javaccSpecToken Statement +hi def link javaccActionToken Type +hi def link javaccPackages javaScopeDecl +hi def link javaccToken String +hi def link javaccError Error let b:current_syntax = "javacc" let &cpo = s:cpo_save diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index 1b20f987d9..9589b1938f 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -10,15 +10,12 @@ " Last Change: 2012 Oct 05 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded " tuning parameters: " unlet javaScript_fold 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 = 'javascript' @@ -29,11 +26,6 @@ endif let s:cpo_save = &cpo set cpo&vim -" Drop fold if it set but vim doesn't support it. -if version < 600 && exists("javaScript_fold") - unlet javaScript_fold -endif - syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo @@ -87,51 +79,41 @@ if main_syntax == "javascript" endif " 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_javascript_syn_inits") - if version < 508 - let did_javascript_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink javaScriptComment Comment - HiLink javaScriptLineComment Comment - HiLink javaScriptCommentTodo Todo - HiLink javaScriptSpecial Special - HiLink javaScriptStringS String - HiLink javaScriptStringD String - HiLink javaScriptCharacter Character - HiLink javaScriptSpecialCharacter javaScriptSpecial - HiLink javaScriptNumber javaScriptValue - HiLink javaScriptConditional Conditional - HiLink javaScriptRepeat Repeat - HiLink javaScriptBranch Conditional - HiLink javaScriptOperator Operator - HiLink javaScriptType Type - HiLink javaScriptStatement Statement - HiLink javaScriptFunction Function - HiLink javaScriptBraces Function - HiLink javaScriptError Error - HiLink javaScrParenError javaScriptError - HiLink javaScriptNull Keyword - HiLink javaScriptBoolean Boolean - HiLink javaScriptRegexpString String - - HiLink javaScriptIdentifier Identifier - HiLink javaScriptLabel Label - HiLink javaScriptException Exception - HiLink javaScriptMessage Keyword - HiLink javaScriptGlobal Keyword - HiLink javaScriptMember Keyword - HiLink javaScriptDeprecated Exception - HiLink javaScriptReserved Keyword - HiLink javaScriptDebug Debug - HiLink javaScriptConstant Label - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link javaScriptComment Comment +hi def link javaScriptLineComment Comment +hi def link javaScriptCommentTodo Todo +hi def link javaScriptSpecial Special +hi def link javaScriptStringS String +hi def link javaScriptStringD String +hi def link javaScriptCharacter Character +hi def link javaScriptSpecialCharacter javaScriptSpecial +hi def link javaScriptNumber javaScriptValue +hi def link javaScriptConditional Conditional +hi def link javaScriptRepeat Repeat +hi def link javaScriptBranch Conditional +hi def link javaScriptOperator Operator +hi def link javaScriptType Type +hi def link javaScriptStatement Statement +hi def link javaScriptFunction Function +hi def link javaScriptBraces Function +hi def link javaScriptError Error +hi def link javaScrParenError javaScriptError +hi def link javaScriptNull Keyword +hi def link javaScriptBoolean Boolean +hi def link javaScriptRegexpString String + +hi def link javaScriptIdentifier Identifier +hi def link javaScriptLabel Label +hi def link javaScriptException Exception +hi def link javaScriptMessage Keyword +hi def link javaScriptGlobal Keyword +hi def link javaScriptMember Keyword +hi def link javaScriptDeprecated Exception +hi def link javaScriptReserved Keyword +hi def link javaScriptDebug Debug +hi def link javaScriptConstant Label + let b:current_syntax = "javascript" if main_syntax == 'javascript' diff --git a/runtime/syntax/jess.vim b/runtime/syntax/jess.vim index 243bab351e..67d3715a30 100644 --- a/runtime/syntax/jess.vim +++ b/runtime/syntax/jess.vim @@ -4,19 +4,12 @@ " Last change: September 14, 2000 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr. -" 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 -if version < 600 - set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ -else - setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ -endif +setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ " Lists syn match jessSymbol ![^()'`,"; \t]\+! contained @@ -125,36 +118,26 @@ syn match jessComment ";.*$" syn sync lines=100 " 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_jess_syntax_inits") - if version < 508 - let did_jess_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jessAtomNmbr jessNumber - HiLink jessAtomMark jessMark - - HiLink jessAtom Identifier - HiLink jessAtomBarSymbol Special - HiLink jessBarSymbol Special - HiLink jessComment Comment - HiLink jessConcat Statement - HiLink jessDeclaration Statement - HiLink jessFunc Statement - HiLink jessKey Type - HiLink jessMark Delimiter - HiLink jessNumber Number - HiLink jessParenError Error - HiLink jessSpecial Type - HiLink jessString String - HiLink jessVar Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link jessAtomNmbr jessNumber +hi def link jessAtomMark jessMark + +hi def link jessAtom Identifier +hi def link jessAtomBarSymbol Special +hi def link jessBarSymbol Special +hi def link jessComment Comment +hi def link jessConcat Statement +hi def link jessDeclaration Statement +hi def link jessFunc Statement +hi def link jessKey Type +hi def link jessMark Delimiter +hi def link jessNumber Number +hi def link jessParenError Error +hi def link jessSpecial Type +hi def link jessString String +hi def link jessVar Identifier + let b:current_syntax = "jess" diff --git a/runtime/syntax/jgraph.vim b/runtime/syntax/jgraph.vim index 7ecd5afaec..a29a21a73b 100644 --- a/runtime/syntax/jgraph.vim +++ b/runtime/syntax/jgraph.vim @@ -5,11 +5,8 @@ " this syntax file is not yet complete -" 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 @@ -36,23 +33,13 @@ syn match jgraphNumber "\-\=\.\d\+\>" " 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_jgraph_syn_inits") - if version < 508 - let did_jgraph_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jgraphComment Comment - HiLink jgraphCmd Identifier - HiLink jgraphType Type - HiLink jgraphNumber Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link jgraphComment Comment +hi def link jgraphCmd Identifier +hi def link jgraphType Type +hi def link jgraphNumber Number + let b:current_syntax = "jgraph" diff --git a/runtime/syntax/jproperties.vim b/runtime/syntax/jproperties.vim index 9343bd292b..628c03097f 100644 --- a/runtime/syntax/jproperties.vim +++ b/runtime/syntax/jproperties.vim @@ -43,11 +43,8 @@ endif " ============================================================================= -" 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 @@ -120,28 +117,18 @@ syn match jpropertiesComment "^\s*[#!].*$" contains=jpropertiesTODO syn keyword jpropertiesTodo TODO FIXME XXX contained " 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_jproperties_syntax_inits") - if version < 508 - let did_jproperties_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink jpropertiesComment Comment - HiLink jpropertiesTodo Todo - HiLink jpropertiesIdentifier Identifier - HiLink jpropertiesString String - HiLink jpropertiesExtendString String - HiLink jpropertiesCharacter Character - HiLink jpropertiesSpecial Special - HiLink jpropertiesSpecialChar SpecialChar - HiLink jpropertiesError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link jpropertiesComment Comment +hi def link jpropertiesTodo Todo +hi def link jpropertiesIdentifier Identifier +hi def link jpropertiesString String +hi def link jpropertiesExtendString String +hi def link jpropertiesCharacter Character +hi def link jpropertiesSpecial Special +hi def link jpropertiesSpecialChar SpecialChar +hi def link jpropertiesError Error + let b:current_syntax = "jproperties" diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim index 1fdfea2d09..d80af84312 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,29 @@ 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 <args> - else - command -nargs=+ HiLink hi def link <args> - 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 +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) +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 +hi def link jsonQuote Quote +hi def link jsonNoise Noise let b:current_syntax = "json" if main_syntax == 'json' diff --git a/runtime/syntax/jsp.vim b/runtime/syntax/jsp.vim index 9766657596..1c3cc35a31 100644 --- a/runtime/syntax/jsp.vim +++ b/runtime/syntax/jsp.vim @@ -6,11 +6,8 @@ " Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) " Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) -" 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 @@ -19,11 +16,7 @@ if !exists("main_syntax") endif " Source HTML syntax -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax " Next syntax items are case-sensitive @@ -52,29 +45,19 @@ syn clear htmlTag syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr,javaScript " 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_jsp_syn_inits") - if version < 508 - let did_jsp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " java.vim has redefined htmlComment highlighting - HiLink htmlComment Comment - HiLink htmlCommentPart Comment - " Be consistent with html highlight settings - HiLink jspComment htmlComment - HiLink jspTag htmlTag - HiLink jspDirective jspTag - HiLink jspDirName htmlTagName - HiLink jspDirArg htmlArg - HiLink jspCommand jspTag - HiLink jspCommandName htmlTagName - HiLink jspCommandArg htmlArg - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +" java.vim has redefined htmlComment highlighting +hi def link htmlComment Comment +hi def link htmlCommentPart Comment +" Be consistent with html highlight settings +hi def link jspComment htmlComment +hi def link jspTag htmlTag +hi def link jspDirective jspTag +hi def link jspDirName htmlTagName +hi def link jspDirArg htmlArg +hi def link jspCommand jspTag +hi def link jspCommandName htmlTagName +hi def link jspCommandArg htmlArg if main_syntax == 'jsp' unlet main_syntax diff --git a/runtime/syntax/kix.vim b/runtime/syntax/kix.vim index 800e286042..8efe02baee 100644 --- a/runtime/syntax/kix.vim +++ b/runtime/syntax/kix.vim @@ -19,10 +19,8 @@ " Work out how to error too many "(", i.e. (() should be an error. " Similarly, "if" without "endif" and similar constructs should error. -" Clear legacy syntax rules for version 5.x, exit if already processed for version 6+ -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -130,52 +128,42 @@ syn match kixExpression "<\|>\|<=\|>=\|<>" " Default highlighting. -" Version < 5.8 set default highlight if file not already processed. -" Version >= 5.8 set default highlight only if it doesn't already have a value. -if version > 508 || !exists("did_kix_syn_inits") - if version < 508 - let did_kix_syn_inits=1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink kixDoubleString String - HiLink kixSingleString String - HiLink kixStatement Statement - HiLink kixRepeat Repeat - HiLink kixComment Comment - HiLink kixBuiltin Function - HiLink kixLocalVar Special - HiLink kixMacro Special - HiLink kixEnvVar Special - HiLink kixLabel Type - HiLink kixFunction Function - HiLink kixInteger Number - HiLink kixHex Number - HiLink kixFloat Number - HiLink kixOperator Operator - HiLink kixExpression Operator - - HiLink kixParenCloseError Error - HiLink kixBrackCloseError Error - HiLink kixStringError Error - - HiLink kixWhileError Error - HiLink kixWhileOK Conditional - HiLink kixDoError Error - HiLink kixDoOK Conditional - HiLink kixIfError Error - HiLink kixIfOK Conditional - HiLink kixSelectError Error - HiLink kixSelectOK Conditional - HiLink kixForNextError Error - HiLink kixForNextOK Conditional - HiLink kixForEachError Error - HiLink kixForEachOK Conditional - - delcommand HiLink -endif +" Set default highlight only if it doesn't already have a value. + +hi def link kixDoubleString String +hi def link kixSingleString String +hi def link kixStatement Statement +hi def link kixRepeat Repeat +hi def link kixComment Comment +hi def link kixBuiltin Function +hi def link kixLocalVar Special +hi def link kixMacro Special +hi def link kixEnvVar Special +hi def link kixLabel Type +hi def link kixFunction Function +hi def link kixInteger Number +hi def link kixHex Number +hi def link kixFloat Number +hi def link kixOperator Operator +hi def link kixExpression Operator + +hi def link kixParenCloseError Error +hi def link kixBrackCloseError Error +hi def link kixStringError Error + +hi def link kixWhileError Error +hi def link kixWhileOK Conditional +hi def link kixDoError Error +hi def link kixDoOK Conditional +hi def link kixIfError Error +hi def link kixIfOK Conditional +hi def link kixSelectError Error +hi def link kixSelectOK Conditional +hi def link kixForNextError Error +hi def link kixForNextOK Conditional +hi def link kixForEachError Error +hi def link kixForEachOK Conditional + let b:current_syntax = "kix" diff --git a/runtime/syntax/kscript.vim b/runtime/syntax/kscript.vim index cefbe39a29..e6776208d4 100644 --- a/runtime/syntax/kscript.vim +++ b/runtime/syntax/kscript.vim @@ -4,11 +4,8 @@ " URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim " CVS: $Id: kscript.vim,v 1.1 2004/06/13 17:40:02 vimboss Exp $ -" 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 @@ -37,33 +34,23 @@ syn region kscriptString start=+"""+ end=+"""+ syn region kscriptString start=+'''+ end=+'''+ " 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_kscript_syntax_inits") - if version < 508 - let did_kscript_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link kscriptConditional Conditional +hi def link kscriptRepeat Repeat +hi def link kscriptExceptions Statement +hi def link kscriptFunction Function +hi def link kscriptConst Constant +hi def link kscriptStatement Statement +hi def link kscriptLabel Label +hi def link kscriptStorageClass StorageClass +hi def link kscriptType Type +hi def link kscriptTodo Todo +hi def link kscriptComment Comment +hi def link kscriptString String +hi def link kscriptPreCondit PreCondit +hi def link kscriptHardCoded Statement - HiLink kscriptConditional Conditional - HiLink kscriptRepeat Repeat - HiLink kscriptExceptions Statement - HiLink kscriptFunction Function - HiLink kscriptConst Constant - HiLink kscriptStatement Statement - HiLink kscriptLabel Label - HiLink kscriptStorageClass StorageClass - HiLink kscriptType Type - HiLink kscriptTodo Todo - HiLink kscriptComment Comment - HiLink kscriptString String - HiLink kscriptPreCondit PreCondit - HiLink kscriptHardCoded Statement - - delcommand HiLink -endif let b:current_syntax = "kscript" diff --git a/runtime/syntax/kwt.vim b/runtime/syntax/kwt.vim index 4c2c9d9dc0..ecda5bb985 100644 --- a/runtime/syntax/kwt.vim +++ b/runtime/syntax/kwt.vim @@ -3,21 +3,14 @@ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 2 May 2001 -" 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 " Read the C++ syntax to start with -if version < 600 - source <sfile>:p:h/cpp.vim -else - runtime! syntax/cpp.vim - unlet b:current_syntax -endif +runtime! syntax/cpp.vim +unlet b:current_syntax " kimwitu++ extentions @@ -58,27 +51,17 @@ syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\ syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$" " 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_kwt_syn_inits") - if version < 508 - let did_kwt_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink kwtStatement cppStatement - HiLink kwtDecl cppStatement - HiLink kwtCast cppStatement - HiLink kwtSep Delimiter - HiLink kwtViews Label - HiLink kwtPhylum Type - HiLink kwtOption PreProc - "HiLink cText Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link kwtStatement cppStatement +hi def link kwtDecl cppStatement +hi def link kwtCast cppStatement +hi def link kwtSep Delimiter +hi def link kwtViews Label +hi def link kwtPhylum Type +hi def link kwtOption PreProc +"hi def link cText Comment + syn sync lines=300 diff --git a/runtime/syntax/lace.vim b/runtime/syntax/lace.vim index 9e64eea7d1..9a83851f2b 100644 --- a/runtime/syntax/lace.vim +++ b/runtime/syntax/lace.vim @@ -9,11 +9,8 @@ " it to the maintainer at <utilities@eiffel.com> -" 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 @@ -85,50 +82,40 @@ syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenErr syn sync lines=40 " 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_lace_syntax_inits") - if version < 508 - let did_lace_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink laceTopStruct PreProc - - HiLink laceOptionClause Statement - HiLink laceOptionMark Constant - HiLink laceClusterProp Label - HiLink laceAdaptClassName Label - HiLink laceExternal Statement - HiLink laceCluster ModeMsg - - HiLink laceEscape Special - - HiLink laceBool Boolean - HiLink laceString String - HiLink laceCharacter Character - HiLink laceClassName Type - HiLink laceNumber Number - - HiLink laceOperator Special - HiLink laceArray Special - HiLink laceExport Special - HiLink laceCreation Special - HiLink laceBrackets Special - HiLink laceConstraint Special - - HiLink laceComment Comment - - HiLink laceError Error - HiLink laceStringError Error - HiLink laceParenError Error - HiLink laceBracketError Error - HiLink laceTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link laceTopStruct PreProc + +hi def link laceOptionClause Statement +hi def link laceOptionMark Constant +hi def link laceClusterProp Label +hi def link laceAdaptClassName Label +hi def link laceExternal Statement +hi def link laceCluster ModeMsg + +hi def link laceEscape Special + +hi def link laceBool Boolean +hi def link laceString String +hi def link laceCharacter Character +hi def link laceClassName Type +hi def link laceNumber Number + +hi def link laceOperator Special +hi def link laceArray Special +hi def link laceExport Special +hi def link laceCreation Special +hi def link laceBrackets Special +hi def link laceConstraint Special + +hi def link laceComment Comment + +hi def link laceError Error +hi def link laceStringError Error +hi def link laceParenError Error +hi def link laceBracketError Error +hi def link laceTodo Todo + let b:current_syntax = "lace" diff --git a/runtime/syntax/latte.vim b/runtime/syntax/latte.vim index e2a8729f3f..e30ae42e38 100644 --- a/runtime/syntax/latte.vim +++ b/runtime/syntax/latte.vim @@ -7,11 +7,8 @@ " I based this on the TeX and Scheme syntax files (but mostly scheme). " See http://www.latte.org for info on the language. -" 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 @@ -20,11 +17,7 @@ syn match latteOther "\\{" syn match latteOther "\\}" syn match latteOther "\\\\" -if version < 600 - set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -else - setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ -endif +setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther @@ -70,29 +63,19 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " 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_latte_syntax_inits") - if version < 508 - let did_latte_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink latteSyntax Statement - HiLink latteVar Function +hi def link latteSyntax Statement +hi def link latteVar Function - HiLink latteString String - HiLink latteQuote String +hi def link latteString String +hi def link latteQuote String - HiLink latteDelimiter Delimiter - HiLink latteOperator Operator +hi def link latteDelimiter Delimiter +hi def link latteOperator Operator - HiLink latteComment Comment - HiLink latteError Error +hi def link latteComment Comment +hi def link latteError Error - delcommand HiLink -endif let b:current_syntax = "latte" diff --git a/runtime/syntax/ldif.vim b/runtime/syntax/ldif.vim index 9f67b57f51..576e4c023d 100644 --- a/runtime/syntax/ldif.vim +++ b/runtime/syntax/ldif.vim @@ -3,9 +3,8 @@ " Maintainer: Zak Johnson <zakj@nox.cx> " Last Change: 2003-12-30 -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 @@ -21,23 +20,14 @@ syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip syn region ldifComment start=/^#/ end=/\_$/ skip=/\n / -if version >= 508 || !exists("did_ldif_syn_inits") - if version < 508 - let did_ldif_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ldifAttribute Type - HiLink ldifOption Identifier - HiLink ldifPunctuation Normal - HiLink ldifStringValue String - HiLink ldifBase64Value Special - HiLink ldifFileValue Special - HiLink ldifComment Comment - - delcommand HiLink -endif + +hi def link ldifAttribute Type +hi def link ldifOption Identifier +hi def link ldifPunctuation Normal +hi def link ldifStringValue String +hi def link ldifBase64Value Special +hi def link ldifFileValue Special +hi def link ldifComment Comment + let b:current_syntax = "ldif" diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim index b7aff34d6b..560aa44be3 100644 --- a/runtime/syntax/lex.vim +++ b/runtime/syntax/lex.vim @@ -1,18 +1,15 @@ " Vim syntax file " Language: Lex " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Nov 14, 2012 -" Version: 14 -" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" Last Change: Aug 31, 2016 +" Version: 16 +" URL: http://mysite.verizon.net/astronaut/vim/index.html#SYNTAX_LEX " " Option: " lex_uses_cpp : if this variable exists, then C++ is loaded rather than C -" 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 @@ -122,22 +119,24 @@ syn sync match lexSyncPat groupthere lexPatBlock "^<$" syn sync match lexSyncPat groupthere lexPatBlock "^%%$" " The default highlighting. -hi def link lexAbbrvComment lexPatComment -hi def link lexAbbrvRegExp Macro -hi def link lexAbbrv SpecialChar -hi def link lexBrace lexPat -hi def link lexCFunctions Function -hi def link lexCstruct cStructure -hi def link lexMorePat SpecialChar -hi def link lexOptions PreProc -hi def link lexPatComment Comment -hi def link lexPat Function -hi def link lexPatString Function -hi def link lexPatTag Special -hi def link lexPatTagZone lexPatTag -hi def link lexSep Delimiter -hi def link lexSlashQuote lexPat -hi def link lexStartState Statement +if !exists("skip_lex_syntax_inits") + hi def link lexAbbrvComment lexPatComment + hi def link lexAbbrvRegExp Macro + hi def link lexAbbrv SpecialChar + hi def link lexBrace lexPat + hi def link lexCFunctions Function + hi def link lexCstruct cStructure + hi def link lexMorePat SpecialChar + hi def link lexOptions PreProc + hi def link lexPatComment Comment + hi def link lexPat Function + hi def link lexPatString Function + hi def link lexPatTag Special + hi def link lexPatTagZone lexPatTag + hi def link lexSep Delimiter + hi def link lexSlashQuote lexPat + hi def link lexStartState Statement +endif let b:current_syntax = "lex" diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim index 077549a0c8..0a8a076ff4 100644 --- a/runtime/syntax/lhaskell.vim +++ b/runtime/syntax/lhaskell.vim @@ -36,11 +36,8 @@ " -" 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 @@ -84,15 +81,10 @@ endif " If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. if b:lhs_markup == "tex" - if version < 600 - source <sfile>:p:h/tex.vim - set isk+=_ - else - runtime! syntax/tex.vim - unlet b:current_syntax - " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. - setlocal isk+=_ - endif + runtime! syntax/tex.vim + unlet b:current_syntax + " Tex.vim removes "_" from 'iskeyword', but we need it for Haskell. + setlocal isk+=_ syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract else syntax cluster lhsTeXContainer contains=.* @@ -100,11 +92,7 @@ endif " Literate Haskell is Haskell in between text, so at least read Haskell " highlighting -if version < 600 - syntax include @haskellTop <sfile>:p:h/haskell.vim -else - syntax include @haskellTop syntax/haskell.vim -endif +syntax include @haskellTop syntax/haskell.vim syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer @@ -115,23 +103,13 @@ syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}" " 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_tex_syntax_inits") - if version < 508 - let did_tex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lhsBirdTrack Comment - - HiLink beginCodeBegin texCmdName - HiLink beginCodeCode texSection - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link lhsBirdTrack Comment + +hi def link beginCodeBegin texCmdName +hi def link beginCodeCode texSection + " Restore cursor to original position, as it may have been disturbed " by the searches in our guessing code diff --git a/runtime/syntax/lifelines.vim b/runtime/syntax/lifelines.vim index f8bea015bd..ff4692888e 100644 --- a/runtime/syntax/lifelines.vim +++ b/runtime/syntax/lifelines.vim @@ -11,9 +11,8 @@ " 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 @@ -110,9 +109,7 @@ syn match lifelinesNumber "-\=\<\d\+\.\d*\>" syn match lifelinesNumber "-\=\.\d\+\>" " folding using {} -if version >= 600 - syn region lifelinesFoldBlock start="{" end="}" transparent fold -endif +syn region lifelinesFoldBlock start="{" end="}" transparent fold "catch errors caused by wrong parenthesis "adapted from original c.vim written by Bram Moolenaar @@ -123,44 +120,34 @@ syn match lifelinesParenError ")" syn match lifelinesErrInParen contained "[{}]" " 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_lifelines_syn_inits") - if version < 508 - let did_lifelines_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lifelinesConditional Conditional - HiLink lifelinesArithm Operator - HiLink lifelinesLogical Conditional - HiLink lifelinesInclude Include - HiLink lifelinesComment Comment - HiLink lifelinesStatement Statement - HiLink lifelinesUser Statement - HiLink lifelinesFunct Statement - HiLink lifelinesTable Statement - HiLink lifelinesGedcom Statement - HiLink lifelinesList Statement - HiLink lifelinesRepeat Repeat - HiLink lifelinesFam Statement - HiLink lifelinesIndi Statement - HiLink lifelinesProc Statement - HiLink lifelinesDef Statement - HiLink lifelinesString String - HiLink lifelinesSpecial Special - HiLink lifelinesNumber Number - HiLink lifelinesParenError Error - HiLink lifelinesErrInParen Error - HiLink lifelinesError Error - HiLink lifelinesTodo Todo - HiLink lifelinesDecl PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + + +hi def link lifelinesConditional Conditional +hi def link lifelinesArithm Operator +hi def link lifelinesLogical Conditional +hi def link lifelinesInclude Include +hi def link lifelinesComment Comment +hi def link lifelinesStatement Statement +hi def link lifelinesUser Statement +hi def link lifelinesFunct Statement +hi def link lifelinesTable Statement +hi def link lifelinesGedcom Statement +hi def link lifelinesList Statement +hi def link lifelinesRepeat Repeat +hi def link lifelinesFam Statement +hi def link lifelinesIndi Statement +hi def link lifelinesProc Statement +hi def link lifelinesDef Statement +hi def link lifelinesString String +hi def link lifelinesSpecial Special +hi def link lifelinesNumber Number +hi def link lifelinesParenError Error +hi def link lifelinesErrInParen Error +hi def link lifelinesError Error +hi def link lifelinesTodo Todo +hi def link lifelinesDecl PreProc + let b:current_syntax = "lifelines" diff --git a/runtime/syntax/lilo.vim b/runtime/syntax/lilo.vim index 3e9459267b..a87dafb734 100644 --- a/runtime/syntax/lilo.vim +++ b/runtime/syntax/lilo.vim @@ -5,21 +5,12 @@ " Last Change: 2010-02-03 " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - command -nargs=1 SetIsk setlocal iskeyword=<args> -else - command -nargs=1 SetIsk set iskeyword=<args> -endif -SetIsk @,48-57,.,-,_ -delcommand SetIsk +setlocal iskeyword=@,48-57,.,-,_ syn case ignore @@ -128,65 +119,56 @@ syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPLis syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty " Define the default highlighting -if version >= 508 || !exists("did_lilo_syntax_inits") - if version < 508 - let did_lilo_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink liloEqPath liloEquals - HiLink liloEqWord liloEquals - HiLink liloEqVga liloEquals - HiLink liloEqDecNumber liloEquals - HiLink liloEqHexNumber liloEquals - HiLink liloEqNumber liloEquals - HiLink liloEqString liloEquals - HiLink liloEqAnything liloEquals - HiLink liloEquals Special - - HiLink liloError Error - - HiLink liloEqPathComment liloComment - HiLink liloEqVgaComment liloComment - HiLink liloEqDecNumberComment liloComment - HiLink liloEqHexNumberComment liloComment - HiLink liloEqStringComment liloComment - HiLink liloEqAnythingComment liloComment - HiLink liloPathComment liloComment - HiLink liloVgaComment liloComment - HiLink liloDecNumberComment liloComment - HiLink liloHexNumberComment liloComment - HiLink liloNumberComment liloComment - HiLink liloStringComment liloComment - HiLink liloAnythingComment liloComment - HiLink liloComment Comment - - HiLink liloDiskOpt liloOption - HiLink liloKernelOpt liloOption - HiLink liloImageOpt liloOption - HiLink liloOption Keyword - - HiLink liloDecNumber liloNumber - HiLink liloHexNumber liloNumber - HiLink liloDecNumberP liloNumber - HiLink liloNumber Number - HiLink liloString String - HiLink liloPath Constant - - HiLink liloSpecial Special - HiLink liloLabel Title - HiLink liloDecNumberList Special - HiLink liloDecNumberPList Special - HiLink liloAnything Normal - HiLink liloEnviron Identifier - HiLink liloVgaKeyword Identifier - HiLink liloImage Type - HiLink liloChRules Preproc - HiLink liloDisk Preproc - - delcommand HiLink -endif + +hi def link liloEqPath liloEquals +hi def link liloEqWord liloEquals +hi def link liloEqVga liloEquals +hi def link liloEqDecNumber liloEquals +hi def link liloEqHexNumber liloEquals +hi def link liloEqNumber liloEquals +hi def link liloEqString liloEquals +hi def link liloEqAnything liloEquals +hi def link liloEquals Special + +hi def link liloError Error + +hi def link liloEqPathComment liloComment +hi def link liloEqVgaComment liloComment +hi def link liloEqDecNumberComment liloComment +hi def link liloEqHexNumberComment liloComment +hi def link liloEqStringComment liloComment +hi def link liloEqAnythingComment liloComment +hi def link liloPathComment liloComment +hi def link liloVgaComment liloComment +hi def link liloDecNumberComment liloComment +hi def link liloHexNumberComment liloComment +hi def link liloNumberComment liloComment +hi def link liloStringComment liloComment +hi def link liloAnythingComment liloComment +hi def link liloComment Comment + +hi def link liloDiskOpt liloOption +hi def link liloKernelOpt liloOption +hi def link liloImageOpt liloOption +hi def link liloOption Keyword + +hi def link liloDecNumber liloNumber +hi def link liloHexNumber liloNumber +hi def link liloDecNumberP liloNumber +hi def link liloNumber Number +hi def link liloString String +hi def link liloPath Constant + +hi def link liloSpecial Special +hi def link liloLabel Title +hi def link liloDecNumberList Special +hi def link liloDecNumberPList Special +hi def link liloAnything Normal +hi def link liloEnviron Identifier +hi def link liloVgaKeyword Identifier +hi def link liloImage Type +hi def link liloChRules Preproc +hi def link liloDisk Preproc + let b:current_syntax = "lilo" diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim index a402452389..b02eb09d0a 100644 --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -2,7 +2,7 @@ " Language: Lisp " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Last Change: May 02, 2016 -" Version: 25 +" Version: 26 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec @@ -561,31 +561,28 @@ syn sync lines=100 " --------------------------------------------------------------------- " Define 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 - command -nargs=+ HiLink hi def link <args> +if !exists("skip_lisp_syntax_inits") - HiLink lispCommentRegion lispComment - HiLink lispAtomNmbr lispNumber - HiLink lispAtomMark lispMark - HiLink lispInStringString lispString + hi def link lispCommentRegion lispComment + hi def link lispAtomNmbr lispNumber + hi def link lispAtomMark lispMark + hi def link lispInStringString lispString - HiLink lispAtom Identifier - HiLink lispAtomBarSymbol Special - HiLink lispBarSymbol Special - HiLink lispComment Comment - HiLink lispConcat Statement - HiLink lispDecl Statement - HiLink lispFunc Statement - HiLink lispKey Type - HiLink lispMark Delimiter - HiLink lispNumber Number - HiLink lispParenError Error - HiLink lispEscapeSpecial Type - HiLink lispString String - HiLink lispTodo Todo - HiLink lispVar Statement + hi def link lispAtom Identifier + hi def link lispAtomBarSymbol Special + hi def link lispBarSymbol Special + hi def link lispComment Comment + hi def link lispConcat Statement + hi def link lispDecl Statement + hi def link lispFunc Statement + hi def link lispKey Type + hi def link lispMark Delimiter + hi def link lispNumber Number + hi def link lispParenError Error + hi def link lispEscapeSpecial Type + hi def link lispString String + hi def link lispTodo Todo + hi def link lispVar Statement if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 if &bg == "dark" @@ -613,7 +610,6 @@ if version >= 508 endif endif - delcommand HiLink endif let b:current_syntax = "lisp" diff --git a/runtime/syntax/lite.vim b/runtime/syntax/lite.vim index 8abc51dea1..a8d26892d4 100644 --- a/runtime/syntax/lite.vim +++ b/runtime/syntax/lite.vim @@ -8,11 +8,8 @@ " Options lite_sql_query = 1 for SQL syntax highligthing inside strings " lite_minlines = x to sync at least x lines backwards -" 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 @@ -138,39 +135,29 @@ if main_syntax == 'lite' endif " 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_lite_syn_inits") - if version < 508 - let did_lite_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link liteComment Comment +hi def link liteString String +hi def link liteNumber Number +hi def link liteFloat Float +hi def link liteIdentifier Identifier +hi def link liteGlobalIdentifier Identifier +hi def link liteIntVar Identifier +hi def link liteFunctions Function +hi def link liteRepeat Repeat +hi def link liteConditional Conditional +hi def link liteStatement Statement +hi def link liteType Type +hi def link liteInclude Include +hi def link liteDefine Define +hi def link liteSpecialChar SpecialChar +hi def link liteParentError liteError +hi def link liteError Error +hi def link liteTodo Todo +hi def link liteOperator Operator +hi def link liteRelation Operator - HiLink liteComment Comment - HiLink liteString String - HiLink liteNumber Number - HiLink liteFloat Float - HiLink liteIdentifier Identifier - HiLink liteGlobalIdentifier Identifier - HiLink liteIntVar Identifier - HiLink liteFunctions Function - HiLink liteRepeat Repeat - HiLink liteConditional Conditional - HiLink liteStatement Statement - HiLink liteType Type - HiLink liteInclude Include - HiLink liteDefine Define - HiLink liteSpecialChar SpecialChar - HiLink liteParentError liteError - HiLink liteError Error - HiLink liteTodo Todo - HiLink liteOperator Operator - HiLink liteRelation Operator - - delcommand HiLink -endif let b:current_syntax = "lite" diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index be34c7ed74..532f83d3bf 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -5,11 +5,8 @@ " Last Change: February 4, 2012 -" 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 @@ -389,59 +386,47 @@ syn sync ccomment logtalkBlockComment maxlines=50 " 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_logtalk_syn_inits") - if version < 508 - let did_logtalk_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink logtalkBlockComment Comment - HiLink logtalkLineComment Comment +hi def link logtalkBlockComment Comment +hi def link logtalkLineComment Comment - HiLink logtalkOpenEntityDir Normal - HiLink logtalkOpenEntityDirTag PreProc +hi def link logtalkOpenEntityDir Normal +hi def link logtalkOpenEntityDirTag PreProc - HiLink logtalkIfContainer PreProc - HiLink logtalkIf PreProc - HiLink logtalkElseIf PreProc - HiLink logtalkElse PreProc +hi def link logtalkIfContainer PreProc +hi def link logtalkIf PreProc +hi def link logtalkElseIf PreProc +hi def link logtalkElse PreProc - HiLink logtalkEntity Normal +hi def link logtalkEntity Normal - HiLink logtalkEntityRel Normal - HiLink logtalkEntityRelTag PreProc +hi def link logtalkEntityRel Normal +hi def link logtalkEntityRelTag PreProc - HiLink logtalkCloseEntityDir PreProc +hi def link logtalkCloseEntityDir PreProc - HiLink logtalkDir Normal - HiLink logtalkDirTag PreProc +hi def link logtalkDir Normal +hi def link logtalkDirTag PreProc - HiLink logtalkAtom String - HiLink logtalkString String - HiLink logtalkEscapeSequence SpecialChar +hi def link logtalkAtom String +hi def link logtalkString String +hi def link logtalkEscapeSequence SpecialChar - HiLink logtalkNumber Number +hi def link logtalkNumber Number - HiLink logtalkKeyword Keyword +hi def link logtalkKeyword Keyword - HiLink logtalkBuiltIn Keyword - HiLink logtalkBuiltInMethod Keyword +hi def link logtalkBuiltIn Keyword +hi def link logtalkBuiltInMethod Keyword - HiLink logtalkOperator Operator +hi def link logtalkOperator Operator - HiLink logtalkExtCall Normal - HiLink logtalkExtCallTag Operator +hi def link logtalkExtCall Normal +hi def link logtalkExtCallTag Operator - HiLink logtalkVariable Identifier +hi def link logtalkVariable Identifier - delcommand HiLink - -endif let b:current_syntax = "logtalk" diff --git a/runtime/syntax/lotos.vim b/runtime/syntax/lotos.vim index 3cd83c4d86..8262e1d9ef 100644 --- a/runtime/syntax/lotos.vim +++ b/runtime/syntax/lotos.vim @@ -7,11 +7,8 @@ " I'm not sure I understand all of the syntax highlight language, " but this file seems to do the job for standard LOTOS. -" 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 @@ -56,26 +53,16 @@ syn keyword lotosType using syn sync lines=250 " 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_lotos_syntax_inits") - if version < 508 - let did_lotos_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink lotosStatement Statement - HiLink lotosProcess Label - HiLink lotosOperator Operator - HiLink lotosSort Function - HiLink lotosType Type - HiLink lotosComment Comment - HiLink lotosDelimiter String +hi def link lotosStatement Statement +hi def link lotosProcess Label +hi def link lotosOperator Operator +hi def link lotosSort Function +hi def link lotosType Type +hi def link lotosComment Comment +hi def link lotosDelimiter String - delcommand HiLink -endif let b:current_syntax = "lotos" diff --git a/runtime/syntax/lout.vim b/runtime/syntax/lout.vim index 9a34328ac3..30c87fce51 100644 --- a/runtime/syntax/lout.vim +++ b/runtime/syntax/lout.vim @@ -16,11 +16,8 @@ " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 -" 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 @@ -36,11 +33,7 @@ syn sync lines=1000 " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORHT -if version >= 600 - setlocal iskeyword=@,48-57,.,@-@,_,192-255 -else - set iskeyword=@,48-57,.,@-@,_,192-255 -endif +setlocal iskeyword=@,48-57,.,@-@,_,192-255 " Some special keywords syn keyword loutTodo contained TODO lout Lout LOUT @@ -106,44 +99,33 @@ syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=lou syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError " 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_lout_syn_inits") - if version < 508 - let did_lout_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overrriden later. - HiLink loutTodo Todo - HiLink loutDefine Define - HiLink loutEOmlDef Define - HiLink loutFunction Function - HiLink loutBraceError Error - HiLink loutNULL Special - HiLink loutComment Comment - HiLink loutSpecial Special - HiLink loutSymbols Character - HiLink loutInclude Include - HiLink loutKeyword Keyword - HiLink loutTag Tag - HiLink loutMath Number - - " HiLink Not really needed here, but I think it is more consistent. - HiLink loutMBraces loutMath - hi loutItalic term=italic cterm=italic gui=italic - HiLink loutIBraces loutItalic - hi loutBold term=bold cterm=bold gui=bold - HiLink loutBBraces loutBold - hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - HiLink loutBIBraces loutBoldItalic - hi loutHeadings term=bold cterm=bold guifg=indianred - HiLink loutHeads loutHeadings - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overrriden later. +hi def link loutTodo Todo +hi def link loutDefine Define +hi def link loutEOmlDef Define +hi def link loutFunction Function +hi def link loutBraceError Error +hi def link loutNULL Special +hi def link loutComment Comment +hi def link loutSpecial Special +hi def link loutSymbols Character +hi def link loutInclude Include +hi def link loutKeyword Keyword +hi def link loutTag Tag +hi def link loutMath Number + +hi def link loutMBraces loutMath +hi loutItalic term=italic cterm=italic gui=italic +hi def link loutIBraces loutItalic +hi loutBold term=bold cterm=bold gui=bold +hi def link loutBBraces loutBold +hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic +hi def link loutBIBraces loutBoldItalic +hi loutHeadings term=bold cterm=bold guifg=indianred +hi def link loutHeads loutHeadings + let b:current_syntax = "lout" diff --git a/runtime/syntax/lpc.vim b/runtime/syntax/lpc.vim index e948f3d70c..7d85fce8e2 100644 --- a/runtime/syntax/lpc.vim +++ b/runtime/syntax/lpc.vim @@ -2,18 +2,15 @@ " Language: LPC " Maintainer: Shizhu Pan <poet@mudbuilder.net> " URL: http://poet.tomud.com/pub/lpc.vim.bz2 -" Last Change: 2011 Dec 10 by Thilo Six +" Last Change: 2016 Aug 31 " Comments: If you are using Vim 6.2 or later, see :h lpc.vim for " file type recognizing, if not, you had to use modeline. " Nodule: This is the start nodule. {{{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 @@ -360,94 +357,84 @@ endif " Nodule: Highlight links {{{1 " 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_lpc_syn_inits") - if version < 508 - let did_lpc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link lpcModifier lpcStorageClass + +hi def link lpcQuotedFmt lpcFormat +hi def link lpcFormat lpcSpecial +hi def link lpcCppString lpcString " Cpp means + " C Pre-Processor +hi def link lpcCommentL lpcComment +hi def link lpcCommentStart lpcComment +hi def link lpcUserLabel lpcLabel +hi def link lpcSpecialCharacter lpcSpecial +hi def link lpcOctal lpcPreProc +hi def link lpcOctalZero lpcSpecial " LPC will treat octal numbers + " as decimals, programmers should + " be aware of that. +hi def link lpcEfunError lpcError +hi def link lpcKeywdError lpcError +hi def link lpcOctalError lpcError +hi def link lpcParenError lpcError +hi def link lpcErrInParen lpcError +hi def link lpcErrInBracket lpcError +hi def link lpcCommentError lpcError +hi def link lpcCommentStartError lpcError +hi def link lpcSpaceError lpcError +hi def link lpcSpecialError lpcError +hi def link lpcErrFunc lpcError - HiLink lpcModifier lpcStorageClass - - HiLink lpcQuotedFmt lpcFormat - HiLink lpcFormat lpcSpecial - HiLink lpcCppString lpcString " Cpp means - " C Pre-Processor - HiLink lpcCommentL lpcComment - HiLink lpcCommentStart lpcComment - HiLink lpcUserLabel lpcLabel - HiLink lpcSpecialCharacter lpcSpecial - HiLink lpcOctal lpcPreProc - HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers - " as decimals, programmers should - " be aware of that. - HiLink lpcEfunError lpcError - HiLink lpcKeywdError lpcError - HiLink lpcOctalError lpcError - HiLink lpcParenError lpcError - HiLink lpcErrInParen lpcError - HiLink lpcErrInBracket lpcError - HiLink lpcCommentError lpcError - HiLink lpcCommentStartError lpcError - HiLink lpcSpaceError lpcError - HiLink lpcSpecialError lpcError - HiLink lpcErrFunc lpcError - - if exists("lpc_pre_v22") - HiLink lpcOldEfuns lpc_efuns - HiLink lpcNewEfuns lpcError - else - HiLink lpcOldEfuns lpcReserved - HiLink lpcNewEfuns lpc_efuns - endif - HiLink lpc_efuns lpcFunction - - HiLink lpcReserved lpcPreProc - HiLink lpcTextString lpcString " This should be preprocessors, but - HiLink lpcArrayString lpcPreProc " let's make some difference - " between text and array - - HiLink lpcIncluded lpcString - HiLink lpcCommentString lpcString - HiLink lpcComment2String lpcString - HiLink lpcCommentSkip lpcComment - HiLink lpcCommentFunc lpcComment - - HiLink lpcCppSkip lpcCppOut - HiLink lpcCppOut2 lpcCppOut - HiLink lpcCppOut lpcComment - - " Standard type below - HiLink lpcApplies Special - HiLink lpcCharacter Character - HiLink lpcComment Comment - HiLink lpcConditional Conditional - HiLink lpcConstant Constant - HiLink lpcDefine Macro - HiLink lpcError Error - HiLink lpcFloat Float - HiLink lpcFunction Function - HiLink lpcIdentifier Identifier - HiLink lpcInclude Include - HiLink lpcLabel Label - HiLink lpcNumber Number - HiLink lpcOperator Operator - HiLink lpcPreCondit PreCondit - HiLink lpcPreProc PreProc - HiLink lpcRepeat Repeat - HiLink lpcStatement Statement - HiLink lpcStorageClass StorageClass - HiLink lpcString String - HiLink lpcStructure Structure - HiLink lpcSpecial LineNr - HiLink lpcTodo Todo - HiLink lpcType Type - - delcommand HiLink +if exists("lpc_pre_v22") + hi def link lpcOldEfuns lpc_efuns + hi def link lpcNewEfuns lpcError +else + hi def link lpcOldEfuns lpcReserved + hi def link lpcNewEfuns lpc_efuns endif +hi def link lpc_efuns lpcFunction + +hi def link lpcReserved lpcPreProc +hi def link lpcTextString lpcString " This should be preprocessors, but +hi def link lpcArrayString lpcPreProc " let's make some difference + " between text and array + +hi def link lpcIncluded lpcString +hi def link lpcCommentString lpcString +hi def link lpcComment2String lpcString +hi def link lpcCommentSkip lpcComment +hi def link lpcCommentFunc lpcComment + +hi def link lpcCppSkip lpcCppOut +hi def link lpcCppOut2 lpcCppOut +hi def link lpcCppOut lpcComment + +" Standard type below +hi def link lpcApplies Special +hi def link lpcCharacter Character +hi def link lpcComment Comment +hi def link lpcConditional Conditional +hi def link lpcConstant Constant +hi def link lpcDefine Macro +hi def link lpcError Error +hi def link lpcFloat Float +hi def link lpcFunction Function +hi def link lpcIdentifier Identifier +hi def link lpcInclude Include +hi def link lpcLabel Label +hi def link lpcNumber Number +hi def link lpcOperator Operator +hi def link lpcPreCondit PreCondit +hi def link lpcPreProc PreProc +hi def link lpcRepeat Repeat +hi def link lpcStatement Statement +hi def link lpcStorageClass StorageClass +hi def link lpcString String +hi def link lpcStructure Structure +hi def link lpcSpecial LineNr +hi def link lpcTodo Todo +hi def link lpcType Type + " Nodule: This is the end nodule. {{{1 diff --git a/runtime/syntax/lprolog.vim b/runtime/syntax/lprolog.vim index 086c00fd5d..85c3537fed 100644 --- a/runtime/syntax/lprolog.vim +++ b/runtime/syntax/lprolog.vim @@ -7,11 +7,8 @@ " 2001 Apr 26 - Upgraded for new Vim version " 2000 Jun 5 - Initial release -" 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 @@ -96,41 +93,31 @@ syn sync maxlines=500 " 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_lprolog_syntax_inits") - if version < 508 - let did_lprolog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink lprologComment Comment - HiLink lprologTodo Todo - - HiLink lprologKeyword Keyword - HiLink lprologSpecial Special - HiLink lprologOperator Operator - HiLink lprologIdentifier Normal - - HiLink lprologInteger Number - HiLink lprologReal Number - HiLink lprologString String - - HiLink lprologCommentErr Error - HiLink lprologBrackErr Error - HiLink lprologParenErr Error - - HiLink lprologModuleName Special - HiLink lprologTypeName Identifier - - HiLink lprologVariable Keyword - HiLink lprologAtom Normal - HiLink lprologClause Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link lprologComment Comment +hi def link lprologTodo Todo + +hi def link lprologKeyword Keyword +hi def link lprologSpecial Special +hi def link lprologOperator Operator +hi def link lprologIdentifier Normal + +hi def link lprologInteger Number +hi def link lprologReal Number +hi def link lprologString String + +hi def link lprologCommentErr Error +hi def link lprologBrackErr Error +hi def link lprologParenErr Error + +hi def link lprologModuleName Special +hi def link lprologTypeName Identifier + +hi def link lprologVariable Keyword +hi def link lprologAtom Normal +hi def link lprologClause Type + let b:current_syntax = "lprolog" diff --git a/runtime/syntax/lscript.vim b/runtime/syntax/lscript.vim index 648a0ebeab..3c4a0fffda 100644 --- a/runtime/syntax/lscript.vim +++ b/runtime/syntax/lscript.vim @@ -9,11 +9,8 @@ " and b) I'm not so crash hot at LotusScript either. If you see any problems " feel free to email me with them. -" 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 @@ -179,34 +176,24 @@ syn region lscriptLineNumber start="^\d" end="\s" syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 " 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_lscript_syntax_inits") - if version < 508 - let did_lscript_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold - - HiLink lscriptNotesConst lscriptNotesType - HiLink lscriptLineNumber Comment - HiLink lscriptDatatype Type - HiLink lscriptNumber Number - HiLink lscriptError Error - HiLink lscriptStatement Statement - HiLink lscriptString String - HiLink lscriptComment Comment - HiLink lscriptTodo Todo - HiLink lscriptFunction Identifier - HiLink lscriptMethods PreProc - HiLink lscriptEvents Special - HiLink lscriptTypeSpecifier Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold + +hi def link lscriptNotesConst lscriptNotesType +hi def link lscriptLineNumber Comment +hi def link lscriptDatatype Type +hi def link lscriptNumber Number +hi def link lscriptError Error +hi def link lscriptStatement Statement +hi def link lscriptString String +hi def link lscriptComment Comment +hi def link lscriptTodo Todo +hi def link lscriptFunction Identifier +hi def link lscriptMethods PreProc +hi def link lscriptEvents Special +hi def link lscriptTypeSpecifier Type + let b:current_syntax = "lscript" diff --git a/runtime/syntax/lss.vim b/runtime/syntax/lss.vim index 6620707f92..6ee717bcb4 100644 --- a/runtime/syntax/lss.vim +++ b/runtime/syntax/lss.vim @@ -3,11 +3,8 @@ " Maintainer: Scott Bigham <dsb@killerbunnies.org> " Last Change: 2004 Oct 06 -" 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 @@ -70,64 +67,57 @@ syn case match syn match lssComment "#.*$" " 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_lss_syntax_inits") - if version < 508 - let did_lss_syntax_inits = 1 - endif - - hi def link lssComment Comment - hi def link lssElement Identifier - - hi def lssBold term=bold cterm=bold - hi def lssReverse term=reverse cterm=reverse - hi def lssUnderline term=underline cterm=underline - hi def lssStandout term=standout cterm=standout - - hi def lssRedFg ctermfg=red - hi def lssBlueFg ctermfg=blue - hi def lssGreenFg ctermfg=green - hi def lssBrownFg ctermfg=brown - hi def lssMagentaFg ctermfg=magenta - hi def lssCyanFg ctermfg=cyan - hi def lssGrayFg ctermfg=gray - if $COLORTERM == "rxvt" - " On rxvt's, bright colors are activated by setting the bold attribute. - hi def lssLightgrayFg ctermfg=gray cterm=bold - hi def lssBrightredFg ctermfg=red cterm=bold - hi def lssBrightgreenFg ctermfg=green cterm=bold - hi def lssYellowFg ctermfg=yellow cterm=bold - hi def lssBrightblueFg ctermfg=blue cterm=bold - hi def lssBrightmagentaFg ctermfg=magenta cterm=bold - hi def lssBrightcyanFg ctermfg=cyan cterm=bold - else - hi def lssLightgrayFg ctermfg=lightgray - hi def lssBrightredFg ctermfg=lightred - hi def lssBrightgreenFg ctermfg=lightgreen - hi def lssYellowFg ctermfg=yellow - hi def lssBrightblueFg ctermfg=lightblue - hi def lssBrightmagentaFg ctermfg=lightmagenta - hi def lssBrightcyanFg ctermfg=lightcyan - endif - - hi def lssRedBg ctermbg=red - hi def lssBlueBg ctermbg=blue - hi def lssGreenBg ctermbg=green - hi def lssBrownBg ctermbg=brown - hi def lssMagentaBg ctermbg=magenta - hi def lssCyanBg ctermbg=cyan - hi def lssLightgrayBg ctermbg=lightgray - hi def lssGrayBg ctermbg=gray - hi def lssBrightredBg ctermbg=lightred - hi def lssBrightgreenBg ctermbg=lightgreen - hi def lssYellowBg ctermbg=yellow - hi def lssBrightblueBg ctermbg=lightblue - hi def lssBrightmagentaBg ctermbg=lightmagenta - hi def lssBrightcyanBg ctermbg=lightcyan - hi def lssWhiteBg ctermbg=white ctermfg=black +" Only when an item doesn't have highlighting yet +hi def link lssComment Comment +hi def link lssElement Identifier + +hi def lssBold term=bold cterm=bold +hi def lssReverse term=reverse cterm=reverse +hi def lssUnderline term=underline cterm=underline +hi def lssStandout term=standout cterm=standout + +hi def lssRedFg ctermfg=red +hi def lssBlueFg ctermfg=blue +hi def lssGreenFg ctermfg=green +hi def lssBrownFg ctermfg=brown +hi def lssMagentaFg ctermfg=magenta +hi def lssCyanFg ctermfg=cyan +hi def lssGrayFg ctermfg=gray +if $COLORTERM == "rxvt" + " On rxvt's, bright colors are activated by setting the bold attribute. + hi def lssLightgrayFg ctermfg=gray cterm=bold + hi def lssBrightredFg ctermfg=red cterm=bold + hi def lssBrightgreenFg ctermfg=green cterm=bold + hi def lssYellowFg ctermfg=yellow cterm=bold + hi def lssBrightblueFg ctermfg=blue cterm=bold + hi def lssBrightmagentaFg ctermfg=magenta cterm=bold + hi def lssBrightcyanFg ctermfg=cyan cterm=bold +else + hi def lssLightgrayFg ctermfg=lightgray + hi def lssBrightredFg ctermfg=lightred + hi def lssBrightgreenFg ctermfg=lightgreen + hi def lssYellowFg ctermfg=yellow + hi def lssBrightblueFg ctermfg=lightblue + hi def lssBrightmagentaFg ctermfg=lightmagenta + hi def lssBrightcyanFg ctermfg=lightcyan endif +hi def lssRedBg ctermbg=red +hi def lssBlueBg ctermbg=blue +hi def lssGreenBg ctermbg=green +hi def lssBrownBg ctermbg=brown +hi def lssMagentaBg ctermbg=magenta +hi def lssCyanBg ctermbg=cyan +hi def lssLightgrayBg ctermbg=lightgray +hi def lssGrayBg ctermbg=gray +hi def lssBrightredBg ctermbg=lightred +hi def lssBrightgreenBg ctermbg=lightgreen +hi def lssYellowBg ctermbg=yellow +hi def lssBrightblueBg ctermbg=lightblue +hi def lssBrightmagentaBg ctermbg=lightmagenta +hi def lssBrightcyanBg ctermbg=lightcyan +hi def lssWhiteBg ctermbg=white ctermfg=black + let b:current_syntax = "lss" " vim: ts=8 diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim index 3ff80b1ebe..f313c14e7a 100644 --- a/runtime/syntax/lua.vim +++ b/runtime/syntax/lua.vim @@ -7,11 +7,8 @@ " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " default 5.2 -" 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 @@ -325,40 +322,30 @@ elseif lua_version == 5 endif " 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_lua_syntax_inits") - if version < 508 - let did_lua_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink luaStatement Statement - HiLink luaRepeat Repeat - HiLink luaFor Repeat - HiLink luaString String - HiLink luaString2 String - HiLink luaNumber Number - HiLink luaOperator Operator - HiLink luaIn Operator - HiLink luaConstant Constant - HiLink luaCond Conditional - HiLink luaElse Conditional - HiLink luaFunction Function - HiLink luaComment Comment - HiLink luaTodo Todo - HiLink luaTable Structure - HiLink luaError Error - HiLink luaParenError Error - HiLink luaBraceError Error - HiLink luaSpecial SpecialChar - HiLink luaFunc Identifier - HiLink luaLabel Label +hi def link luaStatement Statement +hi def link luaRepeat Repeat +hi def link luaFor Repeat +hi def link luaString String +hi def link luaString2 String +hi def link luaNumber Number +hi def link luaOperator Operator +hi def link luaIn Operator +hi def link luaConstant Constant +hi def link luaCond Conditional +hi def link luaElse Conditional +hi def link luaFunction Function +hi def link luaComment Comment +hi def link luaTodo Todo +hi def link luaTable Structure +hi def link luaError Error +hi def link luaParenError Error +hi def link luaBraceError Error +hi def link luaSpecial SpecialChar +hi def link luaFunc Identifier +hi def link luaLabel Label - delcommand HiLink -endif let b:current_syntax = "lua" diff --git a/runtime/syntax/m4.vim b/runtime/syntax/m4.vim index ba7a294d14..6f229ea1ab 100644 --- a/runtime/syntax/m4.vim +++ b/runtime/syntax/m4.vim @@ -8,15 +8,12 @@ " capital letters and have at least one argument (i.e. the '(' " must be there). Let me know if this is a problem. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif -" we define it here so that included files can test for it + if exists("b:current_syntax") + finish + endif + " we define it here so that included files can test for it let main_syntax='m4' endif @@ -39,30 +36,20 @@ syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringConte syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function " 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_m4_syn_inits") - if version < 508 - let did_m4_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink m4Delimiter Delimiter - HiLink m4Comment Comment - HiLink m4Function Function - HiLink m4Keyword Keyword - HiLink m4Special Special - HiLink m4String String - HiLink m4Statement Statement - HiLink m4Preproc PreProc - HiLink m4Type Type - HiLink m4Special Special - HiLink m4Variable Special - HiLink m4Constants Constant - HiLink m4Builtin Statement - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link m4Delimiter Delimiter +hi def link m4Comment Comment +hi def link m4Function Function +hi def link m4Keyword Keyword +hi def link m4Special Special +hi def link m4String String +hi def link m4Statement Statement +hi def link m4Preproc PreProc +hi def link m4Type Type +hi def link m4Special Special +hi def link m4Variable Special +hi def link m4Constants Constant +hi def link m4Builtin Statement let b:current_syntax = "m4" diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 35b09341a6..7072bab988 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -4,11 +4,8 @@ " URL: http://www.fleiner.com/vim/syntax/make.vim " Last Change: 2015 Feb 28 -" 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 @@ -101,40 +98,30 @@ syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Z syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$" " 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_make_syn_inits") - if version < 508 - let did_make_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink makeNextLine makeSpecial - HiLink makeCmdNextLine makeSpecial - HiLink makeSpecTarget Statement - if !exists("make_no_commands") - HiLink makeCommands Number - endif - HiLink makeImplicit Function - HiLink makeTarget Function - HiLink makeInclude Include - HiLink makePreCondit PreCondit - HiLink makeStatement Statement - HiLink makeIdent Identifier - HiLink makeSpecial Special - HiLink makeComment Comment - HiLink makeDString String - HiLink makeSString String - HiLink makeBString Function - HiLink makeError Error - HiLink makeTodo Todo - HiLink makeDefine Define - HiLink makeCommandError Error - HiLink makeConfig PreCondit - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link makeNextLine makeSpecial +hi def link makeCmdNextLine makeSpecial +hi def link makeSpecTarget Statement +if !exists("make_no_commands") +hi def link makeCommands Number endif +hi def link makeImplicit Function +hi def link makeTarget Function +hi def link makeInclude Include +hi def link makePreCondit PreCondit +hi def link makeStatement Statement +hi def link makeIdent Identifier +hi def link makeSpecial Special +hi def link makeComment Comment +hi def link makeDString String +hi def link makeSString String +hi def link makeBString Function +hi def link makeError Error +hi def link makeTodo Todo +hi def link makeDefine Define +hi def link makeCommandError Error +hi def link makeConfig PreCondit let b:current_syntax = "make" diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim index 77b1507b36..1261ff5a47 100644 --- a/runtime/syntax/maple.vim +++ b/runtime/syntax/maple.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Maple V (based on release 4) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: May 02, 2016 -" Version: 13 +" Last Change: Aug 31, 2016 +" Version: 15 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_MAPLE " " Package Function Selection: {{{1 @@ -21,11 +21,8 @@ " but only the contents of packages of Maple V Release 4, and the top-level " routines of Release 4. <Jacques Carette - carette@mcmaster.ca> -" 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 @@ -551,81 +548,73 @@ endif " ===================================================================== " Highlighting: 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_maplev_syntax_inits") - if version < 508 - let did_maplev_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +if !exists("skip_maplev_syntax_inits") " Maple->Maple Links {{{2 - HiLink mvBraceError mvError - HiLink mvCurlyError mvError - HiLink mvDebug mvTodo - HiLink mvParenError mvError - HiLink mvPkg_DEtools mvPkgFunc - HiLink mvPkg_Galois mvPkgFunc - HiLink mvPkg_GaussInt mvPkgFunc - HiLink mvPkg_LREtools mvPkgFunc - HiLink mvPkg_combinat mvPkgFunc - HiLink mvPkg_combstruct mvPkgFunc - HiLink mvPkg_difforms mvPkgFunc - HiLink mvPkg_finance mvPkgFunc - HiLink mvPkg_genfunc mvPkgFunc - HiLink mvPkg_geometry mvPkgFunc - HiLink mvPkg_grobner mvPkgFunc - HiLink mvPkg_group mvPkgFunc - HiLink mvPkg_inttrans mvPkgFunc - HiLink mvPkg_liesymm mvPkgFunc - HiLink mvPkg_linalg mvPkgFunc - HiLink mvPkg_logic mvPkgFunc - HiLink mvPkg_networks mvPkgFunc - HiLink mvPkg_numapprox mvPkgFunc - HiLink mvPkg_numtheory mvPkgFunc - HiLink mvPkg_orthopoly mvPkgFunc - HiLink mvPkg_padic mvPkgFunc - HiLink mvPkg_plots mvPkgFunc - HiLink mvPkg_plottools mvPkgFunc - HiLink mvPkg_powseries mvPkgFunc - HiLink mvPkg_process mvPkgFunc - HiLink mvPkg_simplex mvPkgFunc - HiLink mvPkg_stats mvPkgFunc - HiLink mvPkg_student mvPkgFunc - HiLink mvPkg_sumtools mvPkgFunc - HiLink mvPkg_tensor mvPkgFunc - HiLink mvPkg_totorder mvPkgFunc - HiLink mvRange mvOper - HiLink mvSemiError mvError - HiLink mvDelim Delimiter + hi def link mvBraceError mvError + hi def link mvCurlyError mvError + hi def link mvDebug mvTodo + hi def link mvParenError mvError + hi def link mvPkg_DEtools mvPkgFunc + hi def link mvPkg_Galois mvPkgFunc + hi def link mvPkg_GaussInt mvPkgFunc + hi def link mvPkg_LREtools mvPkgFunc + hi def link mvPkg_combinat mvPkgFunc + hi def link mvPkg_combstruct mvPkgFunc + hi def link mvPkg_difforms mvPkgFunc + hi def link mvPkg_finance mvPkgFunc + hi def link mvPkg_genfunc mvPkgFunc + hi def link mvPkg_geometry mvPkgFunc + hi def link mvPkg_grobner mvPkgFunc + hi def link mvPkg_group mvPkgFunc + hi def link mvPkg_inttrans mvPkgFunc + hi def link mvPkg_liesymm mvPkgFunc + hi def link mvPkg_linalg mvPkgFunc + hi def link mvPkg_logic mvPkgFunc + hi def link mvPkg_networks mvPkgFunc + hi def link mvPkg_numapprox mvPkgFunc + hi def link mvPkg_numtheory mvPkgFunc + hi def link mvPkg_orthopoly mvPkgFunc + hi def link mvPkg_padic mvPkgFunc + hi def link mvPkg_plots mvPkgFunc + hi def link mvPkg_plottools mvPkgFunc + hi def link mvPkg_powseries mvPkgFunc + hi def link mvPkg_process mvPkgFunc + hi def link mvPkg_simplex mvPkgFunc + hi def link mvPkg_stats mvPkgFunc + hi def link mvPkg_student mvPkgFunc + hi def link mvPkg_sumtools mvPkgFunc + hi def link mvPkg_tensor mvPkgFunc + hi def link mvPkg_totorder mvPkgFunc + hi def link mvRange mvOper + hi def link mvSemiError mvError + hi def link mvDelim Delimiter " Maple->Standard Links {{{2 - HiLink mvAssign Delimiter - HiLink mvBool Boolean - HiLink mvComma Delimiter - HiLink mvComment Comment - HiLink mvCond Conditional - HiLink mvConstant Number - HiLink mvDelayEval Label - HiLink mvDcolon Delimiter - HiLink mvError Error - HiLink mvLibrary Statement - HiLink mvNumber Number - HiLink mvOper Operator - HiLink mvAssign Delimiter - HiLink mvPackage Type - HiLink mvPkgFunc Function - HiLink mvPktOption Special - HiLink mvRepeat Repeat - HiLink mvSpecial Special - HiLink mvStatement Statement - HiLink mvName String - HiLink mvString String - HiLink mvTodo Todo - - delcommand HiLink + hi def link mvAssign Delimiter + hi def link mvBool Boolean + hi def link mvComma Delimiter + hi def link mvComment Comment + hi def link mvCond Conditional + hi def link mvConstant Number + hi def link mvDelayEval Label + hi def link mvDcolon Delimiter + hi def link mvError Error + hi def link mvLibrary Statement + hi def link mvNumber Number + hi def link mvOper Operator + hi def link mvAssign Delimiter + hi def link mvPackage Type + hi def link mvPkgFunc Function + hi def link mvPktOption Special + hi def link mvRepeat Repeat + hi def link mvSpecial Special + hi def link mvStatement Statement + hi def link mvName String + hi def link mvString String + hi def link mvTodo Todo + endif " Current Syntax: {{{1 diff --git a/runtime/syntax/markdown.vim b/runtime/syntax/markdown.vim index 068115e92d..1955a7443e 100644 --- a/runtime/syntax/markdown.vim +++ b/runtime/syntax/markdown.vim @@ -2,7 +2,7 @@ " Language: Markdown " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.markdown -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -70,29 +70,34 @@ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+"+ end=+ syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained -syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart +syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline -syn region markdownItalic start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart -syn region markdownItalic start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart -syn region markdownBold start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic -syn region markdownBold start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic -syn region markdownBoldItalic start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart -syn region markdownBoldItalic start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart +let s:concealends = has('conceal') ? ' concealends' : '' +exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends +exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=__\|__\S\@=" end="\S\@<=__\|__\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends +exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=\*\*\*\|\*\*\*\S\@=" end="\S\@<=\*\*\*\|\*\*\*\S\@=" keepend contains=markdownLineStart' . s:concealends +exe 'syn region markdownBoldItalic matchgroup=markdownBoldItalicDelimiter start="\S\@<=___\|___\S\@=" end="\S\@<=___\|___\S\@=" keepend contains=markdownLineStart' . s:concealends + syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend +syn match markdownFootnote "\[^[^\]]\+\]" +syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:" + if main_syntax ==# 'markdown' for s:type in g:markdown_fenced_languages - exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') + exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') endfor unlet! s:type endif -syn match markdownEscape "\\[][\\`*_{}()#+.!-]" +syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]" syn match markdownError "\w\@<=_\w\@=" hi def link markdownH1 htmlH1 @@ -108,6 +113,9 @@ hi def link markdownListMarker htmlTagName hi def link markdownBlockquote Comment hi def link markdownRule PreProc +hi def link markdownFootnote Typedef +hi def link markdownFootnoteDefinition Typedef + hi def link markdownLinkText htmlLink hi def link markdownIdDeclaration Typedef hi def link markdownId Type @@ -119,8 +127,11 @@ hi def link markdownUrlDelimiter htmlTag hi def link markdownUrlTitleDelimiter Delimiter hi def link markdownItalic htmlItalic +hi def link markdownItalicDelimiter markdownItalic hi def link markdownBold htmlBold +hi def link markdownBoldDelimiter markdownBold hi def link markdownBoldItalic htmlBoldItalic +hi def link markdownBoldItalicDelimiter markdownBoldItalic hi def link markdownCodeDelimiter Delimiter hi def link markdownEscape Special diff --git a/runtime/syntax/mason.vim b/runtime/syntax/mason.vim index 40bdb0eaa4..6789e11aef 100644 --- a/runtime/syntax/mason.vim +++ b/runtime/syntax/mason.vim @@ -13,12 +13,8 @@ " - Fix <%text> blocks to show HTML tags but ignore Mason tags. " -" Clear previous syntax settings unless this is v6 or above, in which case just -" exit without doing anything. -" -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -30,22 +26,14 @@ endif " First pull in the HTML syntax. " -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=@masonTop " Now pull in the Perl syntax. " -if version < 600 - syn include @perlTop <sfile>:p:h/perl.vim -else - syn include @perlTop syntax/perl.vim -endif +syn include @perlTop syntax/perl.vim " It's hard to reduce down to the correct sub-set of Perl to highlight in some " of these cases so I've taken the safe option of just using perlTop in all of @@ -78,19 +66,7 @@ syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs, " Set up default highlighting. Almost all of this is done in the included " syntax files. -" -if version >= 508 || !exists("did_mason_syn_inits") - if version < 508 - let did_mason_syn_inits = 1 - com -nargs=+ HiLink hi link <args> - else - com -nargs=+ HiLink hi def link <args> - endif - - HiLink masonDoc Comment - - delc HiLink -endif +hi def link masonDoc Comment let b:current_syntax = "mason" diff --git a/runtime/syntax/master.vim b/runtime/syntax/master.vim index 40d644eef9..f89c5b2f1c 100644 --- a/runtime/syntax/master.vim +++ b/runtime/syntax/master.vim @@ -8,11 +8,8 @@ " this is a very simple syntax file - I will be improving it " add entire DEFINE syntax -" 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 @@ -28,22 +25,12 @@ syn region masterString start=+'+ end=+'+ syn match masterComment "\$.*" " 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_master_syntax_inits") - if version < 508 - let did_master_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink masterKeyword Keyword - HiLink masterComment Comment - HiLink masterString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link masterKeyword Keyword +hi def link masterComment Comment +hi def link masterString String + let b:current_syntax = "master" diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim index 3828f3e8a8..92ffbbc1ed 100644 --- a/runtime/syntax/matlab.vim +++ b/runtime/syntax/matlab.vim @@ -8,11 +8,8 @@ " Change History: " - 'global' and 'persistent' keyword are now recognized -" 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 @@ -76,49 +73,39 @@ syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" " 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_matlab_syntax_inits") - if version < 508 - let did_matlab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink matlabTransposeOperator matlabOperator - HiLink matlabOperator Operator - HiLink matlabLineContinuation Special - HiLink matlabLabel Label - HiLink matlabConditional Conditional - HiLink matlabExceptions Conditional - HiLink matlabRepeat Repeat - HiLink matlabTodo Todo - HiLink matlabString String - HiLink matlabDelimiter Identifier - HiLink matlabTransposeOther Identifier - HiLink matlabNumber Number - HiLink matlabFloat Float - HiLink matlabFunction Function - HiLink matlabError Error - HiLink matlabImplicit matlabStatement - HiLink matlabStatement Statement - HiLink matlabOO Statement - HiLink matlabSemicolon SpecialChar - HiLink matlabComment Comment - HiLink matlabMultilineComment Comment - HiLink matlabScope Type - - HiLink matlabArithmeticOperator matlabOperator - HiLink matlabRelationalOperator matlabOperator - HiLink matlabLogicalOperator matlabOperator +" Only when an item doesn't have highlighting yet + +hi def link matlabTransposeOperator matlabOperator +hi def link matlabOperator Operator +hi def link matlabLineContinuation Special +hi def link matlabLabel Label +hi def link matlabConditional Conditional +hi def link matlabExceptions Conditional +hi def link matlabRepeat Repeat +hi def link matlabTodo Todo +hi def link matlabString String +hi def link matlabDelimiter Identifier +hi def link matlabTransposeOther Identifier +hi def link matlabNumber Number +hi def link matlabFloat Float +hi def link matlabFunction Function +hi def link matlabError Error +hi def link matlabImplicit matlabStatement +hi def link matlabStatement Statement +hi def link matlabOO Statement +hi def link matlabSemicolon SpecialChar +hi def link matlabComment Comment +hi def link matlabMultilineComment Comment +hi def link matlabScope Type + +hi def link matlabArithmeticOperator matlabOperator +hi def link matlabRelationalOperator matlabOperator +hi def link matlabLogicalOperator matlabOperator "optional highlighting - "HiLink matlabIdentifier Identifier - "HiLink matlabTab Error +"hi def link matlabIdentifier Identifier +"hi def link matlabTab Error - delcommand HiLink -endif let b:current_syntax = "matlab" diff --git a/runtime/syntax/maxima.vim b/runtime/syntax/maxima.vim index 27dcc18842..46e1e4ff84 100644 --- a/runtime/syntax/maxima.vim +++ b/runtime/syntax/maxima.vim @@ -6,11 +6,8 @@ " Adapted mostly from xmath.vim " Number formats adapted from r.vim " -" 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 @@ -234,41 +231,31 @@ syn sync match maximaSyncComment grouphere maximaCommentBlock "/*" syn sync match maximaSyncComment groupthere NONE "*/" " 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_maxima_syntax_inits") - if version < 508 - let did_maxima_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink maximaBraceError maximaError - HiLink maximaCmd maximaStatement - HiLink maximaCurlyError maximaError - HiLink maximaFuncCmd maximaStatement - HiLink maximaParenError maximaError +hi def link maximaBraceError maximaError +hi def link maximaCmd maximaStatement +hi def link maximaCurlyError maximaError +hi def link maximaFuncCmd maximaStatement +hi def link maximaParenError maximaError - " The default methods for highlighting. Can be overridden later - HiLink maximaCharacter Character - HiLink maximaComma Function - HiLink maximaCommentBlock Comment - HiLink maximaConditional Conditional - HiLink maximaError Error - HiLink maximaFunc Delimiter - HiLink maximaOp Delimiter - HiLink maximaLabel PreProc - HiLink maximaNumber Number - HiLink maximaFloat Float - HiLink maximaRepeat Repeat - HiLink maximaSpecial Type - HiLink maximaSpecialChar SpecialChar - HiLink maximaStatement Statement - HiLink maximaString String - HiLink maximaTodo Todo +" The default methods for highlighting. Can be overridden later +hi def link maximaCharacter Character +hi def link maximaComma Function +hi def link maximaCommentBlock Comment +hi def link maximaConditional Conditional +hi def link maximaError Error +hi def link maximaFunc Delimiter +hi def link maximaOp Delimiter +hi def link maximaLabel PreProc +hi def link maximaNumber Number +hi def link maximaFloat Float +hi def link maximaRepeat Repeat +hi def link maximaSpecial Type +hi def link maximaSpecialChar SpecialChar +hi def link maximaStatement Statement +hi def link maximaString String +hi def link maximaTodo Todo - delcommand HiLink -endif let b:current_syntax = "maxima" diff --git a/runtime/syntax/mel.vim b/runtime/syntax/mel.vim index a668e70378..ea6e75fa22 100644 --- a/runtime/syntax/mel.vim +++ b/runtime/syntax/mel.vim @@ -4,11 +4,8 @@ " Last Change: May 27 1999 " Based on: Bram Moolenaar <Bram@vim.org> C syntax file -" 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 @@ -77,45 +74,35 @@ endif exec "sy sync ccomment melComment minlines=" . mel_minlines " 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_mel_syntax_inits") - if version < 508 - let did_mel_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink melBoolean Boolean - HiLink melFunction Function - HiLink melIdentifier Identifier - HiLink melStatement Statement - HiLink melConditional Conditional - HiLink melRepeat Repeat - HiLink melLabel Label - HiLink melOperator Operator - HiLink melKeyword Keyword - HiLink melException Exception - HiLink melInclude Include - HiLink melType Type - HiLink melStorageClass StorageClass - HiLink melDebug Debug - HiLink melTodo Todo - HiLink melCharSpecial SpecialChar - HiLink melString String - HiLink melInteger Number - HiLink melFloat Float - HiLink melMatrixVector Float - HiLink melComment Comment - HiLink melError Error - HiLink melSpaceError melError - HiLink melCharError melError - HiLink melParenError melError - HiLink melInParen melError - HiLink melCommentError melError - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link melBoolean Boolean +hi def link melFunction Function +hi def link melIdentifier Identifier +hi def link melStatement Statement +hi def link melConditional Conditional +hi def link melRepeat Repeat +hi def link melLabel Label +hi def link melOperator Operator +hi def link melKeyword Keyword +hi def link melException Exception +hi def link melInclude Include +hi def link melType Type +hi def link melStorageClass StorageClass +hi def link melDebug Debug +hi def link melTodo Todo +hi def link melCharSpecial SpecialChar +hi def link melString String +hi def link melInteger Number +hi def link melFloat Float +hi def link melMatrixVector Float +hi def link melComment Comment +hi def link melError Error +hi def link melSpaceError melError +hi def link melCharError melError +hi def link melParenError melError +hi def link melInParen melError +hi def link melCommentError melError + let b:current_syntax = "mel" diff --git a/runtime/syntax/mf.vim b/runtime/syntax/mf.vim index 8bc48fee46..3589e4db3c 100644 --- a/runtime/syntax/mf.vim +++ b/runtime/syntax/mf.vim @@ -1,197 +1,295 @@ " Vim syntax file -" Language: Metafont -" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> -" Last Change: April 25, 2001 - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" Language: METAFONT +" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> +" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: 2016 Oct 1 + +if exists("b:current_syntax") finish endif -" Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook' +syn iskeyword @,_ + +" METAFONT 'primitives' as defined in chapter 25 of 'The METAFONTbook' " Page 210: 'boolean expressions' -syn keyword mfBoolExp true false known unknown odd charexists not and or +syn keyword mfBoolExp and charexists false known not odd or true unknown " Page 210: 'numeric expression' -syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber -syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart -syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor -syn keyword mfNumExp uniformdeviate +syn keyword mfNumExp ASCII angle cosd directiontime floor hex length +syn keyword mfNumExp mexp mlog normaldeviate oct sind sqrt totalweight +syn keyword mfNumExp turningnumber uniformdeviate xpart xxpart xypart +syn keyword mfNumExp ypart yxpart yypart " Page 211: 'internal quantities' -syn keyword mfInternal tracingtitles tracingequations tracingcapsules -syn keyword mfInternal tracingchoices tracingspecs tracingpens -syn keyword mfInternal tracingcommands tracingrestores tracingmacros -syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats -syn keyword mfInternal pausing showstopping fontmaking proofing -syn keyword mfInternal turningcheck warningcheck smoothing autorounding -syn keyword mfInternal granularity fillin year month day time -syn keyword mfInternal charcode charext charwd charht chardp charic -syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset -syn keyword mfInternal boundarychar +syn keyword mfInternal autorounding boundarychar charcode chardp chardx +syn keyword mfInternal chardy charext charht charic charwd day designsize +syn keyword mfInternal fillin fontmaking granularity hppp jobname month +syn keyword mfInternal pausing proofing showstopping smoothing time +syn keyword mfInternal tracingcapsules tracingchoices tracingcommands +syn keyword mfInternal tracingedges tracingequations tracingmacros +syn keyword mfInternal tracingonline tracingoutput tracingpens +syn keyword mfInternal tracingrestores tracingspecs tracingstats +syn keyword mfInternal tracingtitles turningcheck vppp warningcheck +syn keyword mfInternal xoffset year yoffset " Page 212: 'pair expressions' -syn keyword mfPairExp point of precontrol postcontrol penoffset rotated -syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled -syn keyword mfPairExp zscaled +syn keyword mfPairExp of penoffset point postcontrol precontrol rotated +syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled +syn keyword mfPairExp zscaled " Page 213: 'path expressions' -syn keyword mfPathExp makepath reverse subpath curl tension atleast -syn keyword mfPathExp controls cycle +syn keyword mfPathExp atleast controls curl cycle makepath reverse +syn keyword mfPathExp subpath tension " Page 214: 'pen expressions' -syn keyword mfPenExp nullpen pencircle makepen +syn keyword mfPenExp makepen nullpen pencircle -" Page 214: 'picutre expressions' -syn keyword mfPicExp nullpicture +" Page 214: 'picture expressions' +syn keyword mfPicExp nullpicture " Page 214: 'string expressions' -syn keyword mfStringExp jobname readstring str char decimal substring +syn keyword mfStringExp char decimal readstring str substring " Page 217: 'commands and statements' -syn keyword mfCommand end dump save interim newinternal randomseed let -syn keyword mfCommand delimiters outer everyjob show showvariable showtoken -syn keyword mfCommand showdependencies showstats message errmessage errhelp -syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode -syn keyword mfCommand addto also contour doublepath withpen withweight cull -syn keyword mfCommand keeping dropping display inwindow openwindow at from to -syn keyword mfCommand shipout special numspecial +syn keyword mfCommand addto also at batchmode contour cull delimiters +syn keyword mfCommand display doublepath dropping dump end errhelp +syn keyword mfCommand errmessage errorstopmode everyjob from interim +syn keyword mfCommand inwindow keeping let message newinternal +syn keyword mfCommand nonstopmode numspecial openwindow outer randomseed +syn keyword mfCommand save scrollmode shipout show showdependencies +syn keyword mfCommand showstats showtoken showvariable special to withpen +syn keyword mfCommand withweight " Page 56: 'types' -syn keyword mfType boolean numeric pair path pen picture string transform +syn keyword mfType boolean numeric pair path pen picture string +syn keyword mfType transform " Page 155: 'grouping' -syn keyword mfStatement begingroup endgroup +syn keyword mfStatement begingroup endgroup " Page 165: 'definitions' -syn keyword mfDefinition enddef def expr suffix text primary secondary -syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef +syn keyword mfDefinition def enddef expr primary primarydef secondary +syn keyword mfDefinition secondarydef suffix tertiary tertiarydef text +syn keyword mfDefinition vardef " Page 169: 'conditions and loops' -syn keyword mfCondition if fi else elseif endfor for forsuffixes forever -syn keyword mfCondition step until exitif +syn keyword mfCondition else elseif endfor exitif fi for forever +syn keyword mfCondition forsuffixes if step until " Other primitives listed in the index -syn keyword mfPrimitive charlist endinput expandafter extensible -syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes -syn keyword mfPrimitive kern ligtable quote scantokens skipto +syn keyword mfPrimitive charlist endinput expandafter extensible fontdimen +syn keyword mfPrimitive headerbyte inner input intersectiontimes kern +syn keyword mfPrimitive ligtable quote scantokens skipto + +" Implicit suffix parameters +syn match mfSuffixParam "@#\|#@\|@" + +" These are just tags, but given their special status, we +" highlight them as variables +syn keyword mfVariable x y " Keywords defined by plain.mf (defined on pp.262-278) -if !exists("plain_mf_macros") - let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful - " metapost.vim does so to turn off Metafont macros +if get(g:, "plain_mf_macros", 1) + syn keyword mfDef addto_currentpicture beginchar capsule_def + syn keyword mfDef change_width clear_pen_memory clearit clearpen + syn keyword mfDef clearxy culldraw cullit cutdraw + syn keyword mfDef define_blacker_pixels define_corrected_pixels + syn keyword mfDef define_good_x_pixels define_good_y_pixels + syn keyword mfDef define_horizontal_corrected_pixels define_pixels + syn keyword mfDef define_whole_blacker_pixels define_whole_pixels + syn keyword mfDef define_whole_vertical_blacker_pixels + syn keyword mfDef define_whole_vertical_pixels downto draw drawdot + syn keyword mfDef endchar erase exitunless fill filldraw fix_units + syn keyword mfDef flex font_coding_scheme font_extra_space + syn keyword mfDef font_identifier font_normal_shrink + syn keyword mfDef font_normal_space font_normal_stretch font_quad + syn keyword mfDef font_size font_slant font_x_height gfcorners gobble + syn keyword mfDef hide imagerules interact italcorr killtext + syn keyword mfDef loggingall lowres_fix makebox makegrid maketicks + syn keyword mfDef mode_def mode_setup nodisplays notransforms numtok + syn keyword mfDef openit penrazor pensquare penstroke pickup + syn keyword mfDef proofoffset proofrule range reflectedabout + syn keyword mfDef rotatedaround screenchars screenrule screenstrokes + syn keyword mfDef shipit showit smode stop superellipse takepower + syn keyword mfDef tracingall tracingnone undraw undrawdot unfill + syn keyword mfDef unfilldraw upto z + syn match mfDef "???" + syn keyword mfVardef bot byte ceiling counterclockwise cutoff decr dir + syn keyword mfVardef direction directionpoint grayfont hround incr + syn keyword mfVardef interpath inverse labelfont labels lft magstep + " Note: nodot is not a vardef, it is used as in makelabel.lft.nodot("5",z5) + " (METAFONT only) + syn keyword mfVardef makelabel max min nodot penlabels penpos + syn keyword mfVardef proofrulethickness round rt savepen slantfont solve + syn keyword mfVardef tensepath titlefont top unitvector vround whatever + syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>" + syn keyword mfPrimaryDef div dotprod gobbled mod + syn keyword mfSecondaryDef intersectionpoint + syn keyword mfTertiaryDef softjoin thru + syn keyword mfNewInternal blacker currentwindow displaying eps epsilon + syn keyword mfNewInternal infinity join_radius number_of_modes o_correction + syn keyword mfNewInternal pen_bot pen_lft pen_rt pen_top pixels_per_inch + syn keyword mfNewInternal screen_cols screen_rows tolerance + " Predefined constants + syn keyword mfConstant base_name base_version blankpicture ditto down + syn keyword mfConstant fullcircle halfcircle identity left lowres origin + syn keyword mfConstant penspeck proof quartercircle right rulepen smoke + syn keyword mfConstant unitpixel unitsquare up + " Other predefined variables + syn keyword mfVariable aspect_ratio currentpen extra_beginchar + syn keyword mfVariable extra_endchar currentpen_path currentpicture + syn keyword mfVariable currenttransform d extra_setup h localfont mag mode + syn keyword mfVariable mode_name w + " let statements: + syn keyword mfnumExp abs + syn keyword mfPairExp rotatedabout + syn keyword mfCommand bye relax endif -if plain_mf_macros - syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name - syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte - syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit - syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit - syn keyword mfMacro currentpen currentpen_path currentpicture - syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr - syn keyword mfMacro define_blacker_pixels define_corrected_pixels - syn keyword mfMacro define_good_x_pixels define_good_y_pixels - syn keyword mfMacro define_horizontal_corrected_pixels define_pixels - syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels - syn keyword mfMacro define_whole_vertical_blacker_pixels - syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint - syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot - syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar - syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex - syn keyword mfMacro font_coding_scheme font_extra_space font_identifier - syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch - syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height - syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h - syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity - syn keyword mfMacro interact interpath intersectionpoint inverse italcorr - syn keyword mfMacro join_radius killtext labelfont labels left lft localfont - syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid - syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name - syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok - syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top - syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke - syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule - syn keyword mfMacro proofrulethickness quartercircle range reflectedabout - syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen - syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule - syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin - syn keyword mfMacro solve stop superellipse takepower tensepath titlefont - syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot - syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto - syn keyword mfMacro vround w whatever + +" By default, METAFONT loads modes.mf, too +if get(g:, "plain_mf_modes", 1) + syn keyword mfConstant APSSixMed AgfaFourZeroZero AgfaThreeFourZeroZero + syn keyword mfConstant AtariNineFive AtariNineSix AtariSLMEightZeroFour + syn keyword mfConstant AtariSMOneTwoFour CItohEightFiveOneZero + syn keyword mfConstant CItohThreeOneZero CanonBJCSixZeroZero CanonCX + syn keyword mfConstant CanonEX CanonLBPLX CanonLBPTen CanonSX ChelgraphIBX + syn keyword mfConstant CompugraphicEightSixZeroZero + syn keyword mfConstant CompugraphicNineSixZeroZero DD DEClarge DECsmall + syn keyword mfConstant DataDiscNew EightThree EpsonAction + syn keyword mfConstant EpsonLQFiveZeroZeroLo EpsonLQFiveZeroZeroMed + syn keyword mfConstant EpsonMXFX EpsonSQEightSevenZero EpsonStylusPro + syn keyword mfConstant EpsonStylusProHigh EpsonStylusProLow + syn keyword mfConstant EpsonStylusProMed FourFour GThreefax HPDeskJet + syn keyword mfConstant HPLaserJetIIISi IBMFourTwoFiveZero IBMFourTwoOneSix + syn keyword mfConstant IBMFourTwoThreeZero IBMFourZeroOneNine + syn keyword mfConstant IBMFourZeroThreeNine IBMFourZeroTwoNine + syn keyword mfConstant IBMProPrinter IBMSixOneFiveFour IBMSixSixSevenZero + syn keyword mfConstant IBMThreeEightOneTwo IBMThreeEightTwoZero + syn keyword mfConstant IBMThreeOneNineThree IBMThreeOneSevenNine + syn keyword mfConstant IBMUlfHolleberg LASevenFive LNOthreR LNOthree + syn keyword mfConstant LNZeroOne LNZeroThree LPSFourZero LPSTwoZero + syn keyword mfConstant LexmarkFourZeroThreeNine LexmarkOptraR + syn keyword mfConstant LexmarkOptraS LinotypeLThreeThreeZero + syn keyword mfConstant LinotypeOneZeroZero LinotypeOneZeroZeroLo + syn keyword mfConstant LinotypeThreeZeroZeroHi MacTrueSize NeXTprinter + syn keyword mfConstant NeXTscreen NecTwoZeroOne Newgen NineOne + syn keyword mfConstant OCESixSevenFiveZeroPS OneTwoZero OneZeroZero + syn keyword mfConstant PrintwareSevenTwoZeroIQ Prism QMSOneSevenTwoFive + syn keyword mfConstant QMSOneSevenZeroZero QMSTwoFourTwoFive RicohA + syn keyword mfConstant RicohFortyEighty RicohFourZeroEightZero RicohLP + syn keyword mfConstant SparcPrinter StarNLOneZero VAXstation VTSix + syn keyword mfConstant VarityperFiveZeroSixZeroW + syn keyword mfConstant VarityperFourThreeZeroZeroHi + syn keyword mfConstant VarityperFourThreeZeroZeroLo + syn keyword mfConstant VarityperFourTwoZeroZero VarityperSixZeroZero + syn keyword mfConstant XeroxDocutech XeroxEightSevenNineZero + syn keyword mfConstant XeroxFourZeroFiveZero XeroxNineSevenZeroZero + syn keyword mfConstant XeroxPhaserSixTwoZeroZeroDP XeroxThreeSevenZeroZero + syn keyword mfConstant Xerox_world agfafzz agfatfzz amiga aps apssixhi + syn keyword mfConstant aselect atariezf atarinf atarins atariotf bitgraph + syn keyword mfConstant bjtenex bjtzzex bjtzzl bjtzzs boise canonbjc + syn keyword mfConstant canonex canonlbp cg cgl cgnszz citohtoz corona crs + syn keyword mfConstant cthreeten cx datadisc declarge decsmall deskjet + syn keyword mfConstant docutech dover dp dpdfezzz eighthre elvira epscszz + syn keyword mfConstant epsdraft epsdrft epsdrftl epsfast epsfastl epshi + syn keyword mfConstant epslo epsmed epsmedl epson epsonact epsonfx epsonl + syn keyword mfConstant epsonlo epsonlol epsonlq epsonsq epstylus epstylwr + syn keyword mfConstant epstyplo epstypmd epstypml epstypro epswlo epswlol + syn keyword mfConstant esphi fourfour gpx gtfax gtfaxhi gtfaxl gtfaxlo + syn keyword mfConstant gtfaxlol help hifax highfax hplaser hprugged ibm_a + syn keyword mfConstant ibmd ibmega ibmegal ibmfzon ibmfztn ibmpp ibmppl + syn keyword mfConstant ibmsoff ibmteot ibmtetz ibmtont ibmtosn ibmtosnl + syn keyword mfConstant ibmvga ibx imagen imagewriter itoh itohl itohtoz + syn keyword mfConstant itohtozl iw jetiiisi kyocera laserjet laserjetfive + syn keyword mfConstant laserjetfivemp laserjetfour laserjetfourthousand + syn keyword mfConstant laserjetfourzerozerozero laserjethi laserjetlo + syn keyword mfConstant laserjettwoonezerozero + syn keyword mfConstant laserjettwoonezerozerofastres lasermaster + syn keyword mfConstant laserwriter lasf lexmarkr lexmarks lexmarku + syn keyword mfConstant linohalf linohi linolo linolttz linoone linosuper + syn keyword mfConstant linothree linothreelo linotzzh ljfive ljfivemp + syn keyword mfConstant ljfour ljfzzz ljfzzzfr ljlo ljtozz ljtozzfr lmaster + syn keyword mfConstant lnotr lnzo lps lpstz lqhires lqlores lqmed lqmedl + syn keyword mfConstant lqmedres lview lviewl lwpro macmag mactrue modes_mf + syn keyword mfConstant ncd nec nechi neclm nectzo newdd newddl nexthi + syn keyword mfConstant nextscreen nextscrn nineone nullmode ocessfz + syn keyword mfConstant okidata okidatal okifourten okifte okihi onetz + syn keyword mfConstant onezz pcprevw pcscreen phaser phaserfs phasertf + syn keyword mfConstant phasertfl phasertl pixpt printware prntware + syn keyword mfConstant proprinter qms qmsesz qmsostf qmsoszz qmstftf ricoh + syn keyword mfConstant ricoha ricohlp ricohsp sherpa sparcptr starnlt + syn keyword mfConstant starnltl styletwo stylewr stylewri stylewriter sun + syn keyword mfConstant supre swtwo toshiba ultre varityper vs vtftzz + syn keyword mfConstant vtftzzhi vtftzzlo vtfzszw vtszz xpstzz xpstzzl + syn keyword mfConstant xrxesnz xrxfzfz xrxnszz xrxtszz + syn keyword mfDef BCPL_string coding_scheme font_face_byte + syn keyword mfDef font_family landscape + syn keyword mfDef mode_extra_info mode_help mode_param + syn keyword mfNewInternal blacker_min endif " Some other basic macro names, e.g., from cmbase, logo, etc. -if !exists("other_mf_macros") - let other_mf_macros = 1 " Set this to '0' if your code gets too colourful - " metapost.vim does so to turn off Metafont macros -endif -if other_mf_macros - syn keyword mfMacro beginlogochar +if get(g:, "other_mf_macros", 1) + syn keyword mfDef beginlogochar + syn keyword mfDef font_setup + syn keyword mfPrimitive generate endif " Numeric tokens -syn match mfNumeric "[-]\=\d\+" -syn match mfNumeric "[-]\=\.\d\+" -syn match mfNumeric "[-]\=\d\+\.\d\+" +syn match mfNumeric "[-]\=\d\+" +syn match mfNumeric "[-]\=\.\d\+" +syn match mfNumeric "[-]\=\d\+\.\d\+" -" Metafont lengths -syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" -syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" -syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" -syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" - -" Metafont coordinates and points -syn match mfCoord "\<[xy]\d\+\>" -syn match mfPoint "\<z\d\+\>" +" METAFONT lengths +syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" +syn match mfLength "[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" +syn match mfLength "[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" +syn match mfLength "[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=" " String constants -syn region mfString start=+"+ end=+"+ +syn match mfOpenString /"[^"]*/ +syn region mfString oneline keepend start=+"+ end=+"+ " Comments: -syn match mfComment "%.*$" +syn keyword mfTodoComment contained TODO FIXME XXX DEBUG NOTE +syn match mfComment "%.*$" contains=mfTodoComment,@Spell " synchronizing syn sync maxlines=50 " 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_mf_syntax_inits") - if version < 508 - let did_mf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink mfBoolExp Statement - HiLink mfNumExp Statement - HiLink mfInternal Identifier - HiLink mfPairExp Statement - HiLink mfPathExp Statement - HiLink mfPenExp Statement - HiLink mfPicExp Statement - HiLink mfStringExp Statement - HiLink mfCommand Statement - HiLink mfType Type - HiLink mfStatement Statement - HiLink mfDefinition Statement - HiLink mfCondition Conditional - HiLink mfPrimitive Statement - HiLink mfMacro Macro - HiLink mfCoord Identifier - HiLink mfPoint Identifier - HiLink mfNumeric Number - HiLink mfLength Number - HiLink mfComment Comment - HiLink mfString String - - delcommand HiLink -endif +hi def link mfBoolExp Statement +hi def link mfNumExp Statement +hi def link mfPairExp Statement +hi def link mfPathExp Statement +hi def link mfPenExp Statement +hi def link mfPicExp Statement +hi def link mfStringExp Statement +hi def link mfInternal Identifier +hi def link mfCommand Statement +hi def link mfType Type +hi def link mfStatement Statement +hi def link mfDefinition Statement +hi def link mfCondition Conditional +hi def link mfPrimitive Statement +hi def link mfDef Function +hi def link mfVardef mfDef +hi def link mfPrimaryDef mfDef +hi def link mfSecondaryDef mfDef +hi def link mfTertiaryDef mfDef +hi def link mfCoord Identifier +hi def link mfPoint Identifier +hi def link mfNumeric Number +hi def link mfLength Number +hi def link mfComment Comment +hi def link mfString String +hi def link mfOpenString Todo +hi def link mfSuffixParam Label +hi def link mfNewInternal mfInternal +hi def link mfVariable Identifier +hi def link mfConstant Constant +hi def link mfTodoComment Todo let b:current_syntax = "mf" -" vim: ts=8 +" vim:sw=2 diff --git a/runtime/syntax/mgl.vim b/runtime/syntax/mgl.vim index 55ae137f2f..f7bc617f5a 100644 --- a/runtime/syntax/mgl.vim +++ b/runtime/syntax/mgl.vim @@ -6,9 +6,8 @@ " " $Id: mgl.vim,v 1.1 2006/02/21 22:08:20 vimboss Exp $ " -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 @@ -84,43 +83,33 @@ syn keyword mglPredefined exception " 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_mgl_syn_inits") - if version < 508 - let did_mgl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink mglBoolean Boolean - HiLink mglComment Comment - HiLink mglConditional Conditional - HiLink mglConstant Constant - HiLink mglException Exception - HiLink mglFunction Function - HiLink mglLabel Label - HiLink mglMatrixDelimiter Identifier - HiLink mglNumber Number - HiLink mglHexNumber Number - HiLink mglCharacter Number - HiLink mglIpAddr Number - HiLink mglOperator Operator - HiLink mglPredefined mglFunction - HiLink mglPreProc PreProc - HiLink mglRepeat Repeat - HiLink mglStatement Statement - HiLink mglString String - HiLink mglStringEscape Special - HiLink mglStringEscapeGPC Special - HiLink mglStringError Error - HiLink mglStruct mglStatement - HiLink mglSymbolOperator mglOperator - HiLink mglType Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link mglBoolean Boolean +hi def link mglComment Comment +hi def link mglConditional Conditional +hi def link mglConstant Constant +hi def link mglException Exception +hi def link mglFunction Function +hi def link mglLabel Label +hi def link mglMatrixDelimiter Identifier +hi def link mglNumber Number +hi def link mglHexNumber Number +hi def link mglCharacter Number +hi def link mglIpAddr Number +hi def link mglOperator Operator +hi def link mglPredefined mglFunction +hi def link mglPreProc PreProc +hi def link mglRepeat Repeat +hi def link mglStatement Statement +hi def link mglString String +hi def link mglStringEscape Special +hi def link mglStringEscapeGPC Special +hi def link mglStringError Error +hi def link mglStruct mglStatement +hi def link mglSymbolOperator mglOperator +hi def link mglType Type + let b:current_syntax = "mgl" diff --git a/runtime/syntax/mgp.vim b/runtime/syntax/mgp.vim index 76b96612e2..7227804550 100644 --- a/runtime/syntax/mgp.vim +++ b/runtime/syntax/mgp.vim @@ -10,11 +10,8 @@ " SPAM is _NOT_ welcome - be ready to be reported! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -48,36 +45,25 @@ syn match mgpNoDefault +^%nodefault$+ " 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_mgp_syn_inits") - let did_mgp_syn_inits = 1 - if version < 508 - let did_mgp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink mgpLineSkip Special +hi def link mgpLineSkip Special - HiLink mgpHash mgpComment - HiLink mgpPercent mgpComment - HiLink mgpComment Comment +hi def link mgpHash mgpComment +hi def link mgpPercent mgpComment +hi def link mgpComment Comment - HiLink mgpCommand Identifier +hi def link mgpCommand Identifier - HiLink mgpLine Type +hi def link mgpLine Type - HiLink mgpFile String - HiLink mgpSize Number - HiLink mgpValue Number +hi def link mgpFile String +hi def link mgpSize Number +hi def link mgpValue Number - HiLink mgpPage mgpDefine - HiLink mgpNoDefault mgpDefine - HiLink mgpDefine Define +hi def link mgpPage mgpDefine +hi def link mgpNoDefault mgpDefine +hi def link mgpDefine Define - delcommand HiLink -endif let b:current_syntax = "mgp" diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim index c63beb1195..0683adc573 100644 --- a/runtime/syntax/mma.vim +++ b/runtime/syntax/mma.vim @@ -35,9 +35,8 @@ " fix nesting " finish populating popular symbols -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 @@ -283,47 +282,38 @@ syntax sync fromstart "set foldnestmax=1 "set foldminlines=15 -if version >= 508 || !exists("did_mma_syn_inits") - if version < 508 - let did_mma_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " NOTE - the following links are not guaranteed to - " look good under all colorschemes. You might need to - " :so $VIMRUNTIME/syntax/hitest.vim and tweak these to - " look good in yours - - - HiLink mmaComment Comment - HiLink mmaCommentStar Comment - HiLink mmaFunctionComment Comment - HiLink mmaLooseQuote Comment - HiLink mmaGenericFunction Function - HiLink mmaVariable Identifier -" HiLink mmaSymbol Identifier - HiLink mmaOperator Operator - HiLink mmaPatternOp Operator - HiLink mmaPureFunction Operator - HiLink mmaString String - HiLink mmaCommentString String - HiLink mmaUnicode String - HiLink mmaMessage Type - HiLink mmaNumber Type - HiLink mmaPattern Type - HiLink mmaError Error - HiLink mmaFixme Error - HiLink mmaPatternError Error - HiLink mmaTodo Todo - HiLink mmaemPHAsis Special - HiLink mmaFunctionTitle Special - HiLink mmaMessageType Special - HiLink mmaItem Preproc - - delcommand HiLink -endif + +" NOTE - the following links are not guaranteed to +" look good under all colorschemes. You might need to +" :so $VIMRUNTIME/syntax/hitest.vim and tweak these to +" look good in yours + + +hi def link mmaComment Comment +hi def link mmaCommentStar Comment +hi def link mmaFunctionComment Comment +hi def link mmaLooseQuote Comment +hi def link mmaGenericFunction Function +hi def link mmaVariable Identifier +" hi def link mmaSymbol Identifier +hi def link mmaOperator Operator +hi def link mmaPatternOp Operator +hi def link mmaPureFunction Operator +hi def link mmaString String +hi def link mmaCommentString String +hi def link mmaUnicode String +hi def link mmaMessage Type +hi def link mmaNumber Type +hi def link mmaPattern Type +hi def link mmaError Error +hi def link mmaFixme Error +hi def link mmaPatternError Error +hi def link mmaTodo Todo +hi def link mmaemPHAsis Special +hi def link mmaFunctionTitle Special +hi def link mmaMessageType Special +hi def link mmaItem Preproc + let b:current_syntax = "mma" diff --git a/runtime/syntax/mmix.vim b/runtime/syntax/mmix.vim index 79ca781402..39e209336e 100644 --- a/runtime/syntax/mmix.vim +++ b/runtime/syntax/mmix.vim @@ -9,9 +9,8 @@ " Limitations: Comments must start with either % or // " (preferably %, Knuth-Style) -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 @@ -119,44 +118,34 @@ syn match mmixRegister "r[A-Z]" syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ " 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_mmix_syntax_inits") - if version < 508 - let did_mmix_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink mmixAt Type - HiLink mmixPseudo Type - HiLink mmixRegister Special - HiLink mmixSegments Type - - HiLink mmixLabel Special - HiLink mmixComment Comment - HiLink mmixOpcode Keyword - - HiLink hexNumber Number - HiLink decNumber Number - HiLink octNumber Number - - HiLink mmixString String - HiLink mmixChar String - - HiLink mmixType Type - HiLink mmixIdentifier Normal - HiLink mmixSpecialComment Comment - - " My default color overrides: - " hi mmixSpecialComment ctermfg=red - "hi mmixLabel ctermfg=lightcyan - " hi mmixType ctermbg=black ctermfg=brown - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link mmixAt Type +hi def link mmixPseudo Type +hi def link mmixRegister Special +hi def link mmixSegments Type + +hi def link mmixLabel Special +hi def link mmixComment Comment +hi def link mmixOpcode Keyword + +hi def link hexNumber Number +hi def link decNumber Number +hi def link octNumber Number + +hi def link mmixString String +hi def link mmixChar String + +hi def link mmixType Type +hi def link mmixIdentifier Normal +hi def link mmixSpecialComment Comment + +" My default color overrides: +" hi mmixSpecialComment ctermfg=red +"hi mmixLabel ctermfg=lightcyan +" hi mmixType ctermbg=black ctermfg=brown + let b:current_syntax = "mmix" diff --git a/runtime/syntax/mmp.vim b/runtime/syntax/mmp.vim index 0117e77925..d0b9f7cfb5 100644 --- a/runtime/syntax/mmp.vim +++ b/runtime/syntax/mmp.vim @@ -5,11 +5,8 @@ " URL: http://ronware.org/wiki/vim/mmp " Filetypes: *.mmp -" 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 @@ -34,8 +31,7 @@ syn match mmpNumber "0x\x\+" " 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 +" Only when an item doesn't have highlighting yet if !exists("did_mmp_syntax_inits") let did_mmp_syntax_inits=1 diff --git a/runtime/syntax/modsim3.vim b/runtime/syntax/modsim3.vim index 04e9ab9ab6..ce35033402 100644 --- a/runtime/syntax/modsim3.vim +++ b/runtime/syntax/modsim3.vim @@ -12,10 +12,8 @@ " " very basic things only (based on the modula2 and c files). -if version < 600 - " Remove any old syntax stuff hanging around - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -77,31 +75,21 @@ syn region modsim3String start=+"+ end=+"+ syn match modsim3Literal "'[^']'\|''''" " 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_modsim3_syntax_inits") - if version < 508 - let did_modsim3_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink modsim3Keyword Statement - HiLink modsim3Block Statement - HiLink modsim3Comment1 Comment - HiLink modsim3Comment2 Comment - HiLink modsim3String String - HiLink modsim3Literal Character - HiLink modsim3Include Statement - HiLink modsim3Type Type - HiLink modsim3ParenError Error - HiLink modsim3Builtin Function - HiLink modsim3BuiltinNoParen Function - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link modsim3Keyword Statement +hi def link modsim3Block Statement +hi def link modsim3Comment1 Comment +hi def link modsim3Comment2 Comment +hi def link modsim3String String +hi def link modsim3Literal Character +hi def link modsim3Include Statement +hi def link modsim3Type Type +hi def link modsim3ParenError Error +hi def link modsim3Builtin Function +hi def link modsim3BuiltinNoParen Function + let b:current_syntax = "modsim3" diff --git a/runtime/syntax/modula2.vim b/runtime/syntax/modula2.vim index 3018900e80..4a14cf1f6f 100644 --- a/runtime/syntax/modula2.vim +++ b/runtime/syntax/modula2.vim @@ -4,11 +4,8 @@ " based on original work of Bram Moolenaar <Bram@vim.org> " Last Change: 2001 May 09 -" 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 @@ -54,32 +51,22 @@ syn region modula2String start="'" end="'" syn region modula2Set start="{" end="}" " 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_modula2_syntax_inits") - if version < 508 - let did_modula2_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink modula2Ident Identifier - HiLink modula2StdConst Boolean - HiLink modula2Type Identifier - HiLink modula2StdFunc Identifier - HiLink modula2Header Type - HiLink modula2Keyword Statement - HiLink modula2AttKeyword PreProc - HiLink modula2Comment Comment - " The following is just a matter of taste (you want to try this instead): - " hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold - HiLink modula2Todo Todo - HiLink modula2String String - HiLink modula2Set String +hi def link modula2Ident Identifier +hi def link modula2StdConst Boolean +hi def link modula2Type Identifier +hi def link modula2StdFunc Identifier +hi def link modula2Header Type +hi def link modula2Keyword Statement +hi def link modula2AttKeyword PreProc +hi def link modula2Comment Comment +" The following is just a matter of taste (you want to try this instead): +" hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold +hi def link modula2Todo Todo +hi def link modula2String String +hi def link modula2Set String - delcommand HiLink -endif let b:current_syntax = "modula2" diff --git a/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim index d6f72afbca..d9b89ca7ce 100644 --- a/runtime/syntax/modula3.vim +++ b/runtime/syntax/modula3.vim @@ -6,11 +6,8 @@ " Basic things only... " Based on the modula 2 syntax file -" 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 @@ -46,24 +43,14 @@ syn region modula3String start=+"+ end=+"+ syn region modula3String start=+'+ end=+'+ " 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_modula3_syntax_inits") - if version < 508 - let did_modula3_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default methods for highlighting. Can be overridden later - HiLink modula3Keyword Statement - HiLink modula3Block PreProc - HiLink modula3Comment Comment - HiLink modula3String String +" The default methods for highlighting. Can be overridden later +hi def link modula3Keyword Statement +hi def link modula3Block PreProc +hi def link modula3Comment Comment +hi def link modula3String String - delcommand HiLink -endif let b:current_syntax = "modula3" diff --git a/runtime/syntax/monk.vim b/runtime/syntax/monk.vim index afe2b56190..3af810173a 100644 --- a/runtime/syntax/monk.vim +++ b/runtime/syntax/monk.vim @@ -21,11 +21,8 @@ " Initializing: -" 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 @@ -60,11 +57,7 @@ syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT " R5RS Scheme Functions and Syntax: -if version < 600 - set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -else - setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -endif +setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword monkSyntax lambda and or if cond case define let let* letrec syn keyword monkSyntax begin do delay set! else => @@ -201,32 +194,22 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " 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_monk_syntax_inits") - if version < 508 - let did_monk_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink monkSyntax Statement - HiLink monkFunc Function - - HiLink monkString String - HiLink monkChar Character - HiLink monkNumber Number - HiLink monkBoolean Boolean - - HiLink monkDelimiter Delimiter - HiLink monkConstant Constant - - HiLink monkComment Comment - HiLink monkError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link monkSyntax Statement +hi def link monkFunc Function + +hi def link monkString String +hi def link monkChar Character +hi def link monkNumber Number +hi def link monkBoolean Boolean + +hi def link monkDelimiter Delimiter +hi def link monkConstant Constant + +hi def link monkComment Comment +hi def link monkError Error + let b:current_syntax = "monk" diff --git a/runtime/syntax/moo.vim b/runtime/syntax/moo.vim index 10c5d3b4bc..617058f8e3 100644 --- a/runtime/syntax/moo.vim +++ b/runtime/syntax/moo.vim @@ -4,8 +4,8 @@ " Last Change: 2001 Oct 06 " Note: Requires Vim 6.0 or above -" Quit when a syntax file was already loaded -if version < 600 || exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/mp.vim b/runtime/syntax/mp.vim index c0fd60b3da..95723d0d97 100644 --- a/runtime/syntax/mp.vim +++ b/runtime/syntax/mp.vim @@ -1,132 +1,765 @@ " Vim syntax file -" Language: MetaPost -" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> -" Last Change: April 30, 2001 - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" Language: MetaPost +" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> +" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: 2016 Oct 01 + +if exists("b:current_syntax") finish endif -let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost -let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither +let s:cpo_sav = &cpo +set cpo&vim + +if exists("g:plain_mf_macros") + let s:plain_mf_macros = g:plain_mf_macros +endif +if exists("g:plain_mf_modes") + let s:plain_mf_modes = g:plain_mf_modes +endif +if exists("g:other_mf_macros") + let s:other_mf_macros = g:other_mf_macros +endif + +let g:plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost +let g:plain_mf_modes = 0 " No METAFONT modes +let g:other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither + +" Read the METAFONT syntax to start with +runtime! syntax/mf.vim +unlet b:current_syntax " Necessary for syn include below -" Read the Metafont syntax to start with -if version < 600 - source <sfile>:p:h/mf.vim +" Restore the value of existing global variables +if exists("s:plain_mf_macros") + let g:plain_mf_macros = s:plain_mf_macros +else + unlet g:plain_mf_macros +endif +if exists("s:plain_mf_modes") + let g:plain_mf_modes = s:plain_mf_modes +else + unlet g:plain_mf_modes +endif +if exists("s:other_mf_macros") + let g:other_mf_macros = s:other_mf_macros else - runtime! syntax/mf.vim + unlet g:other_mf_macros endif -" MetaPost has TeX inserts for typeset labels -" verbatimtex, btex, and etex will be treated as keywords -syn match mpTeXbegin "\(verbatimtex\|btex\)" -syn match mpTeXend "etex" -syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend +" Use TeX highlighting inside verbatimtex/btex... etex +syn include @MPTeX syntax/tex.vim +unlet b:current_syntax +" These are defined as keywords rather than using matchgroup +" in order to make them available to syntaxcomplete. +syn keyword mpTeXdelim btex etex verbatimtex contained +syn region mpTeXinsert + \ start=/\<verbatimtex\>\|\<btex\>/rs=e+1 + \ end=/\<etex\>/re=s-1 keepend + \ contains=@MPTeX,mpTeXdelim -" MetaPost primitives not found in Metafont -syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont -syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak -syn keyword mpInternal prologues redpart setbounds tracinglostchars -syn keyword mpInternal truecorners ulcorner urcorner withcolor +" iskeyword must be set after the syn include above, because tex.vim sets `syn +" iskeyword`. Note that keywords do not contain numbers (numbers are +" subscripts) +syntax iskeyword @,_ -" Metafont primitives not found in MetaPost -syn keyword notDefined autorounding chardx chardy fillin granularity hppp -syn keyword notDefined proofing smoothing tracingedges tracingpens -syn keyword notDefined turningcheck vppp xoffset yoffset +" MetaPost primitives not found in METAFONT +syn keyword mpBoolExp bounded clipped filled stroked textual arclength +syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart +syn keyword mpNumExp fontsize greenpart greypart magentapart redpart +syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner +" envelope is seemingly undocumented, but it exists since mpost 1.003. +" The syntax is: envelope <polygonal pen> of <path primary>. For example, +" path p; +" p := envelope pensquare of (up--left); +" (Thanks to Daniel H. Luecking for the example!) +syn keyword mpPathExp envelope pathpart +syn keyword mpPenExp penpart +syn keyword mpPicExp dashpart glyph infont +syn keyword mpStringExp fontpart readfrom textpart +syn keyword mpType cmykcolor color rgbcolor +" Other MetaPost primitives listed in the manual +syn keyword mpPrimitive mpxbreak within +" Internal quantities not found in METAFONT +" (Table 6 in MetaPost: A User's Manual) +syn keyword mpInternal defaultcolormodel hour minute linecap linejoin +syn keyword mpInternal miterlimit mpprocset mpversion numberprecision +syn keyword mpInternal numbersystem outputfilename outputformat +syn keyword mpInternal outputformatoptions outputtemplate prologues +syn keyword mpInternal restoreclipcolor tracinglostchars troffmode +syn keyword mpInternal truecorners +" List of commands not found in METAFONT (from MetaPost: A User's Manual) +syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile +syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor +syn keyword mpCommand withgreyscale withoutcolor withpostscript +syn keyword mpCommand withprescript withrgbcolor write +" METAFONT internal variables not found in MetaPost +syn keyword notDefined autorounding chardx chardy fillin granularity +syn keyword notDefined proofing smoothing tracingedges tracingpens +syn keyword notDefined turningcheck xoffset yoffset +" Suffix defined only in METAFONT: +syn keyword notDefined nodot +" Other not implemented primitives (see MetaPost: A User's Manual, §C.1) +syn keyword notDefined cull display openwindow numspecial totalweight +syn keyword notDefined withweight " Keywords defined by plain.mp -if !exists("plain_mp_macros") - let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful -endif -if plain_mp_macros - syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig - syn keyword mpMacro beveled black blue buildcycle butt center cutafter - syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen - syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow - syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig - syn keyword mpMacro green label labeloffset mitered red rounded squared - syn keyword mpMacro thelabel white base_name base_version - syn keyword mpMacro upto downto exitunless relax gobble gobbled - syn keyword mpMacro interact loggingall tracingall tracingnone - syn keyword mpMacro eps epsilon infinity right left up down origin - syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity - syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor - syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector - syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod - syn keyword mpMacro takepower direction directionpoint intersectionpoint - syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround - syn keyword mpMacro rotatedabout min max flex superellipse interpath - syn keyword mpMacro magstep currentpen currentpen_path currentpicture - syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw - syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup - syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen - syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt - syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel - syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup - syn keyword mpMacro shipit bye hide stop solve +if get(g:, "plain_mp_macros", 1) || get(g:, "mp_metafun_macros", 0) + syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen + syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow + syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase + syn keyword mpDef exitunless fill filldraw flex gobble hide interact + syn keyword mpDef label loggingall makelabel numtok penstroke pickup + syn keyword mpDef range reflectedabout rotatedaround shipit + syn keyword mpDef stop superellipse takepower tracingall tracingnone + syn keyword mpDef undraw undrawdot unfill unfilldraw upto + syn match mpDef "???" + syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center + syn keyword mpVardef counterclockwise decr dir direction directionpoint + syn keyword mpVardef dotlabel dotlabels image incr interpath inverse + syn keyword mpVardef labels lft magstep max min penlabels penpos round + syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector + syn keyword mpVardef whatever z + syn keyword mpPrimaryDef div dotprod gobbled mod + syn keyword mpSecondaryDef intersectionpoint + syn keyword mpTertiaryDef cutafter cutbefore softjoin thru + syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen + syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity + syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft + syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance + " Predefined constants + syn keyword mpConstant EOF background base_name base_version black + syn keyword mpConstant blankpicture blue ditto down evenly fullcircle + syn keyword mpConstant green halfcircle identity left origin penrazor + syn keyword mpConstant penspeck pensquare quartercircle red right + syn keyword mpConstant unitsquare up white withdots + " Other predefined variables + syn keyword mpVariable currentpen currentpen_path currentpicture cuttings + syn keyword mpVariable defaultfont extra_beginfig extra_endfig + syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\>/ + syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\>/ + " let statements: + syn keyword mpnumExp abs + syn keyword mpDef rotatedabout + syn keyword mpCommand bye relax + " on and off are not technically keywords, but it is nice to highlight them + " inside dashpattern(). + syn keyword mpOnOff off on contained + syn keyword mpDash dashpattern contained + syn region mpDashPattern + \ start="dashpattern\s*" + \ end=")"he=e-1 + \ contains=mfNumeric,mfLength,mpOnOff,mpDash endif " Keywords defined by mfplain.mp -if !exists("mfplain_mp_macros") - let mfplain_mp_macros = 0 " Set this to '1' to include these macro names -endif -if mfplain_mp_macros - syn keyword mpMacro beginchar blacker capsule_def change_width - syn keyword mpMacro define_blacker_pixels define_corrected_pixels - syn keyword mpMacro define_good_x_pixels define_good_y_pixels - syn keyword mpMacro define_horizontal_corrected_pixels - syn keyword mpMacro define_pixels define_whole_blacker_pixels - syn keyword mpMacro define_whole_vertical_blacker_pixels - syn keyword mpMacro define_whole_vertical_pixels endchar - syn keyword mpMacro extra_beginchar extra_endchar extra_setup - syn keyword mpMacro font_coding_scheme font_extra_space font_identifier - syn keyword mpMacro font_normal_shrink font_normal_space - syn keyword mpMacro font_normal_stretch font_quad font_size - syn keyword mpMacro font_slant font_x_height italcorr labelfont - syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup - syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode - +if get(g:, "mfplain_mp_macros", 0) + syn keyword mpDef beginchar capsule_def change_width + syn keyword mpDef define_blacker_pixels define_corrected_pixels + syn keyword mpDef define_good_x_pixels define_good_y_pixels + syn keyword mpDef define_horizontal_corrected_pixels define_pixels + syn keyword mpDef define_whole_blacker_pixels define_whole_pixels + syn keyword mpDef define_whole_vertical_blacker_pixels + syn keyword mpDef define_whole_vertical_pixels endchar + syn keyword mpDef font_coding_scheme font_extra_space font_identifier + syn keyword mpDef font_normal_shrink font_normal_space + syn keyword mpDef font_normal_stretch font_quad font_size font_slant + syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox + syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule + syn keyword mpDef smode + syn keyword mpVardef hround proofrulethickness vround + syn keyword mpNewInternal blacker o_correction + syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen " plus some no-ops, also from mfplain.mp - syn keyword mpMacro cullit currenttransform gfcorners grayfont hround - syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit - syn keyword mpMacro proofoffset screenchars screenrule screenstrokes - syn keyword mpMacro showit slantfont titlefont unitpixel vround + syn keyword mpDef cull cullit gfcorners imagerules nodisplays + syn keyword mpDef notransforms openit proofoffset screenchars + syn keyword mpDef screenrule screenstrokes showit + syn keyword mpVardef grayfont slantfont titlefont + syn keyword mpVariable currenttransform + syn keyword mpConstant unitpixel + " These are not listed in the MetaPost manual, and some are ignored by + " MetaPost, but are nonetheless defined in mfplain.mp + syn keyword mpDef killtext + syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\>" + syn keyword mpVariable aspect_ratio localfont mag mode mode_name + syn keyword mpVariable proofcolor + syn keyword mpConstant lowres proof smoke + syn keyword mpNewInternal autorounding bp_per_pixel granularity + syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck endif -" Keywords defined by other macro packages, e.g., boxes.mp -if !exists("other_mp_macros") - let other_mp_macros = 1 " Set this to '0' if your source gets too colourful -endif -if other_mp_macros - syn keyword mpMacro circmargin defaultdx defaultdy - syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes - syn keyword mpMacro drawunboxed fixpos fixsize pic +" Keywords defined by all base macro packages: +" - (r)boxes.mp +" - format.mp +" - graph.mp +" - marith.mp +" - sarith.mp +" - string.mp +" - TEX.mp +if get(g:, "other_mp_macros", 1) + " boxes and rboxes + syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed + syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius + syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare + syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix + " format + syn keyword mpVardef Mformat format init_numbers roundd + syn keyword mpVariable Fe_base Fe_plus + syn keyword mpConstant Ten_to + " graph + syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata + syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot + syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick + syn keyword mpVardef otick + syn keyword mpVardef Mreadpath setcoords setrange + syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log + syn keyword mpVariable Autoform Gemarks Glmarks Gumarks + syn keyword mpConstant Gtemplate + syn match mpVariable /Gmargin\.\%(low\|high\)/ + " marith + syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str + syn keyword mpPrimaryDef Mdiv Mmul + syn keyword mpSecondaryDef Madd Msub + syn keyword mpTertiaryDef Mleq + syn keyword mpNewInternal Mten Mzero + " sarith + syn keyword mpVardef Sabs Scvnum + syn keyword mpPrimaryDef Sdiv Smul + syn keyword mpSecondaryDef Sadd Ssub + syn keyword mpTertiaryDef Sleq Sneq + " string + syn keyword mpVardef cspan isdigit loptok + " TEX + syn keyword mpVardef TEX TEXPOST TEXPRE endif +" Up to date as of 23-Sep-2016. +if get(g:, "mp_metafun_macros", 0) + " These keywords have been added manually. + syn keyword mpPrimitive runscript + + " The following MetaFun keywords have been extracted automatically from + " ConTeXt source code. They include all "public" macros (where a macro is + " considered public if and only if it does not start with _, mfun_, mlib_, or + " do_, and it does not end with _), all "public" unsaved variables, and all + " `let` statements. + + " mp-abck.mpiv + syn keyword mpDef abck_grid_line anchor_box box_found boxfilloptions + syn keyword mpDef boxgridoptions boxlineoptions draw_multi_pars + syn keyword mpDef draw_multi_side draw_multi_side_path freeze_box + syn keyword mpDef initialize_box initialize_box_pos + syn keyword mpDef multi_side_draw_options show_multi_kind + syn keyword mpDef show_multi_pars + syn keyword mpVardef abck_baseline_grid abck_draw_path abck_graphic_grid + syn keyword mpVariable boxdashtype boxfilloffset boxfilltype + syn keyword mpVariable boxgriddirection boxgriddistance boxgridshift + syn keyword mpVariable boxgridtype boxgridwidth boxlineoffset + syn keyword mpVariable boxlineradius boxlinetype boxlinewidth multikind + syn keyword mpConstant context_abck + " mp-apos.mpiv + syn keyword mpDef anch_sidebars_draw boxfilloptions boxlineoptions + syn keyword mpDef connect_positions + syn keyword mpConstant context_apos + " mp-asnc.mpiv + syn keyword mpDef FlushSyncTasks ProcessSyncTask ResetSyncTasks + syn keyword mpDef SetSyncColor SetSyncThreshold SyncTask + syn keyword mpVardef PrepareSyncTasks SyncBox TheSyncColor + syn keyword mpVardef TheSyncThreshold + syn keyword mpVariable CurrentSyncClass NOfSyncPaths SyncColor + syn keyword mpVariable SyncLeftOffset SyncPaths SyncTasks SyncThreshold + syn keyword mpVariable SyncThresholdMethod SyncWidth + syn keyword mpConstant context_asnc + " mp-back.mpiv + syn keyword mpDef some_double_back some_hash + syn keyword mpVariable back_nillcolor + syn keyword mpConstant context_back + " mp-bare.mpiv + syn keyword mpVardef colordecimals rawtextext + syn keyword mpPrimaryDef infont + syn keyword mpConstant context_bare + " mp-base.mpiv + " This is essentially plain.mp with only a few keywords added + syn keyword mpNumExp graypart + syn keyword mpType graycolor greycolor + syn keyword mpConstant cyan magenta yellow + " mp-butt.mpiv + syn keyword mpDef predefinedbutton some_button + syn keyword mpConstant context_butt + " mp-char.mpiv + syn keyword mpDef flow_begin_chart flow_begin_sub_chart + syn keyword mpDef flow_chart_draw_comment flow_chart_draw_exit + syn keyword mpDef flow_chart_draw_label flow_chart_draw_text + syn keyword mpDef flow_clip_chart flow_collapse_points + syn keyword mpDef flow_connect_bottom_bottom flow_connect_bottom_left + syn keyword mpDef flow_connect_bottom_right flow_connect_bottom_top + syn keyword mpDef flow_connect_left_bottom flow_connect_left_left + syn keyword mpDef flow_connect_left_right flow_connect_left_top + syn keyword mpDef flow_connect_right_bottom flow_connect_right_left + syn keyword mpDef flow_connect_right_right flow_connect_right_top + syn keyword mpDef flow_connect_top_bottom flow_connect_top_left + syn keyword mpDef flow_connect_top_right flow_connect_top_top + syn keyword mpDef flow_draw_connection flow_draw_connection_point + syn keyword mpDef flow_draw_midpoint flow_draw_shape + syn keyword mpDef flow_draw_test_area flow_draw_test_shape + syn keyword mpDef flow_draw_test_shapes flow_end_chart + syn keyword mpDef flow_end_sub_chart flow_flush_connections + syn keyword mpDef flow_flush_picture flow_flush_pictures + syn keyword mpDef flow_flush_shape flow_flush_shapes + syn keyword mpDef flow_initialize_grid flow_new_chart flow_new_shape + syn keyword mpDef flow_scaled_to_grid flow_show_connection + syn keyword mpDef flow_show_connections flow_show_shapes + syn keyword mpDef flow_xy_offset flow_y_pos + syn keyword mpVardef flow_connection_path flow_down_on_grid + syn keyword mpVardef flow_down_to_grid flow_i_point flow_left_on_grid + syn keyword mpVardef flow_left_to_grid flow_offset + syn keyword mpVardef flow_points_initialized flow_right_on_grid + syn keyword mpVardef flow_right_to_grid flow_smooth_connection + syn keyword mpVardef flow_trim_points flow_trimmed flow_up_on_grid + syn keyword mpVardef flow_up_to_grid flow_valid_connection + syn keyword mpVardef flow_x_on_grid flow_xy_bottom flow_xy_left + syn keyword mpVardef flow_xy_on_grid flow_xy_right flow_xy_top + syn keyword mpVardef flow_y_on_grid + syn keyword mpVariable flow_arrowtip flow_chart_background_color + syn keyword mpVariable flow_chart_offset flow_comment_offset + syn keyword mpVariable flow_connection_arrow_size + syn keyword mpVariable flow_connection_dash_size + syn keyword mpVariable flow_connection_line_color + syn keyword mpVariable flow_connection_line_width + syn keyword mpVariable flow_connection_smooth_size flow_connections + syn keyword mpVariable flow_cpath flow_dash_pattern flow_dashline + syn keyword mpVariable flow_exit_offset flow_forcevalid flow_grid_height + syn keyword mpVariable flow_grid_width flow_label_offset flow_max_x + syn keyword mpVariable flow_max_y flow_peepshape flow_reverse_connection + syn keyword mpVariable flow_reverse_y flow_shape_action flow_shape_archive + syn keyword mpVariable flow_shape_decision flow_shape_down + syn keyword mpVariable flow_shape_fill_color flow_shape_height + syn keyword mpVariable flow_shape_left flow_shape_line_color + syn keyword mpVariable flow_shape_line_width flow_shape_loop + syn keyword mpVariable flow_shape_multidocument flow_shape_node + syn keyword mpVariable flow_shape_procedure flow_shape_product + syn keyword mpVariable flow_shape_right flow_shape_singledocument + syn keyword mpVariable flow_shape_subprocedure flow_shape_up + syn keyword mpVariable flow_shape_wait flow_shape_width + syn keyword mpVariable flow_show_all_points flow_show_con_points + syn keyword mpVariable flow_show_mid_points flow_showcrossing flow_smooth + syn keyword mpVariable flow_touchshape flow_xypoint flow_zfactor + syn keyword mpConstant context_flow + " mp-chem.mpiv + syn keyword mpDef chem_init_all chem_reset chem_start_structure + syn keyword mpDef chem_transformed + syn keyword mpVardef chem_ad chem_adj chem_align chem_arrow chem_au + syn keyword mpVardef chem_b chem_bb chem_bd chem_bw chem_c chem_cc + syn keyword mpVardef chem_ccd chem_cd chem_crz chem_cz chem_dash chem_db + syn keyword mpVardef chem_diff chem_dir chem_do chem_dr chem_draw + syn keyword mpVardef chem_drawarrow chem_eb chem_ed chem_ep chem_er + syn keyword mpVardef chem_es chem_et chem_fill chem_hb chem_init_some + syn keyword mpVardef chem_label chem_ldb chem_ldd chem_line chem_lr + syn keyword mpVardef chem_lrb chem_lrbd chem_lrd chem_lrh chem_lrn + syn keyword mpVardef chem_lrt chem_lrz chem_lsr chem_lsub chem_mark + syn keyword mpVardef chem_marked chem_mid chem_mids chem_midz chem_mir + syn keyword mpVardef chem_mov chem_move chem_number chem_oe chem_off + syn keyword mpVardef chem_pb chem_pe chem_r chem_r_fragment chem_rb + syn keyword mpVardef chem_rbd chem_rd chem_rdb chem_rdd chem_restore + syn keyword mpVardef chem_rh chem_rm chem_rn chem_rot chem_rr chem_rrb + syn keyword mpVardef chem_rrbd chem_rrd chem_rrh chem_rrn chem_rrt + syn keyword mpVardef chem_rrz chem_rsr chem_rsub chem_rt chem_rz chem_s + syn keyword mpVardef chem_save chem_sb chem_sd chem_set chem_sr chem_ss + syn keyword mpVardef chem_start_component chem_stop_component + syn keyword mpVardef chem_stop_structure chem_sub chem_symbol chem_tb + syn keyword mpVardef chem_text chem_z chem_zln chem_zlt chem_zn chem_zrn + syn keyword mpVardef chem_zrt chem_zt + syn keyword mpVariable chem_mark_pair chem_stack_mirror chem_stack_origin + syn keyword mpVariable chem_stack_p chem_stack_previous + syn keyword mpVariable chem_stack_rotation chem_trace_boundingbox + syn keyword mpVariable chem_trace_nesting chem_trace_text + syn keyword mpConstant context_chem + " mp-core.mpiv + syn keyword mpDef FlushSyncTasks ProcessSyncTask + syn keyword mpDef RegisterLocalTextArea RegisterPlainTextArea + syn keyword mpDef RegisterRegionTextArea RegisterTextArea + syn keyword mpDef ResetLocalTextArea ResetSyncTasks ResetTextAreas + syn keyword mpDef SaveTextAreas SetSyncColor SetSyncThreshold + syn keyword mpDef SyncTask anchor_box box_found boxfilloptions + syn keyword mpDef boxgridoptions boxlineoptions collapse_multi_pars + syn keyword mpDef draw_box draw_multi_pars draw_par freeze_box + syn keyword mpDef initialize_area initialize_area_par initialize_box + syn keyword mpDef initialize_box_pos initialize_par + syn keyword mpDef prepare_multi_pars relocate_multipars save_multipar + syn keyword mpDef set_par_line_height show_multi_pars show_par + syn keyword mpDef simplify_multi_pars sort_multi_pars + syn keyword mpVardef InsideSavedTextArea InsideSomeSavedTextArea + syn keyword mpVardef InsideSomeTextArea InsideTextArea PrepareSyncTasks + syn keyword mpVardef SyncBox TextAreaH TextAreaW TextAreaWH TextAreaX + syn keyword mpVardef TextAreaXY TextAreaY TheSyncColor TheSyncThreshold + syn keyword mpVardef baseline_grid graphic_grid multi_par_at_top + syn keyword mpVariable CurrentSyncClass NOfSavedTextAreas + syn keyword mpVariable NOfSavedTextColumns NOfSyncPaths NOfTextAreas + syn keyword mpVariable NOfTextColumns PlainTextArea RegionTextArea + syn keyword mpVariable SavedTextColumns SyncColor SyncLeftOffset SyncPaths + syn keyword mpVariable SyncTasks SyncThreshold SyncThresholdMethod + syn keyword mpVariable SyncWidth TextAreas TextColumns + syn keyword mpVariable auto_multi_par_hsize boxdashtype boxfilloffset + syn keyword mpVariable boxfilltype boxgriddirection boxgriddistance + syn keyword mpVariable boxgridshift boxgridtype boxgridwidth boxlineradius + syn keyword mpVariable boxlinetype boxlinewidth check_multi_par_chain + syn keyword mpVariable compensate_multi_par_topskip + syn keyword mpVariable enable_multi_par_fallback force_multi_par_chain + syn keyword mpVariable ignore_multi_par_page last_multi_par_shift lefthang + syn keyword mpVariable local_multi_par_area multi_column_first_page_hack + syn keyword mpVariable multi_par_pages multiloc multilocs multipar + syn keyword mpVariable multipars multiref multirefs nofmultipars + syn keyword mpVariable obey_multi_par_hang obey_multi_par_more + syn keyword mpVariable one_piece_multi_par par_hang_after par_hang_indent + syn keyword mpVariable par_indent par_left_skip par_line_height + syn keyword mpVariable par_right_skip par_start_pos par_stop_pos + syn keyword mpVariable par_strut_depth par_strut_height ppos righthang + syn keyword mpVariable snap_multi_par_tops somehang span_multi_column_pars + syn keyword mpVariable use_multi_par_region + syn keyword mpConstant context_core + syn keyword LET anchor_area anchor_par draw_area + " mp-cows.mpiv + syn keyword mpConstant context_cows cow + " mp-crop.mpiv + syn keyword mpDef page_marks_add_color page_marks_add_lines + syn keyword mpDef page_marks_add_marking page_marks_add_number + syn keyword mpVardef crop_color crop_gray crop_marks_cmyk + syn keyword mpVardef crop_marks_cmykrgb crop_marks_gray crop_marks_lines + syn keyword mpVariable crop_colors more page + syn keyword mpConstant context_crop + " mp-figs.mpiv + syn keyword mpDef naturalfigure registerfigure + syn keyword mpVardef figuredimensions figureheight figuresize + syn keyword mpVardef figurewidth + syn keyword mpConstant context_figs + " mp-fobg.mpiv + syn keyword mpDef DrawFoFrame + syn keyword mpVardef equalpaths + syn keyword mpPrimaryDef inset outset + syn keyword mpVariable FoBackground FoBackgroundColor FoFrame FoLineColor + syn keyword mpVariable FoLineStyle FoLineWidth FoSplit + syn keyword mpConstant FoAll FoBottom FoDash FoDotted FoDouble FoGroove + syn keyword mpConstant FoHidden FoInset FoLeft FoMedium FoNoColor FoNone + syn keyword mpConstant FoOutset FoRidge FoRight FoSolid FoThick FoThin + syn keyword mpConstant FoTop context_fobg + " mp-form.mpiv + syn keyword mpConstant context_form + " mp-func.mpiv + syn keyword mpDef constructedfunction constructedpairs + syn keyword mpDef constructedpath curvedfunction curvedpairs + syn keyword mpDef curvedpath function pathconnectors straightfunction + syn keyword mpDef straightpairs straightpath + syn keyword mpConstant context_func + " mp-grap.mpiv + syn keyword mpDef Gfor OUT auto begingraph circles crosses diamonds + syn keyword mpDef downtriangles endgraph gdata gdraw gdrawarrow + syn keyword mpDef gdrawdblarrow gfill graph_addto + syn keyword mpDef graph_addto_currentpicture graph_comma + syn keyword mpDef graph_coordinate_multiplication graph_draw + syn keyword mpDef graph_draw_label graph_errorbar_text graph_fill + syn keyword mpDef graph_generate_exponents + syn keyword mpDef graph_generate_label_position + syn keyword mpDef graph_generate_numbers graph_label_location + syn keyword mpDef graph_scan_mark graph_scan_marks graph_setbounds + syn keyword mpDef graph_suffix graph_tick_label + syn keyword mpDef graph_with_pen_and_color graph_withlist + syn keyword mpDef graph_xyscale lefttriangles makefunctionpath plot + syn keyword mpDef plotsymbol points rainbow righttriangles smoothpath + syn keyword mpDef squares stars uptriangles witherrorbars + syn keyword mpVardef addtopath augment autogrid constant_fit + syn keyword mpVardef constant_function det escaped_format exp + syn keyword mpVardef exponential_fit exponential_function format + syn keyword mpVardef formatted frame functionpath gaussian_fit + syn keyword mpVardef gaussian_function gdotlabel glabel graph_Feform + syn keyword mpVardef graph_Meform graph_arrowhead_extent graph_bounds + syn keyword mpVardef graph_clear_bounds + syn keyword mpVardef graph_convert_user_path_to_internal graph_cspan + syn keyword mpVardef graph_draw_arrowhead graph_error graph_errorbars + syn keyword mpVardef graph_exp graph_factor_and_exponent_to_string + syn keyword mpVardef graph_gridline_picture graph_is_null + syn keyword mpVardef graph_label_convert_user_to_internal graph_loptok + syn keyword mpVardef graph_match_exponents graph_mlog + syn keyword mpVardef graph_modified_exponent_ypart graph_pair_adjust + syn keyword mpVardef graph_picture_conversion graph_post_draw + syn keyword mpVardef graph_read_line graph_readpath graph_remap + syn keyword mpVardef graph_scan_path graph_select_exponent_mark + syn keyword mpVardef graph_select_mark graph_set_bounds + syn keyword mpVardef graph_set_default_bounds graph_shapesize + syn keyword mpVardef graph_stash_label graph_tick_mark_spacing + syn keyword mpVardef graph_unknown_pair_bbox grid isdigit itick + syn keyword mpVardef linear_fit linear_function ln logten lorentzian_fit + syn keyword mpVardef lorentzian_function otick polynomial_fit + syn keyword mpVardef polynomial_function power_law_fit + syn keyword mpVardef power_law_function powten setcoords setrange + syn keyword mpVardef sortpath strfmt tick varfmt + syn keyword mpNewInternal Mzero doubleinfinity graph_log_minimum + syn keyword mpNewInternal graph_minimum_number_of_marks largestmantissa + syn keyword mpNewInternal linear lntwo log mlogten singleinfinity + syn keyword mpVariable Autoform determinant fit_chi_squared + syn keyword mpVariable graph_errorbar_picture graph_exp_marks + syn keyword mpVariable graph_frame_pair_a graph_frame_pair_b + syn keyword mpVariable graph_lin_marks graph_log_marks graph_modified_bias + syn keyword mpVariable graph_modified_higher graph_modified_lower + syn keyword mpVariable graph_shape r_s resistance_color resistance_name + syn keyword mpConstant context_grap + " mp-grid.mpiv + syn keyword mpDef hlingrid hloggrid vlingrid vloggrid + syn keyword mpVardef hlinlabel hlintext hlogtext linlin linlinpath + syn keyword mpVardef linlog linlogpath loglin loglinpath loglog + syn keyword mpVardef loglogpath processpath vlinlabel vlintext vlogtext + syn keyword mpVariable fmt_initialize fmt_pictures fmt_precision + syn keyword mpVariable fmt_separator fmt_zerocheck grid_eps + syn keyword mpConstant context_grid + " mp-grph.mpiv + syn keyword mpDef beginfig begingraphictextfig data_mpo_file + syn keyword mpDef data_mpy_file doloadfigure draw endfig + syn keyword mpDef endgraphictextfig fill fixedplace graphictext + syn keyword mpDef loadfigure new_graphictext normalwithshade number + syn keyword mpDef old_graphictext outlinefill protectgraphicmacros + syn keyword mpDef resetfig reversefill withdrawcolor withfillcolor + syn keyword mpDef withshade + syn keyword mpVariable currentgraphictext figureshift + syn keyword mpConstant context_grph + " mp-idea.mpiv + syn keyword mpVardef bcomponent ccomponent gcomponent mcomponent + syn keyword mpVardef rcomponent somecolor ycomponent + " mp-luas.mpiv + syn keyword mpDef luacall message + syn keyword mpVardef MP lua lualist + syn keyword mpConstant context_luas + " mp-mlib.mpiv + syn keyword mpDef autoalign bitmapimage circular_shade cmyk comment + syn keyword mpDef defineshade eofill eofillup externalfigure figure + syn keyword mpDef fillup label linear_shade multitonecolor namedcolor + syn keyword mpDef nofill onlayer passarrayvariable passvariable + syn keyword mpDef plain_label register resolvedcolor scantokens + syn keyword mpDef set_circular_vector set_linear_vector shaded + syn keyword mpDef spotcolor startpassingvariable stoppassingvariable + syn keyword mpDef thelabel transparent[] usemetafunlabels + syn keyword mpDef useplainlabels withcircularshade withlinearshade + syn keyword mpDef withmask withproperties withshadecenter + syn keyword mpDef withshadecolors withshadedirection withshadedomain + syn keyword mpDef withshadefactor withshadefraction withshadeorigin + syn keyword mpDef withshaderadius withshadestep withshadetransform + syn keyword mpDef withshadevector withtransparency + syn keyword mpVardef anchored checkbounds checkedbounds + syn keyword mpVardef define_circular_shade define_linear_shade dotlabel + syn keyword mpVardef escaped_format fmttext fontsize format formatted + syn keyword mpVardef installlabel onetimefmttext onetimetextext + syn keyword mpVardef outlinetext plain_thelabel properties rawfmttext + syn keyword mpVardef rawtexbox rawtextext rule strfmt strut texbox + syn keyword mpVardef textext thefmttext thelabel thetexbox thetextext + syn keyword mpVardef tostring transparency_alternative_to_number + syn keyword mpVardef validtexbox varfmt verbatim + syn keyword mpPrimaryDef asgroup infont normalinfont shadedinto + syn keyword mpPrimaryDef shownshadecenter shownshadedirection + syn keyword mpPrimaryDef shownshadeorigin shownshadevector withshade + syn keyword mpPrimaryDef withshademethod + syn keyword mpNewInternal colorburntransparent colordodgetransparent + syn keyword mpNewInternal colortransparent darkentransparent + syn keyword mpNewInternal differencetransparent exclusiontransparent + syn keyword mpNewInternal hardlighttransparent huetransparent + syn keyword mpNewInternal lightentransparent luminositytransparent + syn keyword mpNewInternal multiplytransparent normaltransparent + syn keyword mpNewInternal overlaytransparent saturationtransparent + syn keyword mpNewInternal screentransparent shadefactor softlighttransparent + syn keyword mpNewInternal textextoffset + syn keyword mpType property transparency + syn keyword mpVariable currentoutlinetext shadeddown shadedleft + syn keyword mpVariable shadedright shadedup shadeoffset trace_shades + syn keyword mpConstant context_mlib + " mp-page.mpiv + syn keyword mpDef BoundCoverAreas BoundPageAreas Enlarged FakeRule + syn keyword mpDef FakeWord LoadPageState OverlayBox RuleColor + syn keyword mpDef SetAreaVariables SetPageArea SetPageBackPage + syn keyword mpDef SetPageCoverPage SetPageField SetPageFrontPage + syn keyword mpDef SetPageHsize SetPageHstep SetPageLocation + syn keyword mpDef SetPagePage SetPageSpine SetPageVariables + syn keyword mpDef SetPageVsize SetPageVstep StartCover StartPage + syn keyword mpDef StopCover StopPage SwapPageState innerenlarged + syn keyword mpDef llEnlarged lrEnlarged outerenlarged ulEnlarged + syn keyword mpDef urEnlarged + syn keyword mpVardef BackPageHeight BackPageWidth BackSpace BaseLineSkip + syn keyword mpVardef BodyFontSize BottomDistance BottomHeight + syn keyword mpVardef BottomSpace CoverHeight CoverWidth CurrentColumn + syn keyword mpVardef CurrentHeight CurrentWidth CutSpace EmWidth + syn keyword mpVardef ExHeight FooterDistance FooterHeight + syn keyword mpVardef FrontPageHeight FrontPageWidth HSize HeaderDistance + syn keyword mpVardef HeaderHeight InPageBody InnerEdgeDistance + syn keyword mpVardef InnerEdgeWidth InnerMarginDistance InnerMarginWidth + syn keyword mpVardef InnerSpaceWidth LastPageNumber LayoutColumnDistance + syn keyword mpVardef LayoutColumnWidth LayoutColumns LeftEdgeDistance + syn keyword mpVardef LeftEdgeWidth LeftMarginDistance LeftMarginWidth + syn keyword mpVardef LineHeight MakeupHeight MakeupWidth NOfColumns + syn keyword mpVardef NOfPages OnOddPage OnRightPage OuterEdgeDistance + syn keyword mpVardef OuterEdgeWidth OuterMarginDistance OuterMarginWidth + syn keyword mpVardef OuterSpaceWidth OverlayDepth OverlayHeight + syn keyword mpVardef OverlayLineWidth OverlayOffset OverlayWidth + syn keyword mpVardef PageDepth PageFraction PageNumber PageOffset + syn keyword mpVardef PaperBleed PaperHeight PaperWidth PrintPaperHeight + syn keyword mpVardef PrintPaperWidth RealPageNumber RightEdgeDistance + syn keyword mpVardef RightEdgeWidth RightMarginDistance RightMarginWidth + syn keyword mpVardef SpineHeight SpineWidth StrutDepth StrutHeight + syn keyword mpVardef TextHeight TextWidth TopDistance TopHeight TopSkip + syn keyword mpVardef TopSpace VSize defaultcolormodel + syn keyword mpVariable Area BackPage CoverPage CurrentLayout Field + syn keyword mpVariable FrontPage HorPos Hsize Hstep Location Page + syn keyword mpVariable PageStateAvailable RuleDepth RuleDirection + syn keyword mpVariable RuleFactor RuleH RuleHeight RuleOffset RuleOption + syn keyword mpVariable RuleThickness RuleV RuleWidth Spine VerPos Vsize + syn keyword mpVariable Vstep + syn keyword mpConstant context_page + " mp-shap.mpiv + syn keyword mpDef drawline drawshape some_shape + syn keyword mpDef start_predefined_shape_definition + syn keyword mpDef stop_predefined_shape_definition + syn keyword mpVardef drawpredefinedline drawpredefinedshape + syn keyword mpVardef some_shape_path + syn keyword mpVariable predefined_shapes predefined_shapes_xradius + syn keyword mpVariable predefined_shapes_xxradius + syn keyword mpVariable predefined_shapes_yradius + syn keyword mpVariable predefined_shapes_yyradius + syn keyword mpConstant context_shap + " mp-step.mpiv + syn keyword mpDef initialize_step_variables midbottomboundary + syn keyword mpDef midtopboundary step_begin_cell step_begin_chart + syn keyword mpDef step_cell_ali step_cell_bot step_cell_top + syn keyword mpDef step_cells step_end_cell step_end_chart + syn keyword mpDef step_text_bot step_text_mid step_text_top + syn keyword mpDef step_texts + syn keyword mpVariable cell_distance_x cell_distance_y cell_fill_color + syn keyword mpVariable cell_line_color cell_line_width cell_offset + syn keyword mpVariable chart_align chart_category chart_vertical + syn keyword mpVariable line_distance line_height line_line_color + syn keyword mpVariable line_line_width line_offset nofcells + syn keyword mpVariable text_distance_set text_fill_color text_line_color + syn keyword mpVariable text_line_width text_offset + syn keyword mpConstant context_cell + " mp-symb.mpiv + syn keyword mpDef finishglyph prepareglyph + syn keyword mpConstant lefttriangle midbar onebar righttriangle sidebar + syn keyword mpConstant sublefttriangle subrighttriangle twobar + " mp-text.mpiv + syn keyword mpDef build_parshape + syn keyword mpVardef found_point + syn keyword mpVariable trace_parshape + syn keyword mpConstant context_text + " mp-tool.mpiv + syn keyword mpCommand dump + syn keyword mpDef addbackground b_color beginglyph break centerarrow + syn keyword mpDef clearxy condition data_mpd_file detaileddraw + syn keyword mpDef detailpaths dowithpath draw drawboundary + syn keyword mpDef drawboundingbox drawcontrollines drawcontrolpoints + syn keyword mpDef drawfill draworigin drawpath drawpathonly + syn keyword mpDef drawpathwithpoints drawpoint drawpointlabels + syn keyword mpDef drawpoints drawticks drawwholepath drawxticks + syn keyword mpDef drawyticks endglyph fill finishsavingdata g_color + syn keyword mpDef inner_boundingbox job_name leftarrow loadmodule + syn keyword mpDef midarrowhead naturalizepaths newboolean newcolor + syn keyword mpDef newnumeric newpair newpath newpicture newstring + syn keyword mpDef newtransform normalcolors normaldraw normalfill + syn keyword mpDef normalwithcolor outer_boundingbox pop_boundingbox + syn keyword mpDef popboundingbox popcurrentpicture push_boundingbox + syn keyword mpDef pushboundingbox pushcurrentpicture r_color readfile + syn keyword mpDef recolor redraw refill register_dirty_chars + syn keyword mpDef remapcolor remapcolors remappedcolor reprocess + syn keyword mpDef resetarrows resetcolormap resetdrawoptions + syn keyword mpDef resolvedcolor restroke retext rightarrow savedata + syn keyword mpDef saveoptions scale_currentpicture set_ahlength + syn keyword mpDef set_grid showgrid startplaincompatibility + syn keyword mpDef startsavingdata stopplaincompatibility + syn keyword mpDef stopsavingdata stripe_path_a stripe_path_n undashed + syn keyword mpDef undrawfill untext visualizeddraw visualizedfill + syn keyword mpDef visualizepaths withcolor withgray + syn keyword mpDef xscale_currentpicture xshifted + syn keyword mpDef xyscale_currentpicture yscale_currentpicture + syn keyword mpDef yshifted + syn keyword mpVardef acos acosh anglebetween area arrowhead + syn keyword mpVardef arrowheadonpath arrowpath asciistring asin asinh + syn keyword mpVardef atan basiccolors bbheight bbwidth bcomponent + syn keyword mpVardef blackcolor bottomboundary boundingbox c_phantom + syn keyword mpVardef ccomponent center cleanstring colorcircle + syn keyword mpVardef colordecimals colordecimalslist colorlike colorpart + syn keyword mpVardef colortype complementary complemented copylist cos + syn keyword mpVardef cosh cot cotd curved ddddecimal dddecimal ddecimal + syn keyword mpVardef decorated drawarrowpath epsed exp freedotlabel + syn keyword mpVardef freelabel gcomponent getunstringed grayed greyed + syn keyword mpVardef hsvtorgb infinite innerboundingbox interpolated inv + syn keyword mpVardef invcos inverted invsin invtan laddered leftboundary + syn keyword mpVardef leftpath leftrightpath listsize listtocurves + syn keyword mpVardef listtolines ln log mcomponent new_on_grid + syn keyword mpVardef outerboundingbox paired pen_size penpoint phantom + syn keyword mpVardef pointarrow pow punked rangepath rcomponent + syn keyword mpVardef redecorated repathed rightboundary rightpath + syn keyword mpVardef rotation roundedsquare set_inner_boundingbox + syn keyword mpVardef set_outer_boundingbox setunstringed shapedlist + syn keyword mpVardef simplified sin sinh sortlist sqr straightpath tan + syn keyword mpVardef tand tanh tensecircle thefreelabel topboundary + syn keyword mpVardef tripled undecorated unitvector unspiked unstringed + syn keyword mpVardef whitecolor ycomponent + syn keyword mpPrimaryDef along blownup bottomenlarged cornered crossed + syn keyword mpPrimaryDef enlarged enlonged leftenlarged llenlarged llmoved + syn keyword mpPrimaryDef lrenlarged lrmoved on paralleled randomized + syn keyword mpPrimaryDef randomizedcontrols randomshifted rightenlarged + syn keyword mpPrimaryDef shortened sized smoothed snapped softened squeezed + syn keyword mpPrimaryDef stretched superellipsed topenlarged ulenlarged + syn keyword mpPrimaryDef ulmoved uncolored urenlarged urmoved xsized + syn keyword mpPrimaryDef xstretched xyscaled xysized ysized ystretched zmod + syn keyword mpSecondaryDef anglestriped intersection_point numberstriped + syn keyword mpSecondaryDef peepholed + syn keyword mpTertiaryDef cutends + syn keyword mpNewInternal ahdimple ahvariant anglelength anglemethod + syn keyword mpNewInternal angleoffset charscale cmykcolormodel graycolormodel + syn keyword mpNewInternal greycolormodel maxdimensions metapostversion + syn keyword mpNewInternal nocolormodel rgbcolormodel striped_normal_inner + syn keyword mpNewInternal striped_normal_outer striped_reverse_inner + syn keyword mpNewInternal striped_reverse_outer + syn keyword mpType grayscale greyscale quadruplet triplet + syn keyword mpVariable ahfactor collapse_data color_map drawoptionsfactor + syn keyword mpVariable freedotlabelsize freelabeloffset grid grid_full + syn keyword mpVariable grid_h grid_left grid_nx grid_ny grid_w grid_x + syn keyword mpVariable grid_y intersection_found originlength + syn keyword mpVariable plain_compatibility_data pointlabelfont + syn keyword mpVariable pointlabelscale refillbackground savingdata + syn keyword mpVariable savingdatadone swappointlabels ticklength tickstep + syn keyword mpConstant CRLF DQUOTE PERCENT SPACE bcircle context_tool crlf + syn keyword mpConstant darkblue darkcyan darkgray darkgreen darkmagenta + syn keyword mpConstant darkred darkyellow downtriangle dquote freesquare + syn keyword mpConstant fulldiamond fullsquare fulltriangle lcircle + syn keyword mpConstant lefttriangle lightgray llcircle lltriangle lrcircle + syn keyword mpConstant lrtriangle mpversion nocolor noline oddly + syn keyword mpConstant originpath percent rcircle righttriangle space + syn keyword mpConstant tcircle triangle ulcircle ultriangle unitcircle + syn keyword mpConstant unitdiamond unittriangle uptriangle urcircle + syn keyword mpConstant urtriangle +endif " MetaFun macros + " 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_mp_syntax_inits") - if version < 508 - let did_mp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink mpTeXinsert String - HiLink mpTeXbegin Statement - HiLink mpTeXend Statement - HiLink mpInternal mfInternal - HiLink mpMacro Macro - - delcommand HiLink -endif +hi def link mpTeXdelim mpPrimitive +hi def link mpBoolExp mfBoolExp +hi def link mpNumExp mfNumExp +hi def link mpPairExp mfPairExp +hi def link mpPathExp mfPathExp +hi def link mpPenExp mfPenExp +hi def link mpPicExp mfPicExp +hi def link mpStringExp mfStringExp +hi def link mpInternal mfInternal +hi def link mpCommand mfCommand +hi def link mpType mfType +hi def link mpPrimitive mfPrimitive +hi def link mpDef mfDef +hi def link mpVardef mpDef +hi def link mpPrimaryDef mpDef +hi def link mpSecondaryDef mpDef +hi def link mpTertiaryDef mpDef +hi def link mpNewInternal mpInternal +hi def link mpVariable mfVariable +hi def link mpConstant mfConstant +hi def link mpOnOff mpPrimitive +hi def link mpDash mpPrimitive let b:current_syntax = "mp" -" vim: ts=8 +let &cpo = s:cpo_sav +unlet! s:cpo_sav + +" vim:sw=2 diff --git a/runtime/syntax/msidl.vim b/runtime/syntax/msidl.vim index 79585bebc6..57eaecaa4f 100644 --- a/runtime/syntax/msidl.vim +++ b/runtime/syntax/msidl.vim @@ -3,11 +3,8 @@ " Maintainer: Vadim Zeitlin <vadim@wxwindows.org> " Last Change: 2012 Feb 12 by Thilo Six -" 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 @@ -56,39 +53,29 @@ syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandar syn sync lines=50 " 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_msidl_syntax_inits") - if version < 508 - let did_msidl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink msidlInclude Include - HiLink msidlPreProc PreProc - HiLink msidlPreCondit PreCondit - HiLink msidlDefine Macro - HiLink msidlIncluded String - HiLink msidlString String - HiLink msidlComment Comment - HiLink msidlTodo Todo - HiLink msidlSpecial SpecialChar - HiLink msidlLiteral Number - HiLink msidlUUID Number - - HiLink msidlImport Include - HiLink msidlEnum StorageClass - HiLink msidlStruct Structure - HiLink msidlTypedef Typedef - HiLink msidlAttribute StorageClass - - HiLink msidlStandardType Type - HiLink msidlSafeArray Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link msidlInclude Include +hi def link msidlPreProc PreProc +hi def link msidlPreCondit PreCondit +hi def link msidlDefine Macro +hi def link msidlIncluded String +hi def link msidlString String +hi def link msidlComment Comment +hi def link msidlTodo Todo +hi def link msidlSpecial SpecialChar +hi def link msidlLiteral Number +hi def link msidlUUID Number + +hi def link msidlImport Include +hi def link msidlEnum StorageClass +hi def link msidlStruct Structure +hi def link msidlTypedef Typedef +hi def link msidlAttribute StorageClass + +hi def link msidlStandardType Type +hi def link msidlSafeArray Type + let b:current_syntax = "msidl" diff --git a/runtime/syntax/msmessages.vim b/runtime/syntax/msmessages.vim index 60588571c9..5faee978b4 100644 --- a/runtime/syntax/msmessages.vim +++ b/runtime/syntax/msmessages.vim @@ -7,11 +7,8 @@ " See format description at <http://msdn2.microsoft.com/en-us/library/aa385646.aspx> " This file is based on the rc.vim and c.vim -" 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 diff --git a/runtime/syntax/msql.vim b/runtime/syntax/msql.vim index 0716fbb1f6..60e75a7ef6 100644 --- a/runtime/syntax/msql.vim +++ b/runtime/syntax/msql.vim @@ -8,11 +8,8 @@ " Options msql_sql_query = 1 for SQL syntax highligthing inside strings " msql_minlines = x to sync at least x lines backwards -" 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 @@ -20,12 +17,8 @@ if !exists("main_syntax") let main_syntax = 'msql' endif -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreproc add=msqlRegion @@ -57,39 +50,29 @@ else endif " 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_msql_syn_inits") - if version < 508 - let did_msql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink msqlComment Comment - HiLink msqlString String - HiLink msqlNumber Number - HiLink msqlFloat Float - HiLink msqlIdentifier Identifier - HiLink msqlGlobalIdentifier Identifier - HiLink msqlIntVar Identifier - HiLink msqlEnvVar Identifier - HiLink msqlFunctions Function - HiLink msqlRepeat Repeat - HiLink msqlConditional Conditional - HiLink msqlStatement Statement - HiLink msqlType Type - HiLink msqlInclude Include - HiLink msqlDefine Define - HiLink msqlSpecialChar SpecialChar - HiLink msqlParentError Error - HiLink msqlTodo Todo - HiLink msqlOperator Operator - HiLink msqlRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link msqlComment Comment +hi def link msqlString String +hi def link msqlNumber Number +hi def link msqlFloat Float +hi def link msqlIdentifier Identifier +hi def link msqlGlobalIdentifier Identifier +hi def link msqlIntVar Identifier +hi def link msqlEnvVar Identifier +hi def link msqlFunctions Function +hi def link msqlRepeat Repeat +hi def link msqlConditional Conditional +hi def link msqlStatement Statement +hi def link msqlType Type +hi def link msqlInclude Include +hi def link msqlDefine Define +hi def link msqlSpecialChar SpecialChar +hi def link msqlParentError Error +hi def link msqlTodo Todo +hi def link msqlOperator Operator +hi def link msqlRelation Operator + let b:current_syntax = "msql" diff --git a/runtime/syntax/mupad.vim b/runtime/syntax/mupad.vim index 109f880ee1..55ea9c4e43 100644 --- a/runtime/syntax/mupad.vim +++ b/runtime/syntax/mupad.vim @@ -5,11 +5,8 @@ " Date: 6/30/2004 -" 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 @@ -268,28 +265,19 @@ syn keyword mupadIdentifier Tubular " graphics meta-documentation Attributes syn keyword mupadIdentifier objectGroupsListed -if version >= 508 || !exists("did_mupad_syntax_inits") - if version < 508 - let did_mupad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink mupadComment Comment - HiLink mupadString String - HiLink mupadOperator Operator - HiLink mupadSpecial Special - HiLink mupadStatement Statement - HiLink mupadUnderlined Underlined - HiLink mupadConditional Conditional - HiLink mupadRepeat Repeat - HiLink mupadFunction Function - HiLink mupadType Type - HiLink mupadDefine Define - HiLink mupadIdentifier Identifier +hi def link mupadComment Comment +hi def link mupadString String +hi def link mupadOperator Operator +hi def link mupadSpecial Special +hi def link mupadStatement Statement +hi def link mupadUnderlined Underlined +hi def link mupadConditional Conditional +hi def link mupadRepeat Repeat +hi def link mupadFunction Function +hi def link mupadType Type +hi def link mupadDefine Define +hi def link mupadIdentifier Identifier - delcommand HiLink -endif " TODO More comprehensive listing. diff --git a/runtime/syntax/mush.vim b/runtime/syntax/mush.vim index 0645f33565..efaae50ae3 100644 --- a/runtime/syntax/mush.vim +++ b/runtime/syntax/mush.vim @@ -3,11 +3,8 @@ " Based on vim Syntax file by: Bek Oberin <gossamer@tertius.net.au> " Last Updated: Fri Nov 04 20:28:15 2005 " -" 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 @@ -185,42 +182,33 @@ syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz -if version >= 508 || !exists("did_mush_syntax_inits") - if version < 508 - let did_mush_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink mushAttribute Constant - HiLink mushCommand Function - HiLink mushNumber Number - HiLink mushSetting PreProc - HiLink mushFunction Statement - HiLink mushVariable Identifier - HiLink mushSpecial Special - HiLink mushTodo Todo - HiLink mushFlag Special - HiLink mushIdentifier Identifier - HiLink mushDefine Macro - HiLink mushPreProc PreProc - HiLink mushPreProcGroup PreProc - HiLink mushPreCondit PreCondit - HiLink mushIncluded cString - HiLink mushInclude Include + +" The default methods for highlighting. Can be overridden later +hi def link mushAttribute Constant +hi def link mushCommand Function +hi def link mushNumber Number +hi def link mushSetting PreProc +hi def link mushFunction Statement +hi def link mushVariable Identifier +hi def link mushSpecial Special +hi def link mushTodo Todo +hi def link mushFlag Special +hi def link mushIdentifier Identifier +hi def link mushDefine Macro +hi def link mushPreProc PreProc +hi def link mushPreProcGroup PreProc +hi def link mushPreCondit PreCondit +hi def link mushIncluded cString +hi def link mushInclude Include " Comments - HiLink mushCommentStart mushComment - HiLink mushComment Comment - HiLink mushCommentString mushString +hi def link mushCommentStart mushComment +hi def link mushComment Comment +hi def link mushCommentString mushString - delcommand HiLink -endif let b:current_syntax = "mush" diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index 94b27313b2..e4395fdf59 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -6,11 +6,8 @@ " This file covers mutt version 1.7.0 -" 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 @@ -18,11 +15,7 @@ let s:cpo_save = &cpo set cpo&vim " Set the keyword characters -if version < 600 - set isk=@,48-57,_,- -else - setlocal isk=@,48-57,_,- -endif +setlocal isk=@,48-57,_,- " handling optional variables if !exists("use_mutt_sidebar") @@ -636,160 +629,150 @@ syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono " 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_muttrc_syntax_inits") - if version < 508 - let did_muttrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink muttrcComment Comment - HiLink muttrcEscape SpecialChar - HiLink muttrcRXChars SpecialChar - HiLink muttrcString String - HiLink muttrcRXString String - HiLink muttrcRXString2 String - HiLink muttrcSpecial Special - HiLink muttrcHooks Type - HiLink muttrcGroupFlag Type - HiLink muttrcGroupDef Macro - HiLink muttrcAddrDef muttrcGroupFlag - HiLink muttrcRXDef muttrcGroupFlag - HiLink muttrcRXPat String - HiLink muttrcAliasGroupName Macro - HiLink muttrcAliasKey Identifier - HiLink muttrcUnAliasKey Identifier - HiLink muttrcAliasEncEmail Identifier - HiLink muttrcAliasParens Type - HiLink muttrcSetNumAssignment Number - HiLink muttrcSetBoolAssignment Boolean - HiLink muttrcSetQuadAssignment Boolean - HiLink muttrcSetStrAssignment String - HiLink muttrcEmail Special - HiLink muttrcVariableInner Special - HiLink muttrcEscapedVariable String - HiLink muttrcHeader Type - HiLink muttrcKeySpecial SpecialChar - HiLink muttrcKey Type - HiLink muttrcKeyName SpecialChar - HiLink muttrcVarBool Identifier - HiLink muttrcVarQuad Identifier - HiLink muttrcVarNum Identifier - HiLink muttrcVarStr Identifier - HiLink muttrcMenu Identifier - HiLink muttrcCommand Keyword - HiLink muttrcMacroDescr String - HiLink muttrcAction Macro - HiLink muttrcBadAction Error - HiLink muttrcBindFunction Error - HiLink muttrcBindMenuList Error - HiLink muttrcFunction Macro - HiLink muttrcGroupKeyword muttrcCommand - HiLink muttrcGroupLine Error - HiLink muttrcSubscribeKeyword muttrcCommand - HiLink muttrcSubscribeLine Error - HiLink muttrcListsKeyword muttrcCommand - HiLink muttrcListsLine Error - HiLink muttrcAlternateKeyword muttrcCommand - HiLink muttrcAlternatesLine Error - HiLink muttrcAttachmentsLine muttrcCommand - HiLink muttrcAttachmentsFlag Type - HiLink muttrcAttachmentsMimeType String - HiLink muttrcColorLine Error - HiLink muttrcColorContext Error - HiLink muttrcColorContextI Identifier - HiLink muttrcColorContextH Identifier - HiLink muttrcColorKeyword muttrcCommand - HiLink muttrcColorKeywordI muttrcColorKeyword - HiLink muttrcColorKeywordH muttrcColorKeyword - HiLink muttrcColorField Identifier - HiLink muttrcColor Type - HiLink muttrcColorFG Error - HiLink muttrcColorFGI Error - HiLink muttrcColorFGH Error - HiLink muttrcColorBG Error - HiLink muttrcColorBGI Error - HiLink muttrcColorBGH Error - HiLink muttrcMonoAttrib muttrcColor - HiLink muttrcMono muttrcCommand - HiLink muttrcSimplePat Identifier - HiLink muttrcSimplePatString Macro - HiLink muttrcSimplePatMetas Special - HiLink muttrcPattern Error - HiLink muttrcUnColorLine Error - HiLink muttrcUnColorKeyword muttrcCommand - HiLink muttrcUnColorIndex Identifier - HiLink muttrcShellString muttrcEscape - HiLink muttrcRXHooks muttrcCommand - HiLink muttrcRXHookNot Type - HiLink muttrcPatHooks muttrcCommand - HiLink muttrcPatHookNot Type - HiLink muttrcFormatConditionals2 Type - HiLink muttrcIndexFormatStr muttrcString - HiLink muttrcIndexFormatEscapes muttrcEscape - HiLink muttrcIndexFormatConditionals muttrcFormatConditionals2 - HiLink muttrcAliasFormatStr muttrcString - HiLink muttrcAliasFormatEscapes muttrcEscape - HiLink muttrcAttachFormatStr muttrcString - HiLink muttrcAttachFormatEscapes muttrcEscape - HiLink muttrcAttachFormatConditionals muttrcFormatConditionals2 - HiLink muttrcComposeFormatStr muttrcString - HiLink muttrcComposeFormatEscapes muttrcEscape - HiLink muttrcFolderFormatStr muttrcString - HiLink muttrcFolderFormatEscapes muttrcEscape - HiLink muttrcFolderFormatConditionals muttrcFormatConditionals2 - HiLink muttrcMixFormatStr muttrcString - HiLink muttrcMixFormatEscapes muttrcEscape - HiLink muttrcMixFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPFormatStr muttrcString - HiLink muttrcPGPFormatEscapes muttrcEscape - HiLink muttrcPGPFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPCmdFormatStr muttrcString - HiLink muttrcPGPCmdFormatEscapes muttrcEscape - HiLink muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 - HiLink muttrcStatusFormatStr muttrcString - HiLink muttrcStatusFormatEscapes muttrcEscape - HiLink muttrcStatusFormatConditionals muttrcFormatConditionals2 - HiLink muttrcPGPGetKeysFormatStr muttrcString - HiLink muttrcPGPGetKeysFormatEscapes muttrcEscape - HiLink muttrcSmimeFormatStr muttrcString - HiLink muttrcSmimeFormatEscapes muttrcEscape - HiLink muttrcSmimeFormatConditionals muttrcFormatConditionals2 - HiLink muttrcTimeEscapes muttrcEscape - HiLink muttrcPGPTimeEscapes muttrcEscape - HiLink muttrcStrftimeEscapes Type - HiLink muttrcStrftimeFormatStr muttrcString - HiLink muttrcFormatErrors Error - - HiLink muttrcBindFunctionNL SpecialChar - HiLink muttrcBindKeyNL SpecialChar - HiLink muttrcBindMenuListNL SpecialChar - HiLink muttrcMacroDescrNL SpecialChar - HiLink muttrcMacroBodyNL SpecialChar - HiLink muttrcMacroKeyNL SpecialChar - HiLink muttrcMacroMenuListNL SpecialChar - HiLink muttrcColorMatchCountNL SpecialChar - HiLink muttrcColorNL SpecialChar - HiLink muttrcColorRXNL SpecialChar - HiLink muttrcColorBGNL SpecialChar - HiLink muttrcColorFGNL SpecialChar - HiLink muttrcAliasNameNL SpecialChar - HiLink muttrcAliasENNL SpecialChar - HiLink muttrcAliasNL SpecialChar - HiLink muttrcUnAliasNL SpecialChar - HiLink muttrcAliasGroupDefNL SpecialChar - HiLink muttrcAliasEncEmailNL SpecialChar - HiLink muttrcPatternNL SpecialChar - HiLink muttrcUnColorPatNL SpecialChar - HiLink muttrcUnColorAPNL SpecialChar - HiLink muttrcUnColorIndexNL SpecialChar - HiLink muttrcStringNL SpecialChar - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link muttrcComment Comment +hi def link muttrcEscape SpecialChar +hi def link muttrcRXChars SpecialChar +hi def link muttrcString String +hi def link muttrcRXString String +hi def link muttrcRXString2 String +hi def link muttrcSpecial Special +hi def link muttrcHooks Type +hi def link muttrcGroupFlag Type +hi def link muttrcGroupDef Macro +hi def link muttrcAddrDef muttrcGroupFlag +hi def link muttrcRXDef muttrcGroupFlag +hi def link muttrcRXPat String +hi def link muttrcAliasGroupName Macro +hi def link muttrcAliasKey Identifier +hi def link muttrcUnAliasKey Identifier +hi def link muttrcAliasEncEmail Identifier +hi def link muttrcAliasParens Type +hi def link muttrcSetNumAssignment Number +hi def link muttrcSetBoolAssignment Boolean +hi def link muttrcSetQuadAssignment Boolean +hi def link muttrcSetStrAssignment String +hi def link muttrcEmail Special +hi def link muttrcVariableInner Special +hi def link muttrcEscapedVariable String +hi def link muttrcHeader Type +hi def link muttrcKeySpecial SpecialChar +hi def link muttrcKey Type +hi def link muttrcKeyName SpecialChar +hi def link muttrcVarBool Identifier +hi def link muttrcVarQuad Identifier +hi def link muttrcVarNum Identifier +hi def link muttrcVarStr Identifier +hi def link muttrcMenu Identifier +hi def link muttrcCommand Keyword +hi def link muttrcMacroDescr String +hi def link muttrcAction Macro +hi def link muttrcBadAction Error +hi def link muttrcBindFunction Error +hi def link muttrcBindMenuList Error +hi def link muttrcFunction Macro +hi def link muttrcGroupKeyword muttrcCommand +hi def link muttrcGroupLine Error +hi def link muttrcSubscribeKeyword muttrcCommand +hi def link muttrcSubscribeLine Error +hi def link muttrcListsKeyword muttrcCommand +hi def link muttrcListsLine Error +hi def link muttrcAlternateKeyword muttrcCommand +hi def link muttrcAlternatesLine Error +hi def link muttrcAttachmentsLine muttrcCommand +hi def link muttrcAttachmentsFlag Type +hi def link muttrcAttachmentsMimeType String +hi def link muttrcColorLine Error +hi def link muttrcColorContext Error +hi def link muttrcColorContextI Identifier +hi def link muttrcColorContextH Identifier +hi def link muttrcColorKeyword muttrcCommand +hi def link muttrcColorKeywordI muttrcColorKeyword +hi def link muttrcColorKeywordH muttrcColorKeyword +hi def link muttrcColorField Identifier +hi def link muttrcColor Type +hi def link muttrcColorFG Error +hi def link muttrcColorFGI Error +hi def link muttrcColorFGH Error +hi def link muttrcColorBG Error +hi def link muttrcColorBGI Error +hi def link muttrcColorBGH Error +hi def link muttrcMonoAttrib muttrcColor +hi def link muttrcMono muttrcCommand +hi def link muttrcSimplePat Identifier +hi def link muttrcSimplePatString Macro +hi def link muttrcSimplePatMetas Special +hi def link muttrcPattern Error +hi def link muttrcUnColorLine Error +hi def link muttrcUnColorKeyword muttrcCommand +hi def link muttrcUnColorIndex Identifier +hi def link muttrcShellString muttrcEscape +hi def link muttrcRXHooks muttrcCommand +hi def link muttrcRXHookNot Type +hi def link muttrcPatHooks muttrcCommand +hi def link muttrcPatHookNot Type +hi def link muttrcFormatConditionals2 Type +hi def link muttrcIndexFormatStr muttrcString +hi def link muttrcIndexFormatEscapes muttrcEscape +hi def link muttrcIndexFormatConditionals muttrcFormatConditionals2 +hi def link muttrcAliasFormatStr muttrcString +hi def link muttrcAliasFormatEscapes muttrcEscape +hi def link muttrcAttachFormatStr muttrcString +hi def link muttrcAttachFormatEscapes muttrcEscape +hi def link muttrcAttachFormatConditionals muttrcFormatConditionals2 +hi def link muttrcComposeFormatStr muttrcString +hi def link muttrcComposeFormatEscapes muttrcEscape +hi def link muttrcFolderFormatStr muttrcString +hi def link muttrcFolderFormatEscapes muttrcEscape +hi def link muttrcFolderFormatConditionals muttrcFormatConditionals2 +hi def link muttrcMixFormatStr muttrcString +hi def link muttrcMixFormatEscapes muttrcEscape +hi def link muttrcMixFormatConditionals muttrcFormatConditionals2 +hi def link muttrcPGPFormatStr muttrcString +hi def link muttrcPGPFormatEscapes muttrcEscape +hi def link muttrcPGPFormatConditionals muttrcFormatConditionals2 +hi def link muttrcPGPCmdFormatStr muttrcString +hi def link muttrcPGPCmdFormatEscapes muttrcEscape +hi def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2 +hi def link muttrcStatusFormatStr muttrcString +hi def link muttrcStatusFormatEscapes muttrcEscape +hi def link muttrcStatusFormatConditionals muttrcFormatConditionals2 +hi def link muttrcPGPGetKeysFormatStr muttrcString +hi def link muttrcPGPGetKeysFormatEscapes muttrcEscape +hi def link muttrcSmimeFormatStr muttrcString +hi def link muttrcSmimeFormatEscapes muttrcEscape +hi def link muttrcSmimeFormatConditionals muttrcFormatConditionals2 +hi def link muttrcTimeEscapes muttrcEscape +hi def link muttrcPGPTimeEscapes muttrcEscape +hi def link muttrcStrftimeEscapes Type +hi def link muttrcStrftimeFormatStr muttrcString +hi def link muttrcFormatErrors Error + +hi def link muttrcBindFunctionNL SpecialChar +hi def link muttrcBindKeyNL SpecialChar +hi def link muttrcBindMenuListNL SpecialChar +hi def link muttrcMacroDescrNL SpecialChar +hi def link muttrcMacroBodyNL SpecialChar +hi def link muttrcMacroKeyNL SpecialChar +hi def link muttrcMacroMenuListNL SpecialChar +hi def link muttrcColorMatchCountNL SpecialChar +hi def link muttrcColorNL SpecialChar +hi def link muttrcColorRXNL SpecialChar +hi def link muttrcColorBGNL SpecialChar +hi def link muttrcColorFGNL SpecialChar +hi def link muttrcAliasNameNL SpecialChar +hi def link muttrcAliasENNL SpecialChar +hi def link muttrcAliasNL SpecialChar +hi def link muttrcUnAliasNL SpecialChar +hi def link muttrcAliasGroupDefNL SpecialChar +hi def link muttrcAliasEncEmailNL SpecialChar +hi def link muttrcPatternNL SpecialChar +hi def link muttrcUnColorPatNL SpecialChar +hi def link muttrcUnColorAPNL SpecialChar +hi def link muttrcUnColorIndexNL SpecialChar +hi def link muttrcStringNL SpecialChar + let b:current_syntax = "muttrc" diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim index d7cf74710d..8bd7b6459a 100644 --- a/runtime/syntax/mysql.vim +++ b/runtime/syntax/mysql.vim @@ -6,11 +6,8 @@ " URL: ftp://cedar-solutions.com/software/mysql.vim " Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 -" 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 @@ -273,29 +270,19 @@ syn region mysqlFunction start="weekday(" end=")" contains=ALL syn region mysqlFunction start="yearweek(" end=")" contains=ALL " 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_mysql_syn_inits") - if version < 508 - let did_mysql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink mysqlKeyword Statement - HiLink mysqlSpecial Special - HiLink mysqlString String - HiLink mysqlNumber Number - HiLink mysqlVariable Identifier - HiLink mysqlComment Comment - HiLink mysqlType Type - HiLink mysqlOperator Statement - HiLink mysqlFlow Statement - HiLink mysqlFunction Function +hi def link mysqlKeyword Statement +hi def link mysqlSpecial Special +hi def link mysqlString String +hi def link mysqlNumber Number +hi def link mysqlVariable Identifier +hi def link mysqlComment Comment +hi def link mysqlType Type +hi def link mysqlOperator Statement +hi def link mysqlFlow Statement +hi def link mysqlFunction Function - delcommand HiLink -endif let b:current_syntax = "mysql" diff --git a/runtime/syntax/named.vim b/runtime/syntax/named.vim index faec5f68e5..a5757d5eb9 100644 --- a/runtime/syntax/named.vim +++ b/runtime/syntax/named.vim @@ -11,25 +11,16 @@ " This file could do with a lot of improvements, so comments are welcome. " Please submit the named.conf (segment) with any comments. " -" 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 syn case match -if version >= 600 - setlocal iskeyword=.,-,48-58,A-Z,a-z,_ -else - set iskeyword=.,-,48-58,A-Z,a-z,_ -endif +setlocal iskeyword=.,-,48-58,A-Z,a-z,_ -if version >= 600 - syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" -endif +syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" let s:save_cpo = &cpo set cpo-=C @@ -197,48 +188,38 @@ syn match namedEParenError contained +{+ syn match namedParenError +}\([^;]\|$\)+ " 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_named_syn_inits") - if version < 508 - let did_named_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink namedComment Comment - HiLink namedInclude Include - HiLink namedKeyword Keyword - HiLink namedIntKeyword Keyword - HiLink namedIdentifier Identifier - HiLink namedIntIdent Identifier - - HiLink namedString String - HiLink namedBool Type - HiLink namedNotBool Error - HiLink namedNumber Number - HiLink namedNotNumber Error - - HiLink namedOption namedKeyword - HiLink namedLogOption namedKeyword - HiLink namedCNOption namedKeyword - HiLink namedQSKeywords Type - HiLink namedCNKeywords Type - HiLink namedLogCategory Type - HiLink namedIPaddr Number - HiLink namedDomain Identifier - HiLink namedZoneOpt namedKeyword - HiLink namedZoneType Type - HiLink namedParenError Error - HiLink namedEParenError Error - HiLink namedIllegalDom Error - HiLink namedIPerror Error - HiLink namedSpareDot Error - HiLink namedError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link namedComment Comment +hi def link namedInclude Include +hi def link namedKeyword Keyword +hi def link namedIntKeyword Keyword +hi def link namedIdentifier Identifier +hi def link namedIntIdent Identifier + +hi def link namedString String +hi def link namedBool Type +hi def link namedNotBool Error +hi def link namedNumber Number +hi def link namedNotNumber Error + +hi def link namedOption namedKeyword +hi def link namedLogOption namedKeyword +hi def link namedCNOption namedKeyword +hi def link namedQSKeywords Type +hi def link namedCNKeywords Type +hi def link namedLogCategory Type +hi def link namedIPaddr Number +hi def link namedDomain Identifier +hi def link namedZoneOpt namedKeyword +hi def link namedZoneType Type +hi def link namedParenError Error +hi def link namedEParenError Error +hi def link namedIllegalDom Error +hi def link namedIPerror Error +hi def link namedSpareDot Error +hi def link namedError Error + let &cpo = s:save_cpo unlet s:save_cpo diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index a6ed056650..d6485080ee 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -9,10 +9,8 @@ " Setup Syntax: -" Clear old syntax settings -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Assembler syntax is case insensetive @@ -21,18 +19,10 @@ syn case ignore " Vim search and movement commands on identifers -if version < 600 - " Comments at start of a line inside which to skip search for indentifiers - set comments=:; - " Identifier Keyword characters (defines \k) - set iskeyword=@,48-57,#,$,.,?,@-@,_,~ -else - " Comments at start of a line inside which to skip search for indentifiers - setlocal comments=:; - " Identifier Keyword characters (defines \k) - setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ -endif - +" Comments at start of a line inside which to skip search for indentifiers +setlocal comments=:; +" Identifier Keyword characters (defines \k) +setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ " Comments: @@ -431,96 +421,86 @@ syn sync match nasmSync grouphere NONE "^\s*%endmacro\>" " 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_nasm_syntax_inits") - if version < 508 - let did_nasm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +" Sub Links: +hi def link nasmInMacDirective nasmDirective +hi def link nasmInMacLabel nasmLocalLabel +hi def link nasmInMacLblWarn nasmLabelWarn +hi def link nasmInMacMacro nasmMacro +hi def link nasmInMacParam nasmMacro +hi def link nasmInMacParamNum nasmDecNumber +hi def link nasmInMacPreCondit nasmPreCondit +hi def link nasmInMacPreProc nasmPreProc +hi def link nasmInPreCondit nasmPreCondit +hi def link nasmInStructure nasmStructure +hi def link nasmStructureLabel nasmStructure + +" Comment Group: +hi def link nasmComment Comment +hi def link nasmSpecialComment SpecialComment +hi def link nasmInCommentTodo Todo + +" Constant Group: +hi def link nasmString String +hi def link nasmStringError Error +hi def link nasmBinNumber Number +hi def link nasmOctNumber Number +hi def link nasmDecNumber Number +hi def link nasmHexNumber Number +hi def link nasmFltNumber Float +hi def link nasmNumberError Error + +" Identifier Group: +hi def link nasmLabel Identifier +hi def link nasmLocalLabel Identifier +hi def link nasmSpecialLabel Special +hi def link nasmLabelError Error +hi def link nasmLabelWarn Todo + +" PreProc Group: +hi def link nasmPreProc PreProc +hi def link nasmDefine Define +hi def link nasmInclude Include +hi def link nasmMacro Macro +hi def link nasmPreCondit PreCondit +hi def link nasmPreProcError Error +hi def link nasmPreProcWarn Todo + +" Type Group: +hi def link nasmType Type +hi def link nasmStorage StorageClass +hi def link nasmStructure Structure +hi def link nasmTypeError Error + +" Directive Group: +hi def link nasmConstant Constant +hi def link nasmInstrModifier Operator +hi def link nasmRepeat Repeat +hi def link nasmDirective Keyword +hi def link nasmStdDirective Operator +hi def link nasmFmtDirective Keyword + +" Register Group: +hi def link nasmCtrlRegister Special +hi def link nasmDebugRegister Debug +hi def link nasmTestRegister Special +hi def link nasmRegisterError Error +hi def link nasmMemRefError Error + +" Instruction Group: +hi def link nasmStdInstruction Statement +hi def link nasmSysInstruction Statement +hi def link nasmDbgInstruction Debug +hi def link nasmFpuInstruction Statement +hi def link nasmMmxInstruction Statement +hi def link nasmSseInstruction Statement +hi def link nasmNowInstruction Statement +hi def link nasmAmdInstruction Special +hi def link nasmCrxInstruction Special +hi def link nasmUndInstruction Todo +hi def link nasmInstructnError Error - " Sub Links: - HiLink nasmInMacDirective nasmDirective - HiLink nasmInMacLabel nasmLocalLabel - HiLink nasmInMacLblWarn nasmLabelWarn - HiLink nasmInMacMacro nasmMacro - HiLink nasmInMacParam nasmMacro - HiLink nasmInMacParamNum nasmDecNumber - HiLink nasmInMacPreCondit nasmPreCondit - HiLink nasmInMacPreProc nasmPreProc - HiLink nasmInPreCondit nasmPreCondit - HiLink nasmInStructure nasmStructure - HiLink nasmStructureLabel nasmStructure - - " Comment Group: - HiLink nasmComment Comment - HiLink nasmSpecialComment SpecialComment - HiLink nasmInCommentTodo Todo - - " Constant Group: - HiLink nasmString String - HiLink nasmStringError Error - HiLink nasmBinNumber Number - HiLink nasmOctNumber Number - HiLink nasmDecNumber Number - HiLink nasmHexNumber Number - HiLink nasmFltNumber Float - HiLink nasmNumberError Error - - " Identifier Group: - HiLink nasmLabel Identifier - HiLink nasmLocalLabel Identifier - HiLink nasmSpecialLabel Special - HiLink nasmLabelError Error - HiLink nasmLabelWarn Todo - - " PreProc Group: - HiLink nasmPreProc PreProc - HiLink nasmDefine Define - HiLink nasmInclude Include - HiLink nasmMacro Macro - HiLink nasmPreCondit PreCondit - HiLink nasmPreProcError Error - HiLink nasmPreProcWarn Todo - - " Type Group: - HiLink nasmType Type - HiLink nasmStorage StorageClass - HiLink nasmStructure Structure - HiLink nasmTypeError Error - - " Directive Group: - HiLink nasmConstant Constant - HiLink nasmInstrModifier Operator - HiLink nasmRepeat Repeat - HiLink nasmDirective Keyword - HiLink nasmStdDirective Operator - HiLink nasmFmtDirective Keyword - - " Register Group: - HiLink nasmCtrlRegister Special - HiLink nasmDebugRegister Debug - HiLink nasmTestRegister Special - HiLink nasmRegisterError Error - HiLink nasmMemRefError Error - - " Instruction Group: - HiLink nasmStdInstruction Statement - HiLink nasmSysInstruction Statement - HiLink nasmDbgInstruction Debug - HiLink nasmFpuInstruction Statement - HiLink nasmMmxInstruction Statement - HiLink nasmSseInstruction Statement - HiLink nasmNowInstruction Statement - HiLink nasmAmdInstruction Special - HiLink nasmCrxInstruction Special - HiLink nasmUndInstruction Todo - HiLink nasmInstructnError Error - - delcommand HiLink -endif let b:current_syntax = "nasm" diff --git a/runtime/syntax/nastran.vim b/runtime/syntax/nastran.vim index f7927693fa..239fd6e49d 100644 --- a/runtime/syntax/nastran.vim +++ b/runtime/syntax/nastran.vim @@ -6,11 +6,8 @@ " Since DMAP shares some traits with fortran, this syntax file " is based on the fortran.vim syntax file. "---------------------------------------------------------------------- -" Remove any old syntax stuff hanging around -"syn clear -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 " DMAP is not case dependent @@ -156,37 +153,28 @@ syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[D syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM -if version >= 508 || !exists("did_nastran_syntax_inits") - if version < 508 - let did_nastran_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi link <args> - endif - " The default methods for highlighting. Can be overridden later - HiLink nastranDmapexecmod Statement - HiLink nastranDmapType Type - HiLink nastranDmapPreCondit Error - HiLink nastranDmapUtilmod PreProc - HiLink nastranDmapMatmod nastranDmapUtilmod - HiLink nastranDmapString String - HiLink nastranDmapNumber Constant - HiLink nastranDmapFloat nastranDmapNumber - HiLink nastranDmapInitTab nastranDmapNumber - HiLink nastranDmapTab nastranDmapNumber - HiLink nastranDmapLogical nastranDmapExecmod - HiLink nastranDmapImplicit Identifier - HiLink nastranDmapComment Comment - HiLink nastranDmapRepeat nastranDmapexecmod - HiLink nastranNastranCard nastranDmapPreCondit - HiLink nastranECSCard nastranDmapUtilmod - HiLink nastranFMSCard nastranNastranCard - HiLink nastranCC nastranDmapexecmod - HiLink nastranDelimiter Special - HiLink nastranBulkData nastranDmapType - HiLink nastranUtilCard nastranDmapexecmod - delcommand HiLink -endif +" The default methods for highlighting. Can be overridden later +hi def link nastranDmapexecmod Statement +hi def link nastranDmapType Type +hi def link nastranDmapPreCondit Error +hi def link nastranDmapUtilmod PreProc +hi def link nastranDmapMatmod nastranDmapUtilmod +hi def link nastranDmapString String +hi def link nastranDmapNumber Constant +hi def link nastranDmapFloat nastranDmapNumber +hi def link nastranDmapInitTab nastranDmapNumber +hi def link nastranDmapTab nastranDmapNumber +hi def link nastranDmapLogical nastranDmapExecmod +hi def link nastranDmapImplicit Identifier +hi def link nastranDmapComment Comment +hi def link nastranDmapRepeat nastranDmapexecmod +hi def link nastranNastranCard nastranDmapPreCondit +hi def link nastranECSCard nastranDmapUtilmod +hi def link nastranFMSCard nastranNastranCard +hi def link nastranCC nastranDmapexecmod +hi def link nastranDelimiter Special +hi def link nastranBulkData nastranDmapType +hi def link nastranUtilCard nastranDmapexecmod let b:current_syntax = "nastran" diff --git a/runtime/syntax/natural.vim b/runtime/syntax/natural.vim index 4fbc916be2..be529f2d85 100644 --- a/runtime/syntax/natural.vim +++ b/runtime/syntax/natural.vim @@ -6,16 +6,11 @@ " Last Changed: 2012-02-05 18:50:43 " Support: http://www.von-oppen.com/ -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when this syntax file was already loaded -if v:version < 600 - syntax clear - set iskeyword+=-,*,#,+,_,/ -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish -else - setlocal iskeyword+=-,*,#,+,_,/ endif +setlocal iskeyword+=-,*,#,+,_,/ let s:cpo_save = &cpo set cpo&vim @@ -153,59 +148,50 @@ if v:version >= 600 endif -if v:version >= 508 || !exists("did_natural_syntax_inits") - if v:version < 508 - let did_natural_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default methods for highlighting. Can be overridden later - - " Constants - HiLink naturalFormat Constant - HiLink naturalAttribute Constant - HiLink naturalNumber Number - HiLink naturalString String - HiLink naturalBoolean Boolean - - " All kinds of keywords - HiLink naturalConditional Conditional - HiLink naturalRepeat Repeat - HiLink naturalLoop Repeat - HiLink naturalFlow Keyword - HiLink naturalError Keyword - HiLink naturalKeyword Keyword - HiLink naturalOperator Operator - HiLink naturalParGui Operator - - " Labels - HiLink naturalLabel Label - HiLink naturalRefLabel Label - - " Comments - HiLink naturalPComment Comment - HiLink naturalComment Comment - HiLink naturalTodo Todo - HiLink naturalCommentMark PreProc - - HiLink naturalInclude Include - HiLink naturalSysVar Identifier - HiLink naturalLineNo LineNr - HiLink naturalLineRef Error - HiLink naturalSpecial Special - HiLink naturalComKey Todo - - " illegal things - HiLink naturalRMKeyword Error - HiLink naturalLegalIdent Error - - HiLink naturalType Type - HiLink naturalFunction Function - HiLink naturalObjName PreProc - - delcommand HiLink -endif +" The default methods for highlighting. Can be overridden later + +" Constants +hi def link naturalFormat Constant +hi def link naturalAttribute Constant +hi def link naturalNumber Number +hi def link naturalString String +hi def link naturalBoolean Boolean + +" All kinds of keywords +hi def link naturalConditional Conditional +hi def link naturalRepeat Repeat +hi def link naturalLoop Repeat +hi def link naturalFlow Keyword +hi def link naturalError Keyword +hi def link naturalKeyword Keyword +hi def link naturalOperator Operator +hi def link naturalParGui Operator + +" Labels +hi def link naturalLabel Label +hi def link naturalRefLabel Label + +" Comments +hi def link naturalPComment Comment +hi def link naturalComment Comment +hi def link naturalTodo Todo +hi def link naturalCommentMark PreProc + +hi def link naturalInclude Include +hi def link naturalSysVar Identifier +hi def link naturalLineNo LineNr +hi def link naturalLineRef Error +hi def link naturalSpecial Special +hi def link naturalComKey Todo + +" illegal things +hi def link naturalRMKeyword Error +hi def link naturalLegalIdent Error + +hi def link naturalType Type +hi def link naturalFunction Function +hi def link naturalObjName PreProc + let b:current_syntax = "natural" diff --git a/runtime/syntax/ncf.vim b/runtime/syntax/ncf.vim index 2019c03723..0027fd4ef8 100644 --- a/runtime/syntax/ncf.vim +++ b/runtime/syntax/ncf.vim @@ -4,10 +4,8 @@ " Last Change: Tue, 04 Sep 2001 16:20:33 CDT " $Id: ncf.vim,v 1.1 2004/06/13 16:31:58 vimboss Exp $ -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -217,42 +215,33 @@ if exists("ncf_highlight_unknowns") syn match Error "[^ \t]*" contains=ALL endif -if version >= 508 || !exists("did_ncf_syntax_inits") - if version < 508 - let did_ncf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default methods for highlighting. Can be overridden later - HiLink ncfCommands Statement - HiLink ncfSetCommands ncfCommands - HiLink ncfLogins ncfCommands - HiLink ncfString String - HiLink ncfContString ncfString - HiLink ncfComment Comment - HiLink ncfImplicit Type - HiLink ncfBoolean Boolean - HiLink ncfScript Identifier - HiLink ncfNumber Number - HiLink ncfIPAddr ncfNumber - HiLink ncfHexNumber ncfNumber - HiLink ncfTime ncfNumber - HiLink ncfDSTTime ncfNumber - HiLink ncfPath Constant - HiLink ncfServerName Special - HiLink ncfIPXNet ncfServerName - HiLink ncfTimeTypes Constant - HiLink ncfSetCommandsNum ncfSetCommands - HiLink ncfSetCommandsBool ncfSetCommands - HiLink ncfSetCommandsStr ncfSetCommands - HiLink ncfSetCommandsTime ncfSetCommands - HiLink ncfSetCommandsTimeDate ncfSetCommands - HiLink ncfSetCommandsBindCon ncfSetCommands +" The default methods for highlighting. Can be overridden later +hi def link ncfCommands Statement +hi def link ncfSetCommands ncfCommands +hi def link ncfLogins ncfCommands +hi def link ncfString String +hi def link ncfContString ncfString +hi def link ncfComment Comment +hi def link ncfImplicit Type +hi def link ncfBoolean Boolean +hi def link ncfScript Identifier +hi def link ncfNumber Number +hi def link ncfIPAddr ncfNumber +hi def link ncfHexNumber ncfNumber +hi def link ncfTime ncfNumber +hi def link ncfDSTTime ncfNumber +hi def link ncfPath Constant +hi def link ncfServerName Special +hi def link ncfIPXNet ncfServerName +hi def link ncfTimeTypes Constant +hi def link ncfSetCommandsNum ncfSetCommands +hi def link ncfSetCommandsBool ncfSetCommands +hi def link ncfSetCommandsStr ncfSetCommands +hi def link ncfSetCommandsTime ncfSetCommands +hi def link ncfSetCommandsTimeDate ncfSetCommands +hi def link ncfSetCommandsBindCon ncfSetCommands - delcommand HiLink -endif let b:current_syntax = "ncf" diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim index 718cee1429..3d3aa993bd 100644 --- a/runtime/syntax/netrw.vim +++ b/runtime/syntax/netrw.vim @@ -5,9 +5,8 @@ " --------------------------------------------------------------------- " Syntax Clearing: {{{1 -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 diff --git a/runtime/syntax/nqc.vim b/runtime/syntax/nqc.vim index 0a3cd6bc73..d09c106f98 100644 --- a/runtime/syntax/nqc.vim +++ b/runtime/syntax/nqc.vim @@ -6,11 +6,8 @@ " URL: http://www.enotes.de/twiki/pub/Home/LegoMindstorms/nqc.vim " Filenames: .nqc -" 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 @@ -326,52 +323,42 @@ endif exec "syn sync ccomment nqcComment minlines=" . nqc_minlines " 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_nqc_syn_inits") - if version < 508 - let did_nqc_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link nqcLabel Label +hi def link nqcConditional Conditional +hi def link nqcRepeat Repeat +hi def link nqcCharacter Character +hi def link nqcNumber Number +hi def link nqcFloat Float +hi def link nqcFunction Function +hi def link nqcParenError nqcError +hi def link nqcErrInParen nqcError +hi def link nqcErrInBracket nqcError +hi def link nqcCommentL nqcComment +hi def link nqcCommentStart nqcComment +hi def link nqcCommentError nqcError +hi def link nqcCommentStartError nqcError +hi def link nqcSpaceError nqcError +hi def link nqcStorageClass StorageClass +hi def link nqcInclude Include +hi def link nqcPreProc PreProc +hi def link nqcDefine Macro +hi def link nqcIncluded String +hi def link nqcError Error +hi def link nqcStatement Statement +hi def link nqcEvents Statement +hi def link nqcPreCondit PreCondit +hi def link nqcType Type +hi def link nqcConstant Constant +hi def link nqcCommentSkip nqcComment +hi def link nqcComment Comment +hi def link nqcTodo Todo +hi def link nqcCppSkip nqcCppOut +hi def link nqcCppOut2 nqcCppOut +hi def link nqcCppOut Comment - " The default methods for highlighting. Can be overridden later - HiLink nqcLabel Label - HiLink nqcConditional Conditional - HiLink nqcRepeat Repeat - HiLink nqcCharacter Character - HiLink nqcNumber Number - HiLink nqcFloat Float - HiLink nqcFunction Function - HiLink nqcParenError nqcError - HiLink nqcErrInParen nqcError - HiLink nqcErrInBracket nqcError - HiLink nqcCommentL nqcComment - HiLink nqcCommentStart nqcComment - HiLink nqcCommentError nqcError - HiLink nqcCommentStartError nqcError - HiLink nqcSpaceError nqcError - HiLink nqcStorageClass StorageClass - HiLink nqcInclude Include - HiLink nqcPreProc PreProc - HiLink nqcDefine Macro - HiLink nqcIncluded String - HiLink nqcError Error - HiLink nqcStatement Statement - HiLink nqcEvents Statement - HiLink nqcPreCondit PreCondit - HiLink nqcType Type - HiLink nqcConstant Constant - HiLink nqcCommentSkip nqcComment - HiLink nqcComment Comment - HiLink nqcTodo Todo - HiLink nqcCppSkip nqcCppOut - HiLink nqcCppOut2 nqcCppOut - HiLink nqcCppOut Comment - - delcommand HiLink -endif let b:current_syntax = "nqc" diff --git a/runtime/syntax/nroff.vim b/runtime/syntax/nroff.vim index 280ba9e7d9..3a8cf95856 100644 --- a/runtime/syntax/nroff.vim +++ b/runtime/syntax/nroff.vim @@ -22,12 +22,9 @@ " " {{{1 Start syntax highlighting. " -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" quit when a syntax file was already loaded " -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -197,65 +194,53 @@ syn keyword nroffTodo TODO XXX FIXME contained " " 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 +" Only when an item doesn't have highlighting yet " -if version >= 508 || !exists("did_nroff_syn_inits") - - if version < 508 - let did_nroff_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink nroffEscChar nroffSpecialChar - HiLink nroffEscCharAr nroffSpecialChar - HiLink nroffSpecialChar SpecialChar - HiLink nroffSpace Delimiter - - HiLink nroffEscRegArg2 nroffEscRegArg - HiLink nroffEscRegArg nroffIdent - - HiLink nroffEscArg2 nroffEscArg - HiLink nroffEscPar nroffEscape - - HiLink nroffEscRegPar nroffEscape - HiLink nroffEscArg nroffEscape - HiLink nroffSize nroffEscape - HiLink nroffEscape Preproc - - HiLink nroffIgnore Comment - HiLink nroffComment Comment - HiLink nroffTodo Todo - - HiLink nroffReqLeader nroffRequest - HiLink nroffReqName nroffRequest - HiLink nroffRequest Statement - HiLink nroffCond PreCondit - HiLink nroffDefIdent nroffIdent - HiLink nroffIdent Identifier - - HiLink nroffEquation PreProc - HiLink nroffTable PreProc - HiLink nroffPicture PreProc - HiLink nroffRefer PreProc - HiLink nroffGrap PreProc - HiLink nroffGremlin PreProc - - HiLink nroffNumber Number - HiLink nroffBadChar nroffError - HiLink nroffSpaceError nroffError - HiLink nroffError Error - - HiLink nroffPreserve String - HiLink nroffString String - HiLink nroffDefinition String - HiLink nroffDefSpecial Special - - delcommand HiLink -endif +hi def link nroffEscChar nroffSpecialChar +hi def link nroffEscCharAr nroffSpecialChar +hi def link nroffSpecialChar SpecialChar +hi def link nroffSpace Delimiter + +hi def link nroffEscRegArg2 nroffEscRegArg +hi def link nroffEscRegArg nroffIdent + +hi def link nroffEscArg2 nroffEscArg +hi def link nroffEscPar nroffEscape + +hi def link nroffEscRegPar nroffEscape +hi def link nroffEscArg nroffEscape +hi def link nroffSize nroffEscape +hi def link nroffEscape Preproc + +hi def link nroffIgnore Comment +hi def link nroffComment Comment +hi def link nroffTodo Todo + +hi def link nroffReqLeader nroffRequest +hi def link nroffReqName nroffRequest +hi def link nroffRequest Statement +hi def link nroffCond PreCondit +hi def link nroffDefIdent nroffIdent +hi def link nroffIdent Identifier + +hi def link nroffEquation PreProc +hi def link nroffTable PreProc +hi def link nroffPicture PreProc +hi def link nroffRefer PreProc +hi def link nroffGrap PreProc +hi def link nroffGremlin PreProc + +hi def link nroffNumber Number +hi def link nroffBadChar nroffError +hi def link nroffSpaceError nroffError +hi def link nroffError Error + +hi def link nroffPreserve String +hi def link nroffString String +hi def link nroffDefinition String +hi def link nroffDefSpecial Special + let b:current_syntax = "nroff" diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim index d6d803714e..3a343dd430 100644 --- a/runtime/syntax/nsis.vim +++ b/runtime/syntax/nsis.vim @@ -3,11 +3,8 @@ " Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> " Last Change: 2004 May 12 -" 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 @@ -224,48 +221,36 @@ syn keyword nsisError UninstallExeName " 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_nsis_syn_inits") - - if version < 508 - let did_nsys_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink nsisInstruction Function - HiLink nsisComment Comment - HiLink nsisLocalLabel Label - HiLink nsisGlobalLabel Label - HiLink nsisStatement Statement - HiLink nsisString String - HiLink nsisBoolean Boolean - HiLink nsisAttribOptions Constant - HiLink nsisExecShell Constant - HiLink nsisFileAttrib Constant - HiLink nsisMessageBox Constant - HiLink nsisRegistry Identifier - HiLink nsisNumber Number - HiLink nsisError Error - HiLink nsisUserVar Identifier - HiLink nsisSysVar Identifier - HiLink nsisAttribute Type - HiLink nsisCompiler Type - HiLink nsisTodo Todo - HiLink nsisCallback Operator - " preprocessor commands - HiLink nsisPreprocSubst PreProc - HiLink nsisDefine Define - HiLink nsisMacro Macro - HiLink nsisPreCondit PreCondit - HiLink nsisInclude Include - HiLink nsisSystem PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link nsisInstruction Function +hi def link nsisComment Comment +hi def link nsisLocalLabel Label +hi def link nsisGlobalLabel Label +hi def link nsisStatement Statement +hi def link nsisString String +hi def link nsisBoolean Boolean +hi def link nsisAttribOptions Constant +hi def link nsisExecShell Constant +hi def link nsisFileAttrib Constant +hi def link nsisMessageBox Constant +hi def link nsisRegistry Identifier +hi def link nsisNumber Number +hi def link nsisError Error +hi def link nsisUserVar Identifier +hi def link nsisSysVar Identifier +hi def link nsisAttribute Type +hi def link nsisCompiler Type +hi def link nsisTodo Todo +hi def link nsisCallback Operator +" preprocessor commands +hi def link nsisPreprocSubst PreProc +hi def link nsisDefine Define +hi def link nsisMacro Macro +hi def link nsisPreCondit PreCondit +hi def link nsisInclude Include +hi def link nsisSystem PreProc + let b:current_syntax = "nsis" diff --git a/runtime/syntax/obj.vim b/runtime/syntax/obj.vim index 66cd6c2bde..df4dbca5d7 100644 --- a/runtime/syntax/obj.vim +++ b/runtime/syntax/obj.vim @@ -4,11 +4,8 @@ " File Types: .obj (used in 3D) " Last Change: 2010 May 18 " -" 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 @@ -62,34 +59,24 @@ syn match objInt "\d\+" syn match objIndex "\d\+\/\d*\/\d*" " 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_cabal_syn_inits") - if version < 508 - let did_cabal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink objError Error - HiLink objComment Comment - HiLink objInclude PreProc - HiLink objFloat Float - HiLink objInt Number - HiLink objGroup Structure - HiLink objIndex Constant - HiLink objMaterial Label +hi def link objError Error +hi def link objComment Comment +hi def link objInclude PreProc +hi def link objFloat Float +hi def link objInt Number +hi def link objGroup Structure +hi def link objIndex Constant +hi def link objMaterial Label - HiLink objVertex Keyword - HiLink objNormale Keyword - HiLink objVertice Keyword - HiLink objFace Keyword - HiLink objKeywords Keyword +hi def link objVertex Keyword +hi def link objNormale Keyword +hi def link objVertice Keyword +hi def link objFace Keyword +hi def link objKeywords Keyword - delcommand HiLink -endif let b:current_syntax = "obj" diff --git a/runtime/syntax/objcpp.vim b/runtime/syntax/objcpp.vim index e80eed900d..f11e307444 100644 --- a/runtime/syntax/objcpp.vim +++ b/runtime/syntax/objcpp.vim @@ -4,23 +4,15 @@ " Ex-Maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm> " Last Change: 2007 Oct 29 -" 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 " Read in C++ and ObjC syntax files -if version < 600 - so <sfile>:p:h/cpp.vim - so <sfile>:p:h/objc.vim -else - runtime! syntax/cpp.vim - unlet b:current_syntax - runtime! syntax/objc.vim -endif +runtime! syntax/cpp.vim +unlet b:current_syntax +runtime! syntax/objc.vim syn keyword objCppNonStructure class template namespace transparent contained syn keyword objCppNonStatement new delete friend using transparent contained diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim index 24116f0e02..68c1feddae 100644 --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -13,11 +13,8 @@ " can be distinguished from begin/end, which is used for indentation, " and folding. (David Baelde) -" 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") && b:current_syntax == "ocaml" +" quit when a syntax file was already loaded +if exists("b:current_syntax") && b:current_syntax == "ocaml" finish endif @@ -253,78 +250,68 @@ syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>" syn sync match ocamlSigSync groupthere ocamlSig "\<end\>" " 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_ocaml_syntax_inits") - if version < 508 - let did_ocaml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ocamlBraceErr Error - HiLink ocamlBrackErr Error - HiLink ocamlParenErr Error - HiLink ocamlArrErr Error - - HiLink ocamlCommentErr Error - - HiLink ocamlCountErr Error - HiLink ocamlDoErr Error - HiLink ocamlDoneErr Error - HiLink ocamlEndErr Error - HiLink ocamlThenErr Error - - HiLink ocamlCharErr Error - - HiLink ocamlErr Error - - HiLink ocamlComment Comment - - HiLink ocamlModPath Include - HiLink ocamlObject Include - HiLink ocamlModule Include - HiLink ocamlModParam1 Include - HiLink ocamlModType Include - HiLink ocamlMPRestr3 Include - HiLink ocamlFullMod Include - HiLink ocamlModTypeRestr Include - HiLink ocamlWith Include - HiLink ocamlMTDef Include - - HiLink ocamlScript Include - - HiLink ocamlConstructor Constant - - HiLink ocamlVal Keyword - HiLink ocamlModPreRHS Keyword - HiLink ocamlMPRestr2 Keyword - HiLink ocamlKeyword Keyword - HiLink ocamlMethod Include - HiLink ocamlFunDef Keyword - HiLink ocamlRefAssign Keyword - HiLink ocamlKeyChar Keyword - HiLink ocamlAnyVar Keyword - HiLink ocamlTopStop Keyword - HiLink ocamlOperator Keyword - - HiLink ocamlBoolean Boolean - HiLink ocamlCharacter Character - HiLink ocamlNumber Number - HiLink ocamlFloat Float - HiLink ocamlString String - - HiLink ocamlLabel Identifier - - HiLink ocamlType Type - - HiLink ocamlTodo Todo - - HiLink ocamlEncl Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link ocamlBraceErr Error +hi def link ocamlBrackErr Error +hi def link ocamlParenErr Error +hi def link ocamlArrErr Error + +hi def link ocamlCommentErr Error + +hi def link ocamlCountErr Error +hi def link ocamlDoErr Error +hi def link ocamlDoneErr Error +hi def link ocamlEndErr Error +hi def link ocamlThenErr Error + +hi def link ocamlCharErr Error + +hi def link ocamlErr Error + +hi def link ocamlComment Comment + +hi def link ocamlModPath Include +hi def link ocamlObject Include +hi def link ocamlModule Include +hi def link ocamlModParam1 Include +hi def link ocamlModType Include +hi def link ocamlMPRestr3 Include +hi def link ocamlFullMod Include +hi def link ocamlModTypeRestr Include +hi def link ocamlWith Include +hi def link ocamlMTDef Include + +hi def link ocamlScript Include + +hi def link ocamlConstructor Constant + +hi def link ocamlVal Keyword +hi def link ocamlModPreRHS Keyword +hi def link ocamlMPRestr2 Keyword +hi def link ocamlKeyword Keyword +hi def link ocamlMethod Include +hi def link ocamlFunDef Keyword +hi def link ocamlRefAssign Keyword +hi def link ocamlKeyChar Keyword +hi def link ocamlAnyVar Keyword +hi def link ocamlTopStop Keyword +hi def link ocamlOperator Keyword + +hi def link ocamlBoolean Boolean +hi def link ocamlCharacter Character +hi def link ocamlNumber Number +hi def link ocamlFloat Float +hi def link ocamlString String + +hi def link ocamlLabel Identifier + +hi def link ocamlType Type + +hi def link ocamlTodo Todo + +hi def link ocamlEncl Keyword + let b:current_syntax = "ocaml" diff --git a/runtime/syntax/occam.vim b/runtime/syntax/occam.vim index 1c84bf00f6..01d139bd09 100644 --- a/runtime/syntax/occam.vim +++ b/runtime/syntax/occam.vim @@ -4,9 +4,8 @@ " Maintainer: Mario Schweigler <ms44@kent.ac.uk> " Last Change: 24 May 2003 -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 @@ -86,41 +85,32 @@ syn match occamCDString /<\|>\|=\|(\|)/ contained syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString -if version >= 508 || !exists("did_occam_syn_inits") - if version < 508 - let did_occam_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink occamType Type - HiLink occamKeyword Keyword - HiLink occamComment Comment - HiLink occamCommentTitle PreProc - HiLink occamTodo Todo - HiLink occamNote Todo - HiLink occamString String - HiLink occamCharString String - HiLink occamNumber Number - HiLink occamCDirective PreProc - HiLink occamCDString String - HiLink occamPPIdentifier PreProc - HiLink occamBoolean Boolean - HiLink occamSpecialChar SpecialChar - HiLink occamChar Character - HiLink occamStructure Structure - HiLink occamIdentifier Identifier - HiLink occamConstant Constant - HiLink occamOperator Operator - HiLink occamFunction Ignore - HiLink occamRepeat Repeat - HiLink occamConditional Conditional - HiLink occamBrackets Type - HiLink occamParantheses Delimiter - - delcommand HiLink -endif + +hi def link occamType Type +hi def link occamKeyword Keyword +hi def link occamComment Comment +hi def link occamCommentTitle PreProc +hi def link occamTodo Todo +hi def link occamNote Todo +hi def link occamString String +hi def link occamCharString String +hi def link occamNumber Number +hi def link occamCDirective PreProc +hi def link occamCDString String +hi def link occamPPIdentifier PreProc +hi def link occamBoolean Boolean +hi def link occamSpecialChar SpecialChar +hi def link occamChar Character +hi def link occamStructure Structure +hi def link occamIdentifier Identifier +hi def link occamConstant Constant +hi def link occamOperator Operator +hi def link occamFunction Ignore +hi def link occamRepeat Repeat +hi def link occamConditional Conditional +hi def link occamBrackets Type +hi def link occamParantheses Delimiter + let b:current_syntax = "occam" diff --git a/runtime/syntax/omnimark.vim b/runtime/syntax/omnimark.vim index 698b3c09fb..6294945ffb 100644 --- a/runtime/syntax/omnimark.vim +++ b/runtime/syntax/omnimark.vim @@ -3,19 +3,12 @@ " Maintainer: Paul Terray <mailto:terray@4dconcept.fr> " Last Change: 11 Oct 2000 -" 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 -if version < 600 - set iskeyword=@,48-57,_,128-167,224-235,- -else - setlocal iskeyword=@,48-57,_,128-167,224-235,- -endif +setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword omnimarkKeywords ACTIVATE AGAIN syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE @@ -96,26 +89,16 @@ syn match omnimarkEscape contained +%[0-9][0-9]#+ syn sync minlines=2000 " 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_omnimark_syntax_inits") - if version < 508 - let did_omnimark_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink omnimarkCommands Statement - HiLink omnimarkKeywords Identifier - HiLink omnimarkString String - HiLink omnimarkPatterns Macro -" HiLink omnimarkNumber Number - HiLink omnimarkComment Comment - HiLink omnimarkEscape Special +hi def link omnimarkCommands Statement +hi def link omnimarkKeywords Identifier +hi def link omnimarkString String +hi def link omnimarkPatterns Macro +" hi def link omnimarkNumber Number +hi def link omnimarkComment Comment +hi def link omnimarkEscape Special - delcommand HiLink -endif let b:current_syntax = "omnimark" diff --git a/runtime/syntax/openroad.vim b/runtime/syntax/openroad.vim index 3f9a78d552..e09f233647 100644 --- a/runtime/syntax/openroad.vim +++ b/runtime/syntax/openroad.vim @@ -3,12 +3,8 @@ " Maintainer: Luis Moreno <lmoreno@eresmas.net> " Last change: 2001 Jun 12 -" 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 @@ -235,32 +231,22 @@ else endif " 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 +" Only when an item doesn't have highlighting yet " -if version >= 508 || !exists("did_openroad_syntax_inits") - if version < 508 - let did_openroad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink openroadKeyword Statement - HiLink openroadNumber Number - HiLink openroadString String - HiLink openroadComment Comment - HiLink openroadOperator Operator - HiLink openroadType Type - HiLink openroadFunc Special - HiLink openroadClass Type - HiLink openroadEvent Statement - HiLink openroadConst Constant - HiLink openroadVar Identifier - HiLink openroadIdent Identifier - HiLink openroadTodo Todo +hi def link openroadKeyword Statement +hi def link openroadNumber Number +hi def link openroadString String +hi def link openroadComment Comment +hi def link openroadOperator Operator +hi def link openroadType Type +hi def link openroadFunc Special +hi def link openroadClass Type +hi def link openroadEvent Statement +hi def link openroadConst Constant +hi def link openroadVar Identifier +hi def link openroadIdent Identifier +hi def link openroadTodo Todo - delcommand HiLink -endif let b:current_syntax = "openroad" diff --git a/runtime/syntax/opl.vim b/runtime/syntax/opl.vim index 1b07e3596c..8b66a5b345 100644 --- a/runtime/syntax/opl.vim +++ b/runtime/syntax/opl.vim @@ -6,11 +6,8 @@ " Open Psion Language... (EPOC16/EPOC32) -" 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 @@ -75,25 +72,15 @@ syn region OPLComment start="REM[\t ]" end="$" syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" " 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_OPL_syntax_inits") - if version < 508 - let did_OPL_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink OPLStatement Statement - HiLink OPLNumber Number - HiLink OPLString String - HiLink OPLComment Comment - HiLink OPLMathsOperator Conditional -" HiLink OPLError Error +hi def link OPLStatement Statement +hi def link OPLNumber Number +hi def link OPLString String +hi def link OPLComment Comment +hi def link OPLMathsOperator Conditional +" hi def link OPLError Error - delcommand HiLink -endif let b:current_syntax = "opl" diff --git a/runtime/syntax/ora.vim b/runtime/syntax/ora.vim index bf5d3220a0..99034793f2 100644 --- a/runtime/syntax/ora.vim +++ b/runtime/syntax/ora.vim @@ -11,10 +11,8 @@ " sqlnet-ora and tnsnames.ora; since will not cause(?) problems " is easier to follow separately each file's keywords) -" Remove any old syntax stuff hanging around, if needed -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -437,35 +435,23 @@ syn cluster oraAll add=oraValue,oraModifier,oraString,oraSpecial,oraComment "============================================================================== " 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_ora_syn_inits") - - if version < 508 - let did_ora_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink oraKeyword Statement "usual keywords - HiLink oraKeywordGroup Type "keywords which group other keywords - HiLink oraKeywordPref oraKeywordGroup "keywords which act as prefixes - HiLink oraKeywordObs Todo "obsolete keywords - HiLink oraKeywordUnd PreProc "undocumented keywords - HiLink oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords - HiLink oraValue Identifier "values, like true or false - HiLink oraModifier oraValue "modifies values - HiLink oraString String "strings - - HiLink oraSpecial Special "special characters - HiLink oraError Error "errors - HiLink oraParenError oraError "errors caused by mismatching parantheses - - HiLink oraComment Comment "comments - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link oraKeyword Statement "usual keywords +hi def link oraKeywordGroup Type "keywords which group other keywords +hi def link oraKeywordPref oraKeywordGroup "keywords which act as prefixes +hi def link oraKeywordObs Todo "obsolete keywords +hi def link oraKeywordUnd PreProc "undocumented keywords +hi def link oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords +hi def link oraValue Identifier "values, like true or false +hi def link oraModifier oraValue "modifies values +hi def link oraString String "strings + +hi def link oraSpecial Special "special characters +hi def link oraError Error "errors +hi def link oraParenError oraError "errors caused by mismatching parantheses + +hi def link oraComment Comment "comments diff --git a/runtime/syntax/papp.vim b/runtime/syntax/papp.vim index d86dce603f..5b65f05cf4 100644 --- a/runtime/syntax/papp.vim +++ b/runtime/syntax/papp.vim @@ -14,41 +14,24 @@ " pod is, btw, allowed everywhere, which is actually wrong :( -" 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 " source is basically xml, with included html (this is common) and perl bits -if version < 600 - so <sfile>:p:h/xml.vim -else - runtime! syntax/xml.vim -endif +runtime! syntax/xml.vim unlet b:current_syntax if exists("papp_include_html") - if version < 600 - syn include @PAppHtml <sfile>:p:h/html.vim - else - syn include @PAppHtml syntax/html.vim - endif + syn include @PAppHtml syntax/html.vim unlet b:current_syntax syntax spell default " added by Bram endif -if version < 600 - syn include @PAppPerl <sfile>:p:h/perl.vim -else - syn include @PAppPerl syntax/perl.vim -endif +syn include @PAppPerl syntax/perl.vim -if v:version >= 600 - syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD -endif +syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD " preprocessor commands syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained diff --git a/runtime/syntax/pascal.vim b/runtime/syntax/pascal.vim index d2b6060acc..2a58ee43f6 100644 --- a/runtime/syntax/pascal.vim +++ b/runtime/syntax/pascal.vim @@ -12,11 +12,8 @@ " Austin Ziegler <austin@halostatue.ca>, " Markus Koenig <markus@stber-koenig.de> -" 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 @@ -320,52 +317,42 @@ if !exists("pascal_traditional") endif " 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_pascal_syn_inits") - if version < 508 - let did_pascal_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link pascalAcces pascalStatement +hi def link pascalBoolean Boolean +hi def link pascalComment Comment +hi def link pascalConditional Conditional +hi def link pascalConstant Constant +hi def link pascalDelimiter Identifier +hi def link pascalDirective pascalStatement +hi def link pascalException Exception +hi def link pascalFloat Float +hi def link pascalFunction Function +hi def link pascalLabel Label +hi def link pascalMatrixDelimiter Identifier +hi def link pascalModifier Type +hi def link pascalNumber Number +hi def link pascalOperator Operator +hi def link pascalPredefined pascalStatement +hi def link pascalPreProc PreProc +hi def link pascalRepeat Repeat +hi def link pascalSpaceError Error +hi def link pascalStatement Statement +hi def link pascalString String +hi def link pascalStringEscape Special +hi def link pascalStringEscapeGPC Special +hi def link pascalStringError Error +hi def link pascalStruct pascalStatement +hi def link pascalSymbolOperator pascalOperator +hi def link pascalTodo Todo +hi def link pascalType Type +hi def link pascalUnclassified pascalStatement +" hi def link pascalAsm Assembler +hi def link pascalError Error +hi def link pascalAsmKey pascalStatement +hi def link pascalShowTab Error - HiLink pascalAcces pascalStatement - HiLink pascalBoolean Boolean - HiLink pascalComment Comment - HiLink pascalConditional Conditional - HiLink pascalConstant Constant - HiLink pascalDelimiter Identifier - HiLink pascalDirective pascalStatement - HiLink pascalException Exception - HiLink pascalFloat Float - HiLink pascalFunction Function - HiLink pascalLabel Label - HiLink pascalMatrixDelimiter Identifier - HiLink pascalModifier Type - HiLink pascalNumber Number - HiLink pascalOperator Operator - HiLink pascalPredefined pascalStatement - HiLink pascalPreProc PreProc - HiLink pascalRepeat Repeat - HiLink pascalSpaceError Error - HiLink pascalStatement Statement - HiLink pascalString String - HiLink pascalStringEscape Special - HiLink pascalStringEscapeGPC Special - HiLink pascalStringError Error - HiLink pascalStruct pascalStatement - HiLink pascalSymbolOperator pascalOperator - HiLink pascalTodo Todo - HiLink pascalType Type - HiLink pascalUnclassified pascalStatement - " HiLink pascalAsm Assembler - HiLink pascalError Error - HiLink pascalAsmKey pascalStatement - HiLink pascalShowTab Error - - delcommand HiLink -endif let b:current_syntax = "pascal" diff --git a/runtime/syntax/pcap.vim b/runtime/syntax/pcap.vim index 17d0d42c0b..e0eed633c1 100644 --- a/runtime/syntax/pcap.vim +++ b/runtime/syntax/pcap.vim @@ -4,20 +4,13 @@ " Modified by Bram " Last Change: 2003 May 11 -" 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 "define keywords -if version < 600 - set isk=@,46-57,_,-,#,=,192-255 -else - setlocal isk=@,46-57,_,-,#,=,192-255 -endif +setlocal isk=@,46-57,_,-,#,=,192-255 "first all the bad guys syn match pcapBad '^.\+$' "define any line as bad @@ -43,22 +36,12 @@ syn sync minlines=50 " 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_pcap_syntax_inits") - if version < 508 - let did_pcap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink pcapBad WarningMsg - HiLink pcapBadword WarningMsg - HiLink pcapComment Comment +hi def link pcapBad WarningMsg +hi def link pcapBadword WarningMsg +hi def link pcapComment Comment - delcommand HiLink -endif let b:current_syntax = "pcap" diff --git a/runtime/syntax/pccts.vim b/runtime/syntax/pccts.vim index 8341f5bd43..780035798b 100644 --- a/runtime/syntax/pccts.vim +++ b/runtime/syntax/pccts.vim @@ -3,20 +3,13 @@ " Maintainer: Scott Bigham <dsb@killerbunnies.org> " Last Change: 10 Aug 1999 -" 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 " Read the C++ syntax to start with -if version < 600 - syn include @cppTopLevel <sfile>:p:h/cpp.vim -else - syn include @cppTopLevel syntax/cpp.vim -endif +syn include @cppTopLevel syntax/cpp.vim syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef @@ -72,34 +65,24 @@ syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^] syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" " 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_pccts_syntax_inits") - if version < 508 - let did_pccts_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink pcctsDelim Special - HiLink pcctsTokenName Identifier - HiLink pcctsRuleName Statement - HiLink pcctsLabelHack Label - HiLink pcctsDirective PreProc - HiLink pcctsString String - HiLink pcctsComment Comment - HiLink pcctsClass Statement - HiLink pcctsClassName Identifier - HiLink pcctsException Statement - HiLink pcctsExceptionHandler Keyword - HiLink pcctsExceptionRuleRef pcctsDelim - HiLink pcctsExceptionID Identifier - HiLink pcctsRuleRef Identifier - HiLink pcctsSpecialChar SpecialChar - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link pcctsDelim Special +hi def link pcctsTokenName Identifier +hi def link pcctsRuleName Statement +hi def link pcctsLabelHack Label +hi def link pcctsDirective PreProc +hi def link pcctsString String +hi def link pcctsComment Comment +hi def link pcctsClass Statement +hi def link pcctsClassName Identifier +hi def link pcctsException Statement +hi def link pcctsExceptionHandler Keyword +hi def link pcctsExceptionRuleRef pcctsDelim +hi def link pcctsExceptionID Identifier +hi def link pcctsRuleRef Identifier +hi def link pcctsSpecialChar SpecialChar + let b:current_syntax = "pccts" diff --git a/runtime/syntax/perl.vim b/runtime/syntax/perl.vim index c09373a5cd..6ab6cd83a2 100644 --- a/runtime/syntax/perl.vim +++ b/runtime/syntax/perl.vim @@ -435,121 +435,119 @@ else syn sync minlines=0 endif -command -nargs=+ HiLink hi def link <args> " NOTE: If you're linking new highlight groups to perlString, please also put " them into b:match_skip in ftplugin/perl.vim. " The default highlighting. -HiLink perlSharpBang PreProc -HiLink perlControl PreProc -HiLink perlInclude Include -HiLink perlSpecial Special -HiLink perlString String -HiLink perlCharacter Character -HiLink perlNumber Number -HiLink perlFloat Float -HiLink perlType Type -HiLink perlIdentifier Identifier -HiLink perlLabel Label -HiLink perlStatement Statement -HiLink perlConditional Conditional -HiLink perlRepeat Repeat -HiLink perlOperator Operator -HiLink perlFunction Keyword -HiLink perlSubName Function -HiLink perlSubPrototype Type -HiLink perlSubAttributes PreProc -HiLink perlSubAttributesCont perlSubAttributes -HiLink perlComment Comment -HiLink perlTodo Todo +hi def link perlSharpBang PreProc +hi def link perlControl PreProc +hi def link perlInclude Include +hi def link perlSpecial Special +hi def link perlString String +hi def link perlCharacter Character +hi def link perlNumber Number +hi def link perlFloat Float +hi def link perlType Type +hi def link perlIdentifier Identifier +hi def link perlLabel Label +hi def link perlStatement Statement +hi def link perlConditional Conditional +hi def link perlRepeat Repeat +hi def link perlOperator Operator +hi def link perlFunction Keyword +hi def link perlSubName Function +hi def link perlSubPrototype Type +hi def link perlSubAttributes PreProc +hi def link perlSubAttributesCont perlSubAttributes +hi def link perlComment Comment +hi def link perlTodo Todo if exists("perl_string_as_statement") - HiLink perlStringStartEnd perlStatement + hi def link perlStringStartEnd perlStatement else - HiLink perlStringStartEnd perlString + hi def link perlStringStartEnd perlString endif -HiLink perlVStringV perlStringStartEnd -HiLink perlList perlStatement -HiLink perlMisc perlStatement -HiLink perlVarPlain perlIdentifier -HiLink perlVarPlain2 perlIdentifier -HiLink perlArrow perlIdentifier -HiLink perlFiledescRead perlIdentifier -HiLink perlFiledescStatement perlIdentifier -HiLink perlVarSimpleMember perlIdentifier -HiLink perlVarSimpleMemberName perlString -HiLink perlVarNotInMatches perlIdentifier -HiLink perlVarSlash perlIdentifier -HiLink perlQQ perlString -HiLink perlHereDoc perlString -HiLink perlStringUnexpanded perlString -HiLink perlSubstitutionSQ perlString -HiLink perlSubstitutionGQQ perlString -HiLink perlTranslationGQ perlString -HiLink perlMatch perlString -HiLink perlMatchStartEnd perlStatement -HiLink perlFormatName perlIdentifier -HiLink perlFormatField perlString -HiLink perlPackageDecl perlType -HiLink perlStorageClass perlType -HiLink perlPackageRef perlType -HiLink perlStatementPackage perlStatement -HiLink perlStatementStorage perlStatement -HiLink perlStatementControl perlStatement -HiLink perlStatementScalar perlStatement -HiLink perlStatementRegexp perlStatement -HiLink perlStatementNumeric perlStatement -HiLink perlStatementList perlStatement -HiLink perlStatementHash perlStatement -HiLink perlStatementIOfunc perlStatement -HiLink perlStatementFiledesc perlStatement -HiLink perlStatementVector perlStatement -HiLink perlStatementFiles perlStatement -HiLink perlStatementFlow perlStatement -HiLink perlStatementInclude perlStatement -HiLink perlStatementProc perlStatement -HiLink perlStatementSocket perlStatement -HiLink perlStatementIPC perlStatement -HiLink perlStatementNetwork perlStatement -HiLink perlStatementPword perlStatement -HiLink perlStatementTime perlStatement -HiLink perlStatementMisc perlStatement -HiLink perlStatementIndirObj perlStatement -HiLink perlFunctionName perlIdentifier -HiLink perlMethod perlIdentifier -HiLink perlFunctionPRef perlType -HiLink perlPOD perlComment -HiLink perlShellCommand perlString -HiLink perlSpecialAscii perlSpecial -HiLink perlSpecialDollar perlSpecial -HiLink perlSpecialString perlSpecial -HiLink perlSpecialStringU perlSpecial -HiLink perlSpecialMatch perlSpecial -HiLink perlDATA perlComment +hi def link perlVStringV perlStringStartEnd +hi def link perlList perlStatement +hi def link perlMisc perlStatement +hi def link perlVarPlain perlIdentifier +hi def link perlVarPlain2 perlIdentifier +hi def link perlArrow perlIdentifier +hi def link perlFiledescRead perlIdentifier +hi def link perlFiledescStatement perlIdentifier +hi def link perlVarSimpleMember perlIdentifier +hi def link perlVarSimpleMemberName perlString +hi def link perlVarNotInMatches perlIdentifier +hi def link perlVarSlash perlIdentifier +hi def link perlQQ perlString +hi def link perlHereDoc perlString +hi def link perlStringUnexpanded perlString +hi def link perlSubstitutionSQ perlString +hi def link perlSubstitutionGQQ perlString +hi def link perlTranslationGQ perlString +hi def link perlMatch perlString +hi def link perlMatchStartEnd perlStatement +hi def link perlFormatName perlIdentifier +hi def link perlFormatField perlString +hi def link perlPackageDecl perlType +hi def link perlStorageClass perlType +hi def link perlPackageRef perlType +hi def link perlStatementPackage perlStatement +hi def link perlStatementStorage perlStatement +hi def link perlStatementControl perlStatement +hi def link perlStatementScalar perlStatement +hi def link perlStatementRegexp perlStatement +hi def link perlStatementNumeric perlStatement +hi def link perlStatementList perlStatement +hi def link perlStatementHash perlStatement +hi def link perlStatementIOfunc perlStatement +hi def link perlStatementFiledesc perlStatement +hi def link perlStatementVector perlStatement +hi def link perlStatementFiles perlStatement +hi def link perlStatementFlow perlStatement +hi def link perlStatementInclude perlStatement +hi def link perlStatementProc perlStatement +hi def link perlStatementSocket perlStatement +hi def link perlStatementIPC perlStatement +hi def link perlStatementNetwork perlStatement +hi def link perlStatementPword perlStatement +hi def link perlStatementTime perlStatement +hi def link perlStatementMisc perlStatement +hi def link perlStatementIndirObj perlStatement +hi def link perlFunctionName perlIdentifier +hi def link perlMethod perlIdentifier +hi def link perlFunctionPRef perlType +hi def link perlPOD perlComment +hi def link perlShellCommand perlString +hi def link perlSpecialAscii perlSpecial +hi def link perlSpecialDollar perlSpecial +hi def link perlSpecialString perlSpecial +hi def link perlSpecialStringU perlSpecial +hi def link perlSpecialMatch perlSpecial +hi def link perlDATA perlComment " NOTE: Due to a bug in Vim (or more likely, a misunderstanding on my part), " I had to remove the transparent property from the following regions " in order to get them to highlight correctly. Feel free to remove " these and reinstate the transparent property if you know how. -HiLink perlParensSQ perlString -HiLink perlBracketsSQ perlString -HiLink perlBracesSQ perlString -HiLink perlAnglesSQ perlString +hi def link perlParensSQ perlString +hi def link perlBracketsSQ perlString +hi def link perlBracesSQ perlString +hi def link perlAnglesSQ perlString -HiLink perlParensDQ perlString -HiLink perlBracketsDQ perlString -HiLink perlBracesDQ perlString -HiLink perlAnglesDQ perlString +hi def link perlParensDQ perlString +hi def link perlBracketsDQ perlString +hi def link perlBracesDQ perlString +hi def link perlAnglesDQ perlString -HiLink perlSpecialStringU2 perlString +hi def link perlSpecialStringU2 perlString " Possible errors -HiLink perlNotEmptyLine Error -HiLink perlElseIfError Error -HiLink perlSubPrototypeError Error -HiLink perlSubError Error +hi def link perlNotEmptyLine Error +hi def link perlElseIfError Error +hi def link perlSubPrototypeError Error +hi def link perlSubError Error -delcommand HiLink " Syncing to speed up processing " diff --git a/runtime/syntax/perl6.vim b/runtime/syntax/perl6.vim index 3d82ced89f..3bcd9ff0e9 100644 --- a/runtime/syntax/perl6.vim +++ b/runtime/syntax/perl6.vim @@ -61,11 +61,8 @@ " unlet perl6_extended_q " unlet perl6_extended_all -" 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 @@ -2063,176 +2060,166 @@ syn region p6PodFormatFrench \ contains=p6PodFormatAnglesFrench,p6PodFormatFrench,p6PodFormatOne,p6PodFormatTwo,p6PodFormatThree,p6PodVerticalBar,p6PodSemiColon,p6PodComma " 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_perl6_syntax_inits") - if version < 508 - let did_perl6_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link p6EscOctOld p6Error +hi def link p6PackageTwigil p6Twigil +hi def link p6StringAngle p6String +hi def link p6StringFrench p6String +hi def link p6StringAngles p6String +hi def link p6StringSQ p6String +hi def link p6StringDQ p6String +hi def link p6StringQ p6String +hi def link p6RxStringSQ p6String +hi def link p6RxStringDQ p6String +hi def link p6Substitution p6String +hi def link p6Transliteration p6String +hi def link p6StringAuto p6String +hi def link p6StringP5Auto p6String +hi def link p6Key p6String +hi def link p6Match p6String +hi def link p6RegexBlock p6String +hi def link p6RxP5CharClass p6String +hi def link p6RxP5QuoteMeta p6String +hi def link p6RxCharClass p6String +hi def link p6RxQuoteWords p6String +hi def link p6ReduceOp p6Operator +hi def link p6ReverseCrossOp p6Operator +hi def link p6HyperOp p6Operator +hi def link p6QuoteQ p6Operator +hi def link p6RxRange p6StringSpecial +hi def link p6RxAnchor p6StringSpecial +hi def link p6RxP5Anchor p6StringSpecial +hi def link p6CodePoint p6StringSpecial +hi def link p6RxMeta p6StringSpecial +hi def link p6RxP5Range p6StringSpecial +hi def link p6RxP5CPId p6StringSpecial +hi def link p6RxP5Posix p6StringSpecial +hi def link p6RxP5Mod p6StringSpecial +hi def link p6RxP5HexSeq p6StringSpecial +hi def link p6RxP5OctSeq p6StringSpecial +hi def link p6RxP5WriteRefId p6StringSpecial +hi def link p6HexSequence p6StringSpecial +hi def link p6OctSequence p6StringSpecial +hi def link p6RxP5Named p6StringSpecial +hi def link p6RxP5PropId p6StringSpecial +hi def link p6RxP5Quantifier p6StringSpecial +hi def link p6RxP5CountId p6StringSpecial +hi def link p6RxP5Verb p6StringSpecial +hi def link p6Escape p6StringSpecial2 +hi def link p6EscNull p6StringSpecial2 +hi def link p6EscHash p6StringSpecial2 +hi def link p6EscQQ p6StringSpecial2 +hi def link p6EscQuote p6StringSpecial2 +hi def link p6EscDoubleQuote p6StringSpecial2 +hi def link p6EscBackTick p6StringSpecial2 +hi def link p6EscForwardSlash p6StringSpecial2 +hi def link p6EscVerticalBar p6StringSpecial2 +hi def link p6EscExclamation p6StringSpecial2 +hi def link p6EscDollar p6StringSpecial2 +hi def link p6EscOpenCurly p6StringSpecial2 +hi def link p6EscCloseCurly p6StringSpecial2 +hi def link p6EscCloseBracket p6StringSpecial2 +hi def link p6EscCloseAngle p6StringSpecial2 +hi def link p6EscCloseFrench p6StringSpecial2 +hi def link p6EscBackSlash p6StringSpecial2 +hi def link p6RxEscape p6StringSpecial2 +hi def link p6RxCapture p6StringSpecial2 +hi def link p6RxAlternation p6StringSpecial2 +hi def link p6RxP5 p6StringSpecial2 +hi def link p6RxP5ReadRef p6StringSpecial2 +hi def link p6RxP5Oct p6StringSpecial2 +hi def link p6RxP5Hex p6StringSpecial2 +hi def link p6RxP5EscMeta p6StringSpecial2 +hi def link p6RxP5Meta p6StringSpecial2 +hi def link p6RxP5Escape p6StringSpecial2 +hi def link p6RxP5CodePoint p6StringSpecial2 +hi def link p6RxP5WriteRef p6StringSpecial2 +hi def link p6RxP5Prop p6StringSpecial2 + +hi def link p6Property Tag +hi def link p6Attention Todo +hi def link p6Type Type +hi def link p6Error Error +hi def link p6BlockLabel Label +hi def link p6Float Float +hi def link p6Normal Normal +hi def link p6Package Normal +hi def link p6PackageScope Normal +hi def link p6Number Number +hi def link p6VersionNum Number +hi def link p6String String +hi def link p6Repeat Repeat +hi def link p6Keyword Keyword +hi def link p6Pragma Keyword +hi def link p6Module Keyword +hi def link p6DeclareRoutine Keyword +hi def link p6VarStorage Special +hi def link p6FlowControl Special +hi def link p6NumberBase Special +hi def link p6Twigil Special +hi def link p6StringSpecial2 Special +hi def link p6VersionDot Special +hi def link p6Comment Comment +hi def link p6Include Include +hi def link p6Shebang PreProc +hi def link p6ClosureTrait PreProc +hi def link p6Routine Function +hi def link p6Operator Operator +hi def link p6Version Operator +hi def link p6Context Operator +hi def link p6Quote Delimiter +hi def link p6TypeConstraint PreCondit +hi def link p6Exception Exception +hi def link p6Placeholder Identifier +hi def link p6Variable Identifier +hi def link p6VarSlash Identifier +hi def link p6VarNum Identifier +hi def link p6VarExclam Identifier +hi def link p6VarMatch Identifier +hi def link p6VarName Identifier +hi def link p6MatchVar Identifier +hi def link p6RxP5ReadRefId Identifier +hi def link p6RxP5ModDef Identifier +hi def link p6RxP5ModName Identifier +hi def link p6Conditional Conditional +hi def link p6StringSpecial SpecialChar + +hi def link p6PodAbbr p6Pod +hi def link p6PodAbbrEOF p6Pod +hi def link p6PodAbbrNoCode p6Pod +hi def link p6PodAbbrCode p6PodCode +hi def link p6PodPara p6Pod +hi def link p6PodParaEOF p6Pod +hi def link p6PodParaNoCode p6Pod +hi def link p6PodParaCode p6PodCode +hi def link p6PodDelim p6Pod +hi def link p6PodDelimEOF p6Pod +hi def link p6PodDelimNoCode p6Pod +hi def link p6PodDelimCode p6PodCode +hi def link p6PodImplicitCode p6PodCode +hi def link p6PodExtraConfig p6PodPrefix +hi def link p6PodVerticalBar p6PodFormatCode +hi def link p6PodColon p6PodFormatCode +hi def link p6PodSemicolon p6PodFormatCode +hi def link p6PodComma p6PodFormatCode +hi def link p6PodFormatOne p6PodFormat +hi def link p6PodFormatTwo p6PodFormat +hi def link p6PodFormatThree p6PodFormat +hi def link p6PodFormatFrench p6PodFormat + +hi def link p6PodType Type +hi def link p6PodConfigOption String +hi def link p6PodCode PreProc +hi def link p6Pod Comment +hi def link p6PodComment Comment +hi def link p6PodAutoQuote Operator +hi def link p6PodConfigOperator Operator +hi def link p6PodPrefix Statement +hi def link p6PodName Identifier +hi def link p6PodFormatCode SpecialChar +hi def link p6PodFormat SpecialComment - HiLink p6EscOctOld p6Error - HiLink p6PackageTwigil p6Twigil - HiLink p6StringAngle p6String - HiLink p6StringFrench p6String - HiLink p6StringAngles p6String - HiLink p6StringSQ p6String - HiLink p6StringDQ p6String - HiLink p6StringQ p6String - HiLink p6RxStringSQ p6String - HiLink p6RxStringDQ p6String - HiLink p6Substitution p6String - HiLink p6Transliteration p6String - HiLink p6StringAuto p6String - HiLink p6StringP5Auto p6String - HiLink p6Key p6String - HiLink p6Match p6String - HiLink p6RegexBlock p6String - HiLink p6RxP5CharClass p6String - HiLink p6RxP5QuoteMeta p6String - HiLink p6RxCharClass p6String - HiLink p6RxQuoteWords p6String - HiLink p6ReduceOp p6Operator - HiLink p6ReverseCrossOp p6Operator - HiLink p6HyperOp p6Operator - HiLink p6QuoteQ p6Operator - HiLink p6RxRange p6StringSpecial - HiLink p6RxAnchor p6StringSpecial - HiLink p6RxP5Anchor p6StringSpecial - HiLink p6CodePoint p6StringSpecial - HiLink p6RxMeta p6StringSpecial - HiLink p6RxP5Range p6StringSpecial - HiLink p6RxP5CPId p6StringSpecial - HiLink p6RxP5Posix p6StringSpecial - HiLink p6RxP5Mod p6StringSpecial - HiLink p6RxP5HexSeq p6StringSpecial - HiLink p6RxP5OctSeq p6StringSpecial - HiLink p6RxP5WriteRefId p6StringSpecial - HiLink p6HexSequence p6StringSpecial - HiLink p6OctSequence p6StringSpecial - HiLink p6RxP5Named p6StringSpecial - HiLink p6RxP5PropId p6StringSpecial - HiLink p6RxP5Quantifier p6StringSpecial - HiLink p6RxP5CountId p6StringSpecial - HiLink p6RxP5Verb p6StringSpecial - HiLink p6Escape p6StringSpecial2 - HiLink p6EscNull p6StringSpecial2 - HiLink p6EscHash p6StringSpecial2 - HiLink p6EscQQ p6StringSpecial2 - HiLink p6EscQuote p6StringSpecial2 - HiLink p6EscDoubleQuote p6StringSpecial2 - HiLink p6EscBackTick p6StringSpecial2 - HiLink p6EscForwardSlash p6StringSpecial2 - HiLink p6EscVerticalBar p6StringSpecial2 - HiLink p6EscExclamation p6StringSpecial2 - HiLink p6EscDollar p6StringSpecial2 - HiLink p6EscOpenCurly p6StringSpecial2 - HiLink p6EscCloseCurly p6StringSpecial2 - HiLink p6EscCloseBracket p6StringSpecial2 - HiLink p6EscCloseAngle p6StringSpecial2 - HiLink p6EscCloseFrench p6StringSpecial2 - HiLink p6EscBackSlash p6StringSpecial2 - HiLink p6RxEscape p6StringSpecial2 - HiLink p6RxCapture p6StringSpecial2 - HiLink p6RxAlternation p6StringSpecial2 - HiLink p6RxP5 p6StringSpecial2 - HiLink p6RxP5ReadRef p6StringSpecial2 - HiLink p6RxP5Oct p6StringSpecial2 - HiLink p6RxP5Hex p6StringSpecial2 - HiLink p6RxP5EscMeta p6StringSpecial2 - HiLink p6RxP5Meta p6StringSpecial2 - HiLink p6RxP5Escape p6StringSpecial2 - HiLink p6RxP5CodePoint p6StringSpecial2 - HiLink p6RxP5WriteRef p6StringSpecial2 - HiLink p6RxP5Prop p6StringSpecial2 - - HiLink p6Property Tag - HiLink p6Attention Todo - HiLink p6Type Type - HiLink p6Error Error - HiLink p6BlockLabel Label - HiLink p6Float Float - HiLink p6Normal Normal - HiLink p6Package Normal - HiLink p6PackageScope Normal - HiLink p6Number Number - HiLink p6VersionNum Number - HiLink p6String String - HiLink p6Repeat Repeat - HiLink p6Keyword Keyword - HiLink p6Pragma Keyword - HiLink p6Module Keyword - HiLink p6DeclareRoutine Keyword - HiLink p6VarStorage Special - HiLink p6FlowControl Special - HiLink p6NumberBase Special - HiLink p6Twigil Special - HiLink p6StringSpecial2 Special - HiLink p6VersionDot Special - HiLink p6Comment Comment - HiLink p6Include Include - HiLink p6Shebang PreProc - HiLink p6ClosureTrait PreProc - HiLink p6Routine Function - HiLink p6Operator Operator - HiLink p6Version Operator - HiLink p6Context Operator - HiLink p6Quote Delimiter - HiLink p6TypeConstraint PreCondit - HiLink p6Exception Exception - HiLink p6Placeholder Identifier - HiLink p6Variable Identifier - HiLink p6VarSlash Identifier - HiLink p6VarNum Identifier - HiLink p6VarExclam Identifier - HiLink p6VarMatch Identifier - HiLink p6VarName Identifier - HiLink p6MatchVar Identifier - HiLink p6RxP5ReadRefId Identifier - HiLink p6RxP5ModDef Identifier - HiLink p6RxP5ModName Identifier - HiLink p6Conditional Conditional - HiLink p6StringSpecial SpecialChar - - HiLink p6PodAbbr p6Pod - HiLink p6PodAbbrEOF p6Pod - HiLink p6PodAbbrNoCode p6Pod - HiLink p6PodAbbrCode p6PodCode - HiLink p6PodPara p6Pod - HiLink p6PodParaEOF p6Pod - HiLink p6PodParaNoCode p6Pod - HiLink p6PodParaCode p6PodCode - HiLink p6PodDelim p6Pod - HiLink p6PodDelimEOF p6Pod - HiLink p6PodDelimNoCode p6Pod - HiLink p6PodDelimCode p6PodCode - HiLink p6PodImplicitCode p6PodCode - HiLink p6PodExtraConfig p6PodPrefix - HiLink p6PodVerticalBar p6PodFormatCode - HiLink p6PodColon p6PodFormatCode - HiLink p6PodSemicolon p6PodFormatCode - HiLink p6PodComma p6PodFormatCode - HiLink p6PodFormatOne p6PodFormat - HiLink p6PodFormatTwo p6PodFormat - HiLink p6PodFormatThree p6PodFormat - HiLink p6PodFormatFrench p6PodFormat - - HiLink p6PodType Type - HiLink p6PodConfigOption String - HiLink p6PodCode PreProc - HiLink p6Pod Comment - HiLink p6PodComment Comment - HiLink p6PodAutoQuote Operator - HiLink p6PodConfigOperator Operator - HiLink p6PodPrefix Statement - HiLink p6PodName Identifier - HiLink p6PodFormatCode SpecialChar - HiLink p6PodFormat SpecialComment - - delcommand HiLink -endif " Syncing to speed up processing "syn sync match p6SyncPod groupthere p6PodAbbrRegion "^=\K\k*\>" diff --git a/runtime/syntax/pfmain.vim b/runtime/syntax/pfmain.vim index 32ed6975c0..af58da70ef 100644 --- a/runtime/syntax/pfmain.vim +++ b/runtime/syntax/pfmain.vim @@ -7,17 +7,12 @@ " URL: http://cern.ch/fuji/vim/syntax/pfmain.vim " Comment: Based on Postfix 2.12/3.0 postconf.5.html. -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 -if version >= 600 - setlocal iskeyword=@,48-57,_,- -else - set iskeyword=@,48-57,_,- -endif +setlocal iskeyword=@,48-57,_,- syntax case match syntax sync minlines=1 @@ -1816,33 +1811,24 @@ syntax match pfmainSpecial "\<smtpd\>" syntax match pfmainSpecial "\<trace\>" syntax match pfmainSpecial "\<verify\>" -if version >= 508 || !exists("pfmain_syntax_init") - if version < 508 - let pfmain_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink pfmainConf Statement - HiLink pfmainRef PreProc - HiLink pfmainWord identifier +hi def link pfmainConf Statement +hi def link pfmainRef PreProc +hi def link pfmainWord identifier - HiLink pfmainDict Type - HiLink pfmainQueueDir Constant - HiLink pfmainTransport Constant - HiLink pfmainLock Constant - HiLink pfmainAnswer Constant +hi def link pfmainDict Type +hi def link pfmainQueueDir Constant +hi def link pfmainTransport Constant +hi def link pfmainLock Constant +hi def link pfmainAnswer Constant - HiLink pfmainComment Comment - HiLink pfmainNumber Number - HiLink pfmainTime Number - HiLink pfmainIP Number - HiLink pfmainVariable Error - HiLink pfmainSpecial Special +hi def link pfmainComment Comment +hi def link pfmainNumber Number +hi def link pfmainTime Number +hi def link pfmainIP Number +hi def link pfmainVariable Error +hi def link pfmainSpecial Special - delcommand HiLink -endif let b:current_syntax = "pfmain" diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index ae3f82d64a..efb355ec83 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -55,11 +55,8 @@ " ii) Same problem if you are setting php_folding = 2 with a closing " } inside an string on the first line of this string. -" 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 @@ -67,16 +64,8 @@ if !exists("main_syntax") let main_syntax = 'php' endif -if version < 600 - unlet! php_folding - if exists("php_sync_method") && !php_sync_method - let php_sync_method=-1 - endif - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax " accept old options if !exists("php_sync_method") @@ -94,11 +83,7 @@ endif syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc -if version < 600 - syn include @sqlTop <sfile>:p:h/sql.vim -else - syn include @sqlTop syntax/sql.vim -endif +syn include @sqlTop syntax/sql.vim syn sync clear unlet b:current_syntax syn cluster sqlTop remove=sqlString,sqlComment @@ -381,15 +366,8 @@ if exists("php_parent_error_open") else syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend endif -if version >= 600 - syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell -else - syn match phpComment "#.\{-}$" contained contains=phpTodo,@Spell - syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}$" contained contains=phpTodo,@Spell - syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo,@Spell -endif +syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell +syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell " String if exists("php_parent_error_open") @@ -403,24 +381,22 @@ else endif " HereDoc and NowDoc -if version >= 600 - syn case match +syn case match - " HereDoc - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +" HereDoc +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend - " NowDoc - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend +" NowDoc +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend " including HTML,JavaScript,SQL even if not enabled via options - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend - syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend - syn case ignore -endif +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend +syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend +syn case ignore " Parent if exists("php_parent_error_close") || exists("php_parent_error_open") @@ -621,82 +597,72 @@ syntax match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|dep syntax match phpDocTodo "@\(todo\|fixme\|xxx\)\(\s\+\)\?" containedin=phpComment " 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_php_syn_inits") - if version < 508 - let did_php_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink phpConstant Constant - HiLink phpCoreConstant Constant - HiLink phpComment Comment - HiLink phpDocTags PreProc - HiLink phpDocCustomTags Type - HiLink phpException Exception - HiLink phpBoolean Boolean - HiLink phpStorageClass StorageClass - HiLink phpSCKeyword StorageClass - HiLink phpFCKeyword Define - HiLink phpStructure Structure - HiLink phpStringSingle String - HiLink phpStringDouble String - HiLink phpBacktick String - HiLink phpNumber Number - HiLink phpFloat Float - HiLink phpMethods Function - HiLink phpFunctions Function - HiLink phpBaselib Function - HiLink phpRepeat Repeat - HiLink phpConditional Conditional - HiLink phpLabel Label - HiLink phpStatement Statement - HiLink phpKeyword Statement - HiLink phpType Type - HiLink phpInclude Include - HiLink phpDefine Define - HiLink phpBackslashSequences SpecialChar - HiLink phpBackslashDoubleQuote SpecialChar - HiLink phpBackslashSingleQuote SpecialChar - HiLink phpParent Delimiter - HiLink phpBrackets Delimiter - HiLink phpIdentifierConst Delimiter - HiLink phpParentError Error - HiLink phpOctalError Error - HiLink phpInterpSimpleError Error - HiLink phpInterpBogusDollarCurley Error - HiLink phpInterpDollarCurly1 Error - HiLink phpInterpDollarCurly2 Error - HiLink phpInterpSimpleBracketsInner String - HiLink phpInterpSimpleCurly Delimiter - HiLink phpInterpVarname Identifier - HiLink phpTodo Todo - HiLink phpDocTodo Todo - HiLink phpMemberSelector Structure - if exists("php_oldStyle") - hi phpIntVar guifg=Red ctermfg=DarkRed - hi phpEnvVar guifg=Red ctermfg=DarkRed - hi phpOperator guifg=SeaGreen ctermfg=DarkGreen - hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen - hi phpRelation guifg=SeaGreen ctermfg=DarkGreen - hi phpIdentifier guifg=DarkGray ctermfg=Brown - hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown - else - HiLink phpIntVar Identifier - HiLink phpEnvVar Identifier - HiLink phpOperator Operator - HiLink phpVarSelector Operator - HiLink phpRelation Operator - HiLink phpIdentifier Identifier - HiLink phpIdentifierSimply Identifier - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link phpConstant Constant +hi def link phpCoreConstant Constant +hi def link phpComment Comment +hi def link phpDocTags PreProc +hi def link phpDocCustomTags Type +hi def link phpException Exception +hi def link phpBoolean Boolean +hi def link phpStorageClass StorageClass +hi def link phpSCKeyword StorageClass +hi def link phpFCKeyword Define +hi def link phpStructure Structure +hi def link phpStringSingle String +hi def link phpStringDouble String +hi def link phpBacktick String +hi def link phpNumber Number +hi def link phpFloat Float +hi def link phpMethods Function +hi def link phpFunctions Function +hi def link phpBaselib Function +hi def link phpRepeat Repeat +hi def link phpConditional Conditional +hi def link phpLabel Label +hi def link phpStatement Statement +hi def link phpKeyword Statement +hi def link phpType Type +hi def link phpInclude Include +hi def link phpDefine Define +hi def link phpBackslashSequences SpecialChar +hi def link phpBackslashDoubleQuote SpecialChar +hi def link phpBackslashSingleQuote SpecialChar +hi def link phpParent Delimiter +hi def link phpBrackets Delimiter +hi def link phpIdentifierConst Delimiter +hi def link phpParentError Error +hi def link phpOctalError Error +hi def link phpInterpSimpleError Error +hi def link phpInterpBogusDollarCurley Error +hi def link phpInterpDollarCurly1 Error +hi def link phpInterpDollarCurly2 Error +hi def link phpInterpSimpleBracketsInner String +hi def link phpInterpSimpleCurly Delimiter +hi def link phpInterpVarname Identifier +hi def link phpTodo Todo +hi def link phpDocTodo Todo +hi def link phpMemberSelector Structure +if exists("php_oldStyle") +hi phpIntVar guifg=Red ctermfg=DarkRed +hi phpEnvVar guifg=Red ctermfg=DarkRed +hi phpOperator guifg=SeaGreen ctermfg=DarkGreen +hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen +hi phpRelation guifg=SeaGreen ctermfg=DarkGreen +hi phpIdentifier guifg=DarkGray ctermfg=Brown +hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown +else +hi def link phpIntVar Identifier +hi def link phpEnvVar Identifier +hi def link phpOperator Operator +hi def link phpVarSelector Operator +hi def link phpRelation Operator +hi def link phpIdentifier Identifier +hi def link phpIdentifierSimply Identifier endif + let b:current_syntax = "php" if main_syntax == 'php' diff --git a/runtime/syntax/pic.vim b/runtime/syntax/pic.vim index adc964ea96..bcb01f4dbd 100644 --- a/runtime/syntax/pic.vim +++ b/runtime/syntax/pic.vim @@ -5,11 +5,8 @@ " URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim " Revision: 1.01 -" 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,36 +88,26 @@ syn match picDirective "#\=DEFINE" " 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_pic16f84_syntax_inits") - if version < 508 - let did_pic16f84_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink picTodo Todo - HiLink picComment Comment - HiLink picDirective Statement - HiLink picLabel Label - HiLink picString String - - "HiLink picOpcode Keyword - "HiLink picRegister Structure - "HiLink picRegisterPart Special - - HiLink picASCII String - HiLink picBinary Number - HiLink picDecimal Number - HiLink picHexadecimal Number - HiLink picOctal Number - - HiLink picIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link picTodo Todo +hi def link picComment Comment +hi def link picDirective Statement +hi def link picLabel Label +hi def link picString String + +"hi def link picOpcode Keyword +"hi def link picRegister Structure +"hi def link picRegisterPart Special + +hi def link picASCII String +hi def link picBinary Number +hi def link picDecimal Number +hi def link picHexadecimal Number +hi def link picOctal Number + +hi def link picIdentifier Identifier + let b:current_syntax = "pic" diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim index efbafd5d82..ccd122c46c 100644 --- a/runtime/syntax/pike.vim +++ b/runtime/syntax/pike.vim @@ -3,11 +3,8 @@ " Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> " Last Change: 2001 May 10 -" 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 @@ -104,51 +101,41 @@ syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 syn sync ccomment pikeComment minlines=10 " 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_pike_syntax_inits") - if version < 508 - let did_pike_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink pikeLabel Label - HiLink pikeUserLabel Label - HiLink pikeConditional Conditional - HiLink pikeRepeat Repeat - HiLink pikeCharacter Character - HiLink pikeSpecialCharacter pikeSpecial - HiLink pikeNumber Number - HiLink pikeFloat Float - HiLink pikeOctalError pikeError - HiLink pikeParenError pikeError - HiLink pikeInParen pikeError - HiLink pikeCommentError pikeError - HiLink pikeOperator Operator - HiLink pikeInclude Include - HiLink pikePreProc PreProc - HiLink pikeDefine Macro - HiLink pikeIncluded pikeString - HiLink pikeError Error - HiLink pikeStatement Statement - HiLink pikePreCondit PreCondit - HiLink pikeType Type - HiLink pikeCommentError pikeError - HiLink pikeCommentString pikeString - HiLink pikeComment2String pikeString - HiLink pikeCommentSkip pikeComment - HiLink pikeString String - HiLink pikeComment Comment - HiLink pikeSpecial SpecialChar - HiLink pikeTodo Todo - HiLink pikeException pikeStatement - HiLink pikeCompoundType Constant - "HiLink pikeIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link pikeLabel Label +hi def link pikeUserLabel Label +hi def link pikeConditional Conditional +hi def link pikeRepeat Repeat +hi def link pikeCharacter Character +hi def link pikeSpecialCharacter pikeSpecial +hi def link pikeNumber Number +hi def link pikeFloat Float +hi def link pikeOctalError pikeError +hi def link pikeParenError pikeError +hi def link pikeInParen pikeError +hi def link pikeCommentError pikeError +hi def link pikeOperator Operator +hi def link pikeInclude Include +hi def link pikePreProc PreProc +hi def link pikeDefine Macro +hi def link pikeIncluded pikeString +hi def link pikeError Error +hi def link pikeStatement Statement +hi def link pikePreCondit PreCondit +hi def link pikeType Type +hi def link pikeCommentError pikeError +hi def link pikeCommentString pikeString +hi def link pikeComment2String pikeString +hi def link pikeCommentSkip pikeComment +hi def link pikeString String +hi def link pikeComment Comment +hi def link pikeSpecial SpecialChar +hi def link pikeTodo Todo +hi def link pikeException pikeStatement +hi def link pikeCompoundType Constant +"hi def link pikeIdentifier Identifier + let b:current_syntax = "pike" diff --git a/runtime/syntax/pilrc.vim b/runtime/syntax/pilrc.vim index 86d5611589..f0e5f9bbc7 100644 --- a/runtime/syntax/pilrc.vim +++ b/runtime/syntax/pilrc.vim @@ -4,10 +4,8 @@ " Last change: 2003 May 11 " Available on: http://www.schau.com/pilrcvim/pilrc.vim -" Remove any old syntax -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -119,30 +117,20 @@ syn region pilrcInclude start="public class" end="}" syn sync ccomment pilrcComment -if version >= 508 || !exists("did_pilrc_syntax_inits") - if version < 508 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - let did_pilrc_syntax_inits = 1 - - " The default methods for highlighting - HiLink pilrcKeyword Statement - HiLink pilrcType Type - HiLink pilrcError Error - HiLink pilrcCountry SpecialChar - HiLink pilrcLanguage SpecialChar - HiLink pilrcString SpecialChar - HiLink pilrcNumber Number - HiLink pilrcComment Comment - HiLink pilrcConstant Constant - HiLink pilrcFunction Function - HiLink pilrcInclude SpecialChar - HiLink pilrcIdentifier Number - - delcommand HiLink -endif + +" The default methods for highlighting +hi def link pilrcKeyword Statement +hi def link pilrcType Type +hi def link pilrcError Error +hi def link pilrcCountry SpecialChar +hi def link pilrcLanguage SpecialChar +hi def link pilrcString SpecialChar +hi def link pilrcNumber Number +hi def link pilrcComment Comment +hi def link pilrcConstant Constant +hi def link pilrcFunction Function +hi def link pilrcInclude SpecialChar +hi def link pilrcIdentifier Number + let b:current_syntax = "pilrc" diff --git a/runtime/syntax/pine.vim b/runtime/syntax/pine.vim index 4c64b9bbc7..aadf50be15 100644 --- a/runtime/syntax/pine.vim +++ b/runtime/syntax/pine.vim @@ -3,19 +3,12 @@ " Maintainer: David Pascoe <pascoedj@spamcop.net> " Last Change: Thu Feb 27 10:18:48 WST 2003, update for pine 4.53 -" 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 -if version >= 600 - setlocal iskeyword=@,48-57,_,128-167,224-235,- -else - set iskeyword=@,48-57,_,128-167,224-235,- -endif +setlocal iskeyword=@,48-57,_,128-167,224-235,- syn keyword pineConfig addrbook-sort-rule syn keyword pineConfig address-book @@ -351,21 +344,11 @@ syn keyword pineOption vertical-folder-list syn match pineComment "^#.*$" " 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_pine_syn_inits") - if version < 508 - let did_pine_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink pineConfig Type - HiLink pineComment Comment - HiLink pineOption Macro - delcommand HiLink -endif +hi def link pineConfig Type +hi def link pineComment Comment +hi def link pineOption Macro let b:current_syntax = "pine" diff --git a/runtime/syntax/pli.vim b/runtime/syntax/pli.vim index f8d7e51cf3..a274cc40bf 100644 --- a/runtime/syntax/pli.vim +++ b/runtime/syntax/pli.vim @@ -3,9 +3,8 @@ " using keywords from http://www.kednos.com/pli/docs/reference_manual/6291pro_contents.html " 2012-11-13 Alan Thompson -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 @@ -222,57 +221,46 @@ endif syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x and earlier, only when not done already. -" For version 5.8 and later, only when and item doesn't have highlighting -" yet. -if version >= 508 || !exists("did_pl1_syn_inits") - if version < 508 - let did_pl1_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when and item doesn't have highlighting yet. - HiLink pl1Attribute Macro - HiLink pl1BlockError Error - HiLink pl1BooleanLiteral Boolean - HiLink pl1CharLiteral Character - HiLink pl1Comment Comment - HiLink pl1CommentL Comment - HiLink pl1Conditional Conditional - HiLink pl1Error Error - HiLink pl1ErrInBracket Error - HiLink pl1ErrInBlock Error - HiLink pl1ErrInParen Error - HiLink pl1Exception Function - HiLink pl1FloatLiteral Float - HiLink pl1Function Function - HiLink pl1Garbage Error - HiLink pl1HostIdentifier Label - HiLink pl1Identifier Normal - HiLink pl1IntLiteral Number - HiLink pl1Operator Operator - HiLink pl1Paren Normal - HiLink pl1ParenError Error - HiLink pl1SpaceError Error - HiLink pl1Pseudo PreProc - HiLink pl1PreProc PreProc - HiLink pl1PreProcSym PreProc - HiLink pl1Keyword Keyword - HiLink pl1Other Keyword - HiLink pl1Repeat Repeat - HiLink pl1Statement Keyword - HiLink pl1Storage StorageClass - HiLink pl1StringError Error - HiLink pl1StringLiteral String - HiLink pl1CommentString String - HiLink pl1Comment2String String - HiLink pl1Symbol Normal - HiLink pl1Trigger Function - HiLink pl1TypeAttribute StorageClass - HiLink pl1Todo Todo +hi def link pl1Attribute Macro +hi def link pl1BlockError Error +hi def link pl1BooleanLiteral Boolean +hi def link pl1CharLiteral Character +hi def link pl1Comment Comment +hi def link pl1CommentL Comment +hi def link pl1Conditional Conditional +hi def link pl1Error Error +hi def link pl1ErrInBracket Error +hi def link pl1ErrInBlock Error +hi def link pl1ErrInParen Error +hi def link pl1Exception Function +hi def link pl1FloatLiteral Float +hi def link pl1Function Function +hi def link pl1Garbage Error +hi def link pl1HostIdentifier Label +hi def link pl1Identifier Normal +hi def link pl1IntLiteral Number +hi def link pl1Operator Operator +hi def link pl1Paren Normal +hi def link pl1ParenError Error +hi def link pl1SpaceError Error +hi def link pl1Pseudo PreProc +hi def link pl1PreProc PreProc +hi def link pl1PreProcSym PreProc +hi def link pl1Keyword Keyword +hi def link pl1Other Keyword +hi def link pl1Repeat Repeat +hi def link pl1Statement Keyword +hi def link pl1Storage StorageClass +hi def link pl1StringError Error +hi def link pl1StringLiteral String +hi def link pl1CommentString String +hi def link pl1Comment2String String +hi def link pl1Symbol Normal +hi def link pl1Trigger Function +hi def link pl1TypeAttribute StorageClass +hi def link pl1Todo Todo - delcommand HiLink -endif let b:current_syntax = "pl1" diff --git a/runtime/syntax/plm.vim b/runtime/syntax/plm.vim index bf7c32fd1c..c6618adacb 100644 --- a/runtime/syntax/plm.vim +++ b/runtime/syntax/plm.vim @@ -3,11 +3,8 @@ " Maintainer: Philippe Coulonges <cphil@cphil.net> " Last change: 2003 May 11 -" 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 @@ -103,43 +100,33 @@ syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD syn sync lines=50 " 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_plm_syntax_inits") - if version < 508 - let did_plm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later -" HiLink plmLabel Label -" HiLink plmConditional Conditional -" HiLink plmRepeat Repeat - HiLink plmTodo Todo - HiLink plmNumber Number - HiLink plmOperator Operator - HiLink plmDelimiter Operator - "HiLink plmShowTab Error - "HiLink plmShowTabc Error - HiLink plmIdentifier Identifier - HiLink plmBuiltIn Statement - HiLink plm286BuiltIn Statement - HiLink plm386BuiltIn Statement - HiLink plm386w16BuiltIn Statement - HiLink plmReserved Statement - HiLink plm386Reserved Statement - HiLink plmPreProc PreProc - HiLink plmCommentError plmError - HiLink plmCommentString plmString - HiLink plmComment2String plmString - HiLink plmCommentSkip plmComment - HiLink plmString String - HiLink plmComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" hi def link plmLabel Label +" hi def link plmConditional Conditional +" hi def link plmRepeat Repeat +hi def link plmTodo Todo +hi def link plmNumber Number +hi def link plmOperator Operator +hi def link plmDelimiter Operator +"hi def link plmShowTab Error +"hi def link plmShowTabc Error +hi def link plmIdentifier Identifier +hi def link plmBuiltIn Statement +hi def link plm286BuiltIn Statement +hi def link plm386BuiltIn Statement +hi def link plm386w16BuiltIn Statement +hi def link plmReserved Statement +hi def link plm386Reserved Statement +hi def link plmPreProc PreProc +hi def link plmCommentError plmError +hi def link plmCommentString plmString +hi def link plmComment2String plmString +hi def link plmCommentSkip plmComment +hi def link plmString String +hi def link plmComment Comment + let b:current_syntax = "plm" diff --git a/runtime/syntax/plp.vim b/runtime/syntax/plp.vim index f59702d3b5..48dc4b249e 100644 --- a/runtime/syntax/plp.vim +++ b/runtime/syntax/plp.vim @@ -7,11 +7,8 @@ " Add to filetype.vim the following line (without quote sign): " au BufNewFile,BufRead *.plp setf plp -" 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 @@ -19,14 +16,9 @@ if !exists("main_syntax") let main_syntax = 'perlscript' endif -if version < 600 - so <sfile>:p:h/html.vim - syn include @PLPperl <sfile>:p:h/perl.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syn include @PLPperl syntax/perl.vim -endif +runtime! syntax/html.vim +unlet b:current_syntax +syn include @PLPperl syntax/perl.vim syn cluster htmlPreproc add=PLPperlblock diff --git a/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim index 6e513660f8..1868c9cb16 100644 --- a/runtime/syntax/plsql.vim +++ b/runtime/syntax/plsql.vim @@ -9,11 +9,8 @@ " Austin Ziegler (austin at halostatue dot ca) " Added 8i+ features. " -" 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 @@ -223,54 +220,44 @@ endif syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x 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_plsql_syn_inits") - if version < 508 - let did_plsql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. - HiLink plsqlAttribute Macro - HiLink plsqlBlockError Error - HiLink plsqlBooleanLiteral Boolean - HiLink plsqlCharLiteral Character - HiLink plsqlComment Comment - HiLink plsqlCommentL Comment - HiLink plsqlConditional Conditional - HiLink plsqlError Error - HiLink plsqlErrInBracket Error - HiLink plsqlErrInBlock Error - HiLink plsqlErrInParen Error - HiLink plsqlException Function - HiLink plsqlFloatLiteral Float - HiLink plsqlFunction Function - HiLink plsqlGarbage Error - HiLink plsqlHostIdentifier Label - HiLink plsqlIdentifier Normal - HiLink plsqlIntLiteral Number - HiLink plsqlOperator Operator - HiLink plsqlParen Normal - HiLink plsqlParenError Error - HiLink plsqlSpaceError Error - HiLink plsqlPseudo PreProc - HiLink plsqlKeyword Keyword - HiLink plsqlRepeat Repeat - HiLink plsqlStorage StorageClass - HiLink plsqlSQLKeyword Function - HiLink plsqlStringError Error - HiLink plsqlStringLiteral String - HiLink plsqlCommentString String - HiLink plsqlComment2String String - HiLink plsqlSymbol Normal - HiLink plsqlTrigger Function - HiLink plsqlTypeAttribute StorageClass - HiLink plsqlTodo Todo +hi def link plsqlAttribute Macro +hi def link plsqlBlockError Error +hi def link plsqlBooleanLiteral Boolean +hi def link plsqlCharLiteral Character +hi def link plsqlComment Comment +hi def link plsqlCommentL Comment +hi def link plsqlConditional Conditional +hi def link plsqlError Error +hi def link plsqlErrInBracket Error +hi def link plsqlErrInBlock Error +hi def link plsqlErrInParen Error +hi def link plsqlException Function +hi def link plsqlFloatLiteral Float +hi def link plsqlFunction Function +hi def link plsqlGarbage Error +hi def link plsqlHostIdentifier Label +hi def link plsqlIdentifier Normal +hi def link plsqlIntLiteral Number +hi def link plsqlOperator Operator +hi def link plsqlParen Normal +hi def link plsqlParenError Error +hi def link plsqlSpaceError Error +hi def link plsqlPseudo PreProc +hi def link plsqlKeyword Keyword +hi def link plsqlRepeat Repeat +hi def link plsqlStorage StorageClass +hi def link plsqlSQLKeyword Function +hi def link plsqlStringError Error +hi def link plsqlStringLiteral String +hi def link plsqlCommentString String +hi def link plsqlComment2String String +hi def link plsqlSymbol Normal +hi def link plsqlTrigger Function +hi def link plsqlTypeAttribute StorageClass +hi def link plsqlTodo Todo - delcommand HiLink -endif let b:current_syntax = "plsql" diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index 2ab13ac0b1..15d09b18bd 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -6,11 +6,8 @@ " Leonardo Fontenelle (Spell checking) " Nam SungHyun <namsh@kldp.org> (Original maintainer) -" 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 @@ -82,61 +79,51 @@ syn match poAcceleratorStr contained "[^&_~][&_~]\(\a\|\d\)[^:]"ms=s+1,me=e-1 c syn match poVariable contained "%\d" " 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_po_syn_inits") - if version < 508 - let did_po_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink poCommentSources PreProc - HiLink poComment Comment - HiLink poCommentAutomatic Comment - HiLink poCommentTranslator Comment - HiLink poCommentFlags Special - HiLink poCommentDiff Comment - HiLink poCopyrightUnset Todo - HiLink poFlagFuzzy Todo - HiLink poDiffOld Todo - HiLink poDiffNew Special - HiLink poObsolete Comment - - HiLink poStatementMsgid Statement - HiLink poStatementMsgstr Statement - HiLink poStatementMsgidplural Statement - HiLink poStatementMsgCTxt Statement - HiLink poPluralCaseN Constant - - HiLink poStringCTxt Comment - HiLink poStringID String - HiLink poStringSTR String - HiLink poCommentKDE Comment - HiLink poCommentKDEError Error - HiLink poPluralKDE Comment - HiLink poPluralKDEError Error - HiLink poHeaderItem Identifier - HiLink poHeaderUndefined Todo - HiLink poKDEdesktopFile Identifier - - HiLink poHtml Identifier - HiLink poHtmlNot String - HiLink poHtmlTranslatables String - HiLink poLineBreak String - - HiLink poFormat poSpecial - HiLink poSpecial Special - HiLink poAcceleratorId Special - HiLink poAcceleratorStr Special - HiLink poVariable Special - - HiLink poMsguniqError Special - HiLink poMsguniqErrorMarkers Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link poCommentSources PreProc +hi def link poComment Comment +hi def link poCommentAutomatic Comment +hi def link poCommentTranslator Comment +hi def link poCommentFlags Special +hi def link poCommentDiff Comment +hi def link poCopyrightUnset Todo +hi def link poFlagFuzzy Todo +hi def link poDiffOld Todo +hi def link poDiffNew Special +hi def link poObsolete Comment + +hi def link poStatementMsgid Statement +hi def link poStatementMsgstr Statement +hi def link poStatementMsgidplural Statement +hi def link poStatementMsgCTxt Statement +hi def link poPluralCaseN Constant + +hi def link poStringCTxt Comment +hi def link poStringID String +hi def link poStringSTR String +hi def link poCommentKDE Comment +hi def link poCommentKDEError Error +hi def link poPluralKDE Comment +hi def link poPluralKDEError Error +hi def link poHeaderItem Identifier +hi def link poHeaderUndefined Todo +hi def link poKDEdesktopFile Identifier + +hi def link poHtml Identifier +hi def link poHtmlNot String +hi def link poHtmlTranslatables String +hi def link poLineBreak String + +hi def link poFormat poSpecial +hi def link poSpecial Special +hi def link poAcceleratorId Special +hi def link poAcceleratorStr Special +hi def link poVariable Special + +hi def link poMsguniqError Special +hi def link poMsguniqErrorMarkers Comment + let b:current_syntax = "po" diff --git a/runtime/syntax/pod.vim b/runtime/syntax/pod.vim index b9f2e0854f..7c65a8433f 100644 --- a/runtime/syntax/pod.vim +++ b/runtime/syntax/pod.vim @@ -19,11 +19,8 @@ " Remove any old syntax stuff hanging around (this is suppressed " automatically by ":syn include" if necessary). -" 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 @@ -67,28 +64,18 @@ syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell " 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_pod_syntax_inits") - if version < 508 - let did_pod_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link podCommand Statement +hi def link podCmdText String +hi def link podOverIndent Number +hi def link podForKeywd Identifier +hi def link podFormat Identifier +hi def link podVerbatimLine PreProc +hi def link podSpecial Identifier +hi def link podEscape String +hi def link podEscape2 Number - HiLink podCommand Statement - HiLink podCmdText String - HiLink podOverIndent Number - HiLink podForKeywd Identifier - HiLink podFormat Identifier - HiLink podVerbatimLine PreProc - HiLink podSpecial Identifier - HiLink podEscape String - HiLink podEscape2 Number - - delcommand HiLink -endif if exists("perl_pod_spellcheck_headings") " Spell-check headings diff --git a/runtime/syntax/postscr.vim b/runtime/syntax/postscr.vim index 8b051d33b3..d5dc9a22d6 100644 --- a/runtime/syntax/postscr.vim +++ b/runtime/syntax/postscr.vim @@ -13,11 +13,8 @@ " postscr_encodings - highlight encoding names (there are a lot) " postscr_andornot_binary - highlight and, or, and not as binary operators (not logical) " -" 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 @@ -25,11 +22,7 @@ endif syn case match " Keyword characters - all 7-bit ASCII bar PS delimiters and ws -if version >= 600 - setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% -else - set iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% -endif +setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% " Yer trusty old TODO highlghter! syn keyword postscrTodo contained TODO @@ -730,68 +723,58 @@ if exists("postscr_ghostscript") endif " GhostScript highlighting " 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_postscr_syntax_inits") - if version < 508 - let did_postscr_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink postscrComment Comment - - HiLink postscrConstant Constant - HiLink postscrString String - HiLink postscrASCIIString postscrString - HiLink postscrHexString postscrString - HiLink postscrASCII85String postscrString - HiLink postscrNumber Number - HiLink postscrInteger postscrNumber - HiLink postscrHex postscrNumber - HiLink postscrRadix postscrNumber - HiLink postscrFloat Float - HiLink postscrBoolean Boolean - - HiLink postscrIdentifier Identifier - HiLink postscrProcedure Function - - HiLink postscrName Statement - HiLink postscrConditional Conditional - HiLink postscrRepeat Repeat - HiLink postscrL2Repeat postscrRepeat - HiLink postscrOperator Operator - HiLink postscrL1Operator postscrOperator - HiLink postscrL2Operator postscrOperator - HiLink postscrL3Operator postscrOperator - HiLink postscrMathOperator postscrOperator - HiLink postscrLogicalOperator postscrOperator - HiLink postscrBinaryOperator postscrOperator - - HiLink postscrDSCComment SpecialComment - HiLink postscrSpecialChar SpecialChar - - HiLink postscrTodo Todo - - HiLink postscrError Error - HiLink postscrSpecialCharError postscrError - HiLink postscrASCII85CharError postscrError - HiLink postscrHexCharError postscrError - HiLink postscrASCIIStringError postscrError - HiLink postscrIdentifierError postscrError - - if exists("postscr_ghostscript") - HiLink postscrGSOperator postscrOperator - HiLink postscrGSMathOperator postscrMathOperator - else - HiLink postscrGSOperator postscrError - HiLink postscrGSMathOperator postscrError - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +hi def link postscrComment Comment + +hi def link postscrConstant Constant +hi def link postscrString String +hi def link postscrASCIIString postscrString +hi def link postscrHexString postscrString +hi def link postscrASCII85String postscrString +hi def link postscrNumber Number +hi def link postscrInteger postscrNumber +hi def link postscrHex postscrNumber +hi def link postscrRadix postscrNumber +hi def link postscrFloat Float +hi def link postscrBoolean Boolean + +hi def link postscrIdentifier Identifier +hi def link postscrProcedure Function + +hi def link postscrName Statement +hi def link postscrConditional Conditional +hi def link postscrRepeat Repeat +hi def link postscrL2Repeat postscrRepeat +hi def link postscrOperator Operator +hi def link postscrL1Operator postscrOperator +hi def link postscrL2Operator postscrOperator +hi def link postscrL3Operator postscrOperator +hi def link postscrMathOperator postscrOperator +hi def link postscrLogicalOperator postscrOperator +hi def link postscrBinaryOperator postscrOperator + +hi def link postscrDSCComment SpecialComment +hi def link postscrSpecialChar SpecialChar + +hi def link postscrTodo Todo + +hi def link postscrError Error +hi def link postscrSpecialCharError postscrError +hi def link postscrASCII85CharError postscrError +hi def link postscrHexCharError postscrError +hi def link postscrASCIIStringError postscrError +hi def link postscrIdentifierError postscrError + +if exists("postscr_ghostscript") +hi def link postscrGSOperator postscrOperator +hi def link postscrGSMathOperator postscrMathOperator +else +hi def link postscrGSOperator postscrError +hi def link postscrGSMathOperator postscrError endif + let b:current_syntax = "postscr" " vim: ts=8 diff --git a/runtime/syntax/pov.vim b/runtime/syntax/pov.vim index 4c1fd9624a..8595bcb151 100644 --- a/runtime/syntax/pov.vim +++ b/runtime/syntax/pov.vim @@ -5,14 +5,8 @@ " Required Vim Version: 6.0 " Setup -if version >= 600 - " Quit when a syntax file was already loaded - if exists("b:current_syntax") - finish - endif -else - " Croak when an old Vim is sourcing us. - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or use a version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/povini.vim b/runtime/syntax/povini.vim index 726fe1fc74..ac1f87875e 100644 --- a/runtime/syntax/povini.vim +++ b/runtime/syntax/povini.vim @@ -5,14 +5,8 @@ " Required Vim Version: 6.0 " Setup -if version >= 600 - " Quit when a syntax file was already loaded - if exists("b:current_syntax") - finish - endif -else - " Croak when an old Vim is sourcing us. - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/ppd.vim b/runtime/syntax/ppd.vim index 192f70c05d..da67e1f39f 100644 --- a/runtime/syntax/ppd.vim +++ b/runtime/syntax/ppd.vim @@ -3,11 +3,8 @@ " Maintainer: Bjoern Jacke <bjacke@suse.de> " Last Change: 2001-10-06 -" 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 @@ -21,27 +18,17 @@ syn match ppdGUIText "/.*:" syn match ppdContraints "^*UIConstraints:" " 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_ahdl_syn_inits") - if version < 508 - let did_ahdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink ppdComment Comment - HiLink ppdDefine Statement - HiLink ppdUI Function - HiLink ppdUIGroup Function - HiLink ppdDef String - HiLink ppdGUIText Type - HiLink ppdContraints Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + + +hi def link ppdComment Comment +hi def link ppdDefine Statement +hi def link ppdUI Function +hi def link ppdUIGroup Function +hi def link ppdDef String +hi def link ppdGUIText Type +hi def link ppdContraints Special + let b:current_syntax = "ppd" diff --git a/runtime/syntax/ppwiz.vim b/runtime/syntax/ppwiz.vim index d3d7b3a17a..514f8f36cc 100644 --- a/runtime/syntax/ppwiz.vim +++ b/runtime/syntax/ppwiz.vim @@ -6,11 +6,8 @@ " Filename: ppwiz.vim " Remove old syntax stuff -" 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 @@ -63,33 +60,23 @@ syn match ppwizInteger "\d\+" contained syn cluster ppwizArgVal add=ppwizString,ppwizInteger " 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_ppwiz_syn_inits") - if version < 508 - let did_ppwiz_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink ppwizSpecial Special - HiLink ppwizEqual ppwizSpecial - HiLink ppwizOperator ppwizSpecial - HiLink ppwizComment Comment - HiLink ppwizDef PreProc - HiLink ppwizMacro Statement - HiLink ppwizArg Identifier - HiLink ppwizStdVar Identifier - HiLink ppwizRexxVar Identifier - HiLink ppwizString Constant - HiLink ppwizInteger Constant - HiLink ppwizCont ppwizSpecial - HiLink ppwizError Error - HiLink ppwizHTML Type +hi def link ppwizSpecial Special +hi def link ppwizEqual ppwizSpecial +hi def link ppwizOperator ppwizSpecial +hi def link ppwizComment Comment +hi def link ppwizDef PreProc +hi def link ppwizMacro Statement +hi def link ppwizArg Identifier +hi def link ppwizStdVar Identifier +hi def link ppwizRexxVar Identifier +hi def link ppwizString Constant +hi def link ppwizInteger Constant +hi def link ppwizCont ppwizSpecial +hi def link ppwizError Error +hi def link ppwizHTML Type - delcommand HiLink -endif let b:current_syntax = "ppwiz" diff --git a/runtime/syntax/prescribe.vim b/runtime/syntax/prescribe.vim index d89ee35253..cd5ddbeedd 100644 --- a/runtime/syntax/prescribe.vim +++ b/runtime/syntax/prescribe.vim @@ -4,11 +4,8 @@ " URL: http://www.hampft.de/vim/syntax/prescribe.vim " Last Change: 2005 Mar 04 -" 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 @@ -44,25 +41,15 @@ syn region prescribeString start=+'+ end=+'+ skip=+\\'+ syn region prescribeComment start=+CMNT+ end=+;+ " 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_prescribe_syn_inits") - if version < 508 - let did_prescribe_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink prescribeSpecial PreProc - HiLink prescribeStatement Statement - HiLink prescribeNumber Number - HiLink prescribeCSETArg String - HiLink prescribeFRPOArg String - HiLink prescribeComment Comment +hi def link prescribeSpecial PreProc +hi def link prescribeStatement Statement +hi def link prescribeNumber Number +hi def link prescribeCSETArg String +hi def link prescribeFRPOArg String +hi def link prescribeComment Comment - delcommand HiLink -endif let b:current_syntax = "prescribe" diff --git a/runtime/syntax/procmail.vim b/runtime/syntax/procmail.vim index c2ffa39883..93f50fe9ef 100644 --- a/runtime/syntax/procmail.vim +++ b/runtime/syntax/procmail.vim @@ -4,11 +4,8 @@ " Last Change: 2003 Aug 14 " Author: Sonia Heimann -" 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 @@ -33,34 +30,24 @@ syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecip syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion " 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_procmail_syntax_inits") - if version < 508 - let did_procmail_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink procmailComment Comment - HiLink procmailTodo Todo +hi def link procmailComment Comment +hi def link procmailTodo Todo - HiLink procmailRecipe Statement - "HiLink procmailCondition Statement +hi def link procmailRecipe Statement +"hi def link procmailCondition Statement - HiLink procmailActionFolder procmailAction - HiLink procmailActionVariable procmailAction - HiLink procmailActionForward procmailAction - HiLink procmailActionPipe procmailAction - HiLink procmailAction Function - HiLink procmailVar Identifier - HiLink procmailVarDecl Identifier +hi def link procmailActionFolder procmailAction +hi def link procmailActionVariable procmailAction +hi def link procmailActionForward procmailAction +hi def link procmailActionPipe procmailAction +hi def link procmailAction Function +hi def link procmailVar Identifier +hi def link procmailVarDecl Identifier - HiLink procmailString String +hi def link procmailString String - delcommand HiLink -endif let b:current_syntax = "procmail" diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 85a54a6505..5e7cfef299 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -11,22 +11,15 @@ " Version: 13 " Last Change: Nov 11 2012 -" For version 5.x: Clear all syntax item -" 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:cpo_save = &cpo set cpo&vim -if version >= 600 - setlocal iskeyword=@,48-57,_,-,!,#,$,% -else - set iskeyword=@,48-57,_,-,!,#,$,% -endif +setlocal iskeyword=@,48-57,_,-,!,#,$,% " The Progress editor doesn't cope with tabs very well. set expandtab @@ -282,44 +275,34 @@ syn keyword ProgressType char[acter] int[eger] int64 dec[imal] log[ical] da[te] syn sync lines=800 " 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_progress_syntax_inits") - if version < 508 - let did_progress_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default methods for highlighting. Can be overridden later. - HiLink ProgressByte Number - HiLink ProgressCase Repeat - HiLink ProgressComment Comment - HiLink ProgressConditional Conditional - HiLink ProgressDebug Debug - HiLink ProgressDo Repeat - HiLink ProgressEndError Error - HiLink ProgressFor Repeat - HiLink ProgressFunction Procedure - HiLink ProgressIdentifier Identifier - HiLink ProgressInclude Include - HiLink ProgressMatrixDelimiter Identifier - HiLink ProgressNumber Number - HiLink ProgressOperator Operator - HiLink ProgressPreProc PreProc - HiLink ProgressProcedure Procedure - HiLink ProgressQuote Delimiter - HiLink ProgressRepeat Repeat - HiLink ProgressReserved Statement - HiLink ProgressSpaceError Error - HiLink ProgressString String - HiLink ProgressTodo Todo - HiLink ProgressType Statement - HiLink ProgressShowTab Error +" The default methods for highlighting. Can be overridden later. +hi def link ProgressByte Number +hi def link ProgressCase Repeat +hi def link ProgressComment Comment +hi def link ProgressConditional Conditional +hi def link ProgressDebug Debug +hi def link ProgressDo Repeat +hi def link ProgressEndError Error +hi def link ProgressFor Repeat +hi def link ProgressFunction Procedure +hi def link ProgressIdentifier Identifier +hi def link ProgressInclude Include +hi def link ProgressMatrixDelimiter Identifier +hi def link ProgressNumber Number +hi def link ProgressOperator Operator +hi def link ProgressPreProc PreProc +hi def link ProgressProcedure Procedure +hi def link ProgressQuote Delimiter +hi def link ProgressRepeat Repeat +hi def link ProgressReserved Statement +hi def link ProgressSpaceError Error +hi def link ProgressString String +hi def link ProgressTodo Todo +hi def link ProgressType Statement +hi def link ProgressShowTab Error - delcommand HiLink -endif let b:current_syntax = "progress" diff --git a/runtime/syntax/prolog.vim b/runtime/syntax/prolog.vim index f5f0e673ec..3b09bb3548 100644 --- a/runtime/syntax/prolog.vim +++ b/runtime/syntax/prolog.vim @@ -1,17 +1,17 @@ " Vim syntax file " Language: PROLOG -" Maintainers: Thomas Koehler <jean-luc@picard.franken.de> -" Last Change: 2013 May 23 +" Maintainer: Thomas Koehler <jean-luc@picard.franken.de> +" Please be aware: I'm often slow to answer email due to a high +" non-computer related workload (sometimes 4-8 weeks) +" Last Change: 2016 September 6 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim " There are two sets of highlighting in here: " If the "prolog_highlighting_clean" variable exists, it is rather sparse. " Otherwise you get more highlighting. -" 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 @@ -78,46 +78,36 @@ syn sync maxlines=50 " 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_prolog_syn_inits") - if version < 508 - let did_prolog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink prologComment Comment - HiLink prologCComment Comment - HiLink prologCharCode Special - - if exists ("prolog_highlighting_clean") - - HiLink prologKeyword Statement - HiLink prologClauseHead Statement - HiLink prologClause Normal - - else - - HiLink prologKeyword Keyword - HiLink prologClauseHead Constant - HiLink prologClause Normal - HiLink prologQuestion PreProc - HiLink prologSpecialCharacter Special - HiLink prologNumber Number - HiLink prologAsIs Normal - HiLink prologCommentError Error - HiLink prologAtom String - HiLink prologString String - HiLink prologOperator Operator - - endif - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link prologComment Comment +hi def link prologCComment Comment +hi def link prologCharCode Special + +if exists ("prolog_highlighting_clean") + +hi def link prologKeyword Statement +hi def link prologClauseHead Statement +hi def link prologClause Normal + +else + +hi def link prologKeyword Keyword +hi def link prologClauseHead Constant +hi def link prologClause Normal +hi def link prologQuestion PreProc +hi def link prologSpecialCharacter Special +hi def link prologNumber Number +hi def link prologAsIs Normal +hi def link prologCommentError Error +hi def link prologAtom String +hi def link prologString String +hi def link prologOperator Operator + endif + let b:current_syntax = "prolog" " vim: ts=8 diff --git a/runtime/syntax/promela.vim b/runtime/syntax/promela.vim index e812bc2749..add4514561 100644 --- a/runtime/syntax/promela.vim +++ b/runtime/syntax/promela.vim @@ -5,11 +5,8 @@ " Last Change: Thu Aug 7 21:22:48 CEST 2008 " Version: 0.5 -" 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 diff --git a/runtime/syntax/proto.vim b/runtime/syntax/proto.vim index 4d6a77e84a..4615e0ca0e 100644 --- a/runtime/syntax/proto.vim +++ b/runtime/syntax/proto.vim @@ -22,9 +22,8 @@ " " http://code.google.com/p/protobuf/ -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 diff --git a/runtime/syntax/psf.vim b/runtime/syntax/psf.vim index 2b376f94cc..0971fe96bf 100644 --- a/runtime/syntax/psf.vim +++ b/runtime/syntax/psf.vim @@ -4,10 +4,8 @@ " Maintainer: Rex Barzee <rex_barzee@hp.com> " Last change: 25 Apr 2001 -if version < 600 - " Remove any old syntax stuff hanging around - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -73,27 +71,17 @@ syn match psfComment "#.*$" " 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_psf_syntax_inits") - if version < 508 - let did_psf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink psfObject Statement - HiLink psfAttrib Type - HiLink psfQuotString String - HiLink psfObjTag Identifier - HiLink psfAttAbbrev PreProc - HiLink psfObjTags Identifier - - HiLink psfComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link psfObject Statement +hi def link psfAttrib Type +hi def link psfQuotString String +hi def link psfObjTag Identifier +hi def link psfAttAbbrev PreProc +hi def link psfObjTags Identifier + +hi def link psfComment Comment + " Long descriptions and copyrights confuse the syntax highlighting, so " force vim to backup at least 100 lines before the top visible line diff --git a/runtime/syntax/ptcap.vim b/runtime/syntax/ptcap.vim index 45590cf61b..1ebeb5227b 100644 --- a/runtime/syntax/ptcap.vim +++ b/runtime/syntax/ptcap.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/ptcap.vim " Last Change: 2001 May 15 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -73,34 +70,25 @@ syn region ptcapField start=":" skip="[^\\]\(\\\\\)*\\$" end="[^\\]\(\\\\\)* syn region ptcapString matchgroup=ptcapOperator start="=" skip="[^\\]\(\\\\\)*\\:" matchgroup=ptcapDelimiter end=":"me=e-1 matchgroup=NONE end="[^\\]\(\\\\\)*[^\\]$" end="^$" contains=ptcapEscapedChar,ptcapLineCont keepend contained syn region ptcapComment start="^\s*#" end="$" contains=ptcapLeadBlank -if version >= 508 || !exists("did_ptcap_syntax_inits") - if version < 508 - let did_ptcap_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ptcapComment Comment - HiLink ptcapDelimiter Delimiter - " The highlighting of "ptcapEntry" should always be overridden by - " its contents, so I use Todo highlighting to indicate that there - " is work to be done with the syntax file if you can see it :-) - HiLink ptcapEntry Todo - HiLink ptcapError Error - HiLink ptcapEscapedChar SpecialChar - HiLink ptcapField Type - HiLink ptcapLeadBlank NONE - HiLink ptcapLineCont Special - HiLink ptcapNames Label - HiLink ptcapNumber NONE - HiLink ptcapNumberError Error - HiLink ptcapOperator Operator - HiLink ptcapSpecialCap Type - HiLink ptcapString NONE - - delcommand HiLink -endif + +hi def link ptcapComment Comment +hi def link ptcapDelimiter Delimiter +" The highlighting of "ptcapEntry" should always be overridden by +" its contents, so I use Todo highlighting to indicate that there +" is work to be done with the syntax file if you can see it :-) +hi def link ptcapEntry Todo +hi def link ptcapError Error +hi def link ptcapEscapedChar SpecialChar +hi def link ptcapField Type +hi def link ptcapLeadBlank NONE +hi def link ptcapLineCont Special +hi def link ptcapNames Label +hi def link ptcapNumber NONE +hi def link ptcapNumberError Error +hi def link ptcapOperator Operator +hi def link ptcapSpecialCap Type +hi def link ptcapString NONE + let b:current_syntax = "ptcap" diff --git a/runtime/syntax/purifylog.vim b/runtime/syntax/purifylog.vim index 8bcfb4b006..2143d9fe28 100644 --- a/runtime/syntax/purifylog.vim +++ b/runtime/syntax/purifylog.vim @@ -3,11 +3,8 @@ " Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> " Last Change: 2003 May 11 -" 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 @@ -57,62 +54,52 @@ syn match purifyLogZPR "^ZPR:.*$" syn match purifyLogZPW "^ZPW:.*$" " 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_purifyLog_syntax_inits") - if version < 508 - let did_purifyLog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink purifyLogFIU purifyLogInformational - HiLink purifyLogMAF purifyLogInformational - HiLink purifyLogMIU purifyLogInformational - HiLink purifyLogSIG purifyLogInformational - HiLink purifyLogWPF purifyLogInformational - HiLink purifyLogWPM purifyLogInformational - HiLink purifyLogWPN purifyLogInformational - HiLink purifyLogWPR purifyLogInformational - HiLink purifyLogWPW purifyLogInformational - HiLink purifyLogWPX purifyLogInformational +hi def link purifyLogFIU purifyLogInformational +hi def link purifyLogMAF purifyLogInformational +hi def link purifyLogMIU purifyLogInformational +hi def link purifyLogSIG purifyLogInformational +hi def link purifyLogWPF purifyLogInformational +hi def link purifyLogWPM purifyLogInformational +hi def link purifyLogWPN purifyLogInformational +hi def link purifyLogWPR purifyLogInformational +hi def link purifyLogWPW purifyLogInformational +hi def link purifyLogWPX purifyLogInformational - HiLink purifyLogABR purifyLogWarning - HiLink purifyLogBSR purifyLogWarning - HiLink purifyLogBSW purifyLogWarning - HiLink purifyLogFMR purifyLogWarning - HiLink purifyLogMLK purifyLogWarning - HiLink purifyLogMSE purifyLogWarning - HiLink purifyLogPAR purifyLogWarning - HiLink purifyLogPLK purifyLogWarning - HiLink purifyLogSBR purifyLogWarning - HiLink purifyLogSOF purifyLogWarning - HiLink purifyLogUMC purifyLogWarning - HiLink purifyLogUMR purifyLogWarning +hi def link purifyLogABR purifyLogWarning +hi def link purifyLogBSR purifyLogWarning +hi def link purifyLogBSW purifyLogWarning +hi def link purifyLogFMR purifyLogWarning +hi def link purifyLogMLK purifyLogWarning +hi def link purifyLogMSE purifyLogWarning +hi def link purifyLogPAR purifyLogWarning +hi def link purifyLogPLK purifyLogWarning +hi def link purifyLogSBR purifyLogWarning +hi def link purifyLogSOF purifyLogWarning +hi def link purifyLogUMC purifyLogWarning +hi def link purifyLogUMR purifyLogWarning - HiLink purifyLogABW purifyLogCorrupting - HiLink purifyLogBRK purifyLogCorrupting - HiLink purifyLogFMW purifyLogCorrupting - HiLink purifyLogFNH purifyLogCorrupting - HiLink purifyLogFUM purifyLogCorrupting - HiLink purifyLogMRE purifyLogCorrupting - HiLink purifyLogSBW purifyLogCorrupting +hi def link purifyLogABW purifyLogCorrupting +hi def link purifyLogBRK purifyLogCorrupting +hi def link purifyLogFMW purifyLogCorrupting +hi def link purifyLogFNH purifyLogCorrupting +hi def link purifyLogFUM purifyLogCorrupting +hi def link purifyLogMRE purifyLogCorrupting +hi def link purifyLogSBW purifyLogCorrupting - HiLink purifyLogCOR purifyLogFatal - HiLink purifyLogNPR purifyLogFatal - HiLink purifyLogNPW purifyLogFatal - HiLink purifyLogZPR purifyLogFatal - HiLink purifyLogZPW purifyLogFatal +hi def link purifyLogCOR purifyLogFatal +hi def link purifyLogNPR purifyLogFatal +hi def link purifyLogNPW purifyLogFatal +hi def link purifyLogZPR purifyLogFatal +hi def link purifyLogZPW purifyLogFatal - HiLink purifyLogHeader Comment - HiLink purifyLogInformational PreProc - HiLink purifyLogWarning Type - HiLink purifyLogCorrupting Error - HiLink purifyLogFatal Error +hi def link purifyLogHeader Comment +hi def link purifyLogInformational PreProc +hi def link purifyLogWarning Type +hi def link purifyLogCorrupting Error +hi def link purifyLogFatal Error - delcommand HiLink -endif let b:current_syntax = "purifylog" diff --git a/runtime/syntax/pyrex.vim b/runtime/syntax/pyrex.vim index 7dc9b955b0..b860658975 100644 --- a/runtime/syntax/pyrex.vim +++ b/runtime/syntax/pyrex.vim @@ -4,21 +4,14 @@ " URL: http://marcobari.altervista.org/pyrex_vim.html " Last Change: 2009 Nov 09 -" 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 " Read the Python syntax to start with -if version < 600 - so <sfile>:p:h/python.vim -else - runtime! syntax/python.vim - unlet b:current_syntax -endif +runtime! syntax/python.vim +unlet b:current_syntax " Pyrex extentions syn keyword pyrexStatement cdef typedef ctypedef sizeof @@ -44,24 +37,15 @@ syn match pythonInclude "from" syn match pyrexForFrom "\(for[^:]*\)\@<=from" " Default highlighting -if version >= 508 || !exists("did_pyrex_syntax_inits") - if version < 508 - let did_pyrex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink pyrexStatement Statement - HiLink pyrexType Type - HiLink pyrexStructure Structure - HiLink pyrexInclude PreCondit - HiLink pyrexAccess pyrexStatement - if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") - HiLink pyrexBuiltin Function - endif - HiLink pyrexForFrom Statement - - delcommand HiLink +hi def link pyrexStatement Statement +hi def link pyrexType Type +hi def link pyrexStructure Structure +hi def link pyrexInclude PreCondit +hi def link pyrexAccess pyrexStatement +if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") +hi def link pyrexBuiltin Function endif +hi def link pyrexForFrom Statement + let b:current_syntax = "pyrex" diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index f0f03a8c8d..f258184b52 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Python " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> -" Last Change: 2016 Aug 14 +" Last Change: 2016 Sep 14 " Credits: Neil Schemenauer <nas@python.ca> " Dmitry Vasiliev " @@ -36,11 +36,8 @@ " let python_highlight_all = 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 @@ -91,14 +88,14 @@ syn keyword pythonAsync async await " followed by decorator name, optional parenthesized list of arguments, " and the next line with either def, class, or another decorator. syn match pythonDecorator - \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@=" + \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@=" \ display nextgroup=pythonDecoratorName skipwhite " A dot must be allowed because of @MyClass.myfunc decorators. " It must be preceded by a decorator symbol and on a separate line from " a function/class it decorates. syn match pythonDecoratorName - \ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@=" + \ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\s*\%((\_\s\{-}[^)]\_.\{-})\s*\)\=\%(#.*\)\=\n\)\@=" \ contained display nextgroup=pythonFunction skipnl " The zero-length non-grouping match of def or class before the function @@ -292,50 +289,39 @@ endif " Sync at the beginning of class, function, or method definition. syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" -if version >= 508 || !exists("did_python_syn_inits") - if version <= 508 - let did_python_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlight links. Can be overridden later. - HiLink pythonStatement Statement - HiLink pythonConditional Conditional - HiLink pythonRepeat Repeat - HiLink pythonOperator Operator - HiLink pythonException Exception - HiLink pythonInclude Include - HiLink pythonAsync Statement - HiLink pythonDecorator Define - HiLink pythonDecoratorName Function - HiLink pythonFunction Function - HiLink pythonComment Comment - HiLink pythonTodo Todo - HiLink pythonString String - HiLink pythonRawString String - HiLink pythonQuotes String - HiLink pythonTripleQuotes pythonQuotes - HiLink pythonEscape Special - if !exists("python_no_number_highlight") - HiLink pythonNumber Number - endif - if !exists("python_no_builtin_highlight") - HiLink pythonBuiltin Function - endif - if !exists("python_no_exception_highlight") - HiLink pythonExceptions Structure - endif - if exists("python_space_error_highlight") - HiLink pythonSpaceError Error - endif - if !exists("python_no_doctest_highlight") - HiLink pythonDoctest Special - HiLink pythonDoctestValue Define - endif - - delcommand HiLink +" The default highlight links. Can be overridden later. +hi def link pythonStatement Statement +hi def link pythonConditional Conditional +hi def link pythonRepeat Repeat +hi def link pythonOperator Operator +hi def link pythonException Exception +hi def link pythonInclude Include +hi def link pythonAsync Statement +hi def link pythonDecorator Define +hi def link pythonDecoratorName Function +hi def link pythonFunction Function +hi def link pythonComment Comment +hi def link pythonTodo Todo +hi def link pythonString String +hi def link pythonRawString String +hi def link pythonQuotes String +hi def link pythonTripleQuotes pythonQuotes +hi def link pythonEscape Special +if !exists("python_no_number_highlight") + hi def link pythonNumber Number +endif +if !exists("python_no_builtin_highlight") + hi def link pythonBuiltin Function +endif +if !exists("python_no_exception_highlight") + hi def link pythonExceptions Structure +endif +if exists("python_space_error_highlight") + hi def link pythonSpaceError Error +endif +if !exists("python_no_doctest_highlight") + hi def link pythonDoctest Special + hi def link pythonDoctestValue Define endif let b:current_syntax = "python" diff --git a/runtime/syntax/radiance.vim b/runtime/syntax/radiance.vim index 461b708f0e..c49e339a28 100644 --- a/runtime/syntax/radiance.vim +++ b/runtime/syntax/radiance.vim @@ -18,20 +18,13 @@ " comments, external command names and the null-modifier "void". -" 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 " all printing characters except '#' and '!' are valid in names. -if version >= 600 - setlocal iskeyword=\",$-~ -else - set iskeyword=\",$-~ -endif +setlocal iskeyword=\",$-~ " The null-modifier syn keyword radianceKeyword void @@ -130,29 +123,19 @@ syn keyword radianceTodo contained TODO XXX syn match radianceComment "#.*$" contains=radianceTodo " 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_radiance_syn_inits") - if version < 508 - let did_radiance_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink radianceKeyword Keyword - HiLink radianceExtraType Type - HiLink radianceSurfType Type - HiLink radianceLightType Type - HiLink radianceMatType Type - HiLink radiancePatType Type - HiLink radianceTexType Type - HiLink radianceMixType Type - HiLink radianceComment Comment - HiLink radianceCommand Function - HiLink radianceID String - HiLink radianceTodo Todo - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link radianceKeyword Keyword +hi def link radianceExtraType Type +hi def link radianceSurfType Type +hi def link radianceLightType Type +hi def link radianceMatType Type +hi def link radiancePatType Type +hi def link radianceTexType Type +hi def link radianceMixType Type +hi def link radianceComment Comment +hi def link radianceCommand Function +hi def link radianceID String +hi def link radianceTodo Todo let b:current_syntax = "radiance" diff --git a/runtime/syntax/ratpoison.vim b/runtime/syntax/ratpoison.vim index 9fc59bec0d..af8676c43d 100644 --- a/runtime/syntax/ratpoison.vim +++ b/runtime/syntax/ratpoison.vim @@ -5,11 +5,8 @@ " Last Change: 2011 Apr 11 " Previous Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au> -" 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 @@ -247,33 +244,23 @@ syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" " 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_ratpoison_syn_inits") - if version < 508 - let did_ratpoison_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink ratpoisonBooleanArg Boolean - HiLink ratpoisonCommandArg Keyword - HiLink ratpoisonComment Comment - HiLink ratpoisonDefCommand Identifier - HiLink ratpoisonGravityArg Constant - HiLink ratpoisonKeySeqArg Special - HiLink ratpoisonNumberArg Number - HiLink ratpoisonSetArg Keyword - HiLink ratpoisonStringCommand Identifier - HiLink ratpoisonTodo Todo - HiLink ratpoisonVoidCommand Identifier - HiLink ratpoisonWinFmtArg Special - HiLink ratpoisonWinNameArg Constant - HiLink ratpoisonWinListArg Constant +hi def link ratpoisonBooleanArg Boolean +hi def link ratpoisonCommandArg Keyword +hi def link ratpoisonComment Comment +hi def link ratpoisonDefCommand Identifier +hi def link ratpoisonGravityArg Constant +hi def link ratpoisonKeySeqArg Special +hi def link ratpoisonNumberArg Number +hi def link ratpoisonSetArg Keyword +hi def link ratpoisonStringCommand Identifier +hi def link ratpoisonTodo Todo +hi def link ratpoisonVoidCommand Identifier +hi def link ratpoisonWinFmtArg Special +hi def link ratpoisonWinNameArg Constant +hi def link ratpoisonWinListArg Constant - delcommand HiLink -endif let b:current_syntax = "ratpoison" diff --git a/runtime/syntax/rc.vim b/runtime/syntax/rc.vim index a2d5824d3e..4c6856bc83 100644 --- a/runtime/syntax/rc.vim +++ b/runtime/syntax/rc.vim @@ -8,11 +8,8 @@ " This file is based on the c.vim -" 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 @@ -148,55 +145,45 @@ syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|erro syn sync ccomment rcComment minlines=10 " 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_rc_syntax_inits") - if version < 508 - let did_rc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rcCharacter Character - HiLink rcSpecialCharacter rcSpecial - HiLink rcNumber Number - HiLink rcFloat Float - HiLink rcOctalError rcError - HiLink rcParenError rcError - HiLink rcInParen rcError - HiLink rcCommentError rcError - HiLink rcInclude Include - HiLink rcPreProc PreProc - HiLink rcDefine Macro - HiLink rcIncluded rcString - HiLink rcError Error - HiLink rcPreCondit PreCondit - HiLink rcCommentString rcString - HiLink rcComment2String rcString - HiLink rcCommentSkip rcComment - HiLink rcString String - HiLink rcComment Comment - HiLink rcSpecial SpecialChar - HiLink rcTodo Todo - - HiLink rcAttribute rcCommonAttribute - HiLink rcStdId rcStatement - HiLink rcStatement Statement - - " Default color overrides - hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow - hi def rcMainObject term=underline ctermfg=Blue guifg=Blue - hi def rcSubObject ctermfg=Green guifg=Green - hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green - hi def rcParam ctermfg=DarkGreen guifg=DarkGreen - hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen - hi def rcCommonAttribute ctermfg=Brown guifg=Brown - - "HiLink rcIdentifier Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link rcCharacter Character +hi def link rcSpecialCharacter rcSpecial +hi def link rcNumber Number +hi def link rcFloat Float +hi def link rcOctalError rcError +hi def link rcParenError rcError +hi def link rcInParen rcError +hi def link rcCommentError rcError +hi def link rcInclude Include +hi def link rcPreProc PreProc +hi def link rcDefine Macro +hi def link rcIncluded rcString +hi def link rcError Error +hi def link rcPreCondit PreCondit +hi def link rcCommentString rcString +hi def link rcComment2String rcString +hi def link rcCommentSkip rcComment +hi def link rcString String +hi def link rcComment Comment +hi def link rcSpecial SpecialChar +hi def link rcTodo Todo + +hi def link rcAttribute rcCommonAttribute +hi def link rcStdId rcStatement +hi def link rcStatement Statement + +" Default color overrides +hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow +hi def rcMainObject term=underline ctermfg=Blue guifg=Blue +hi def rcSubObject ctermfg=Green guifg=Green +hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green +hi def rcParam ctermfg=DarkGreen guifg=DarkGreen +hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen +hi def rcCommonAttribute ctermfg=Brown guifg=Brown + +"hi def link rcIdentifier Identifier + let b:current_syntax = "rc" diff --git a/runtime/syntax/rcs.vim b/runtime/syntax/rcs.vim index e45d5fdbb6..5a34802ada 100644 --- a/runtime/syntax/rcs.vim +++ b/runtime/syntax/rcs.vim @@ -9,11 +9,8 @@ " Options: " rcs_folding = 1 For folding strings -" 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 @@ -52,25 +49,15 @@ else endif " 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_rcs_syn_inits") - if version <= 508 - let did_rcs_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. - HiLink rcsKeyword Keyword - HiLink rcsNumber Identifier - HiLink rcsString String - HiLink rcsTextStr String - HiLink rcsSpecial Special - HiLink rcsDiffLines Special - HiLink rcsEOFError Error +hi def link rcsKeyword Keyword +hi def link rcsNumber Identifier +hi def link rcsString String +hi def link rcsTextStr String +hi def link rcsSpecial Special +hi def link rcsDiffLines Special +hi def link rcsEOFError Error - delcommand HiLink -endif let b:current_syntax = "rcs" diff --git a/runtime/syntax/rcslog.vim b/runtime/syntax/rcslog.vim index acacfa124b..18f4593c77 100644 --- a/runtime/syntax/rcslog.vim +++ b/runtime/syntax/rcslog.vim @@ -3,11 +3,8 @@ " Maintainer: Joe Karthauser <joe@freebsd.org> " Last Change: 2001 May 09 -" 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 @@ -16,22 +13,12 @@ syn match rcslogFile "^RCS file:.*" syn match rcslogDate "^date: .*$" " 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_rcslog_syntax_inits") - if version < 508 - let did_rcslog_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink rcslogFile Type - HiLink rcslogRevision Constant - HiLink rcslogDate Identifier +hi def link rcslogFile Type +hi def link rcslogRevision Constant +hi def link rcslogDate Identifier - delcommand HiLink -endif let b:current_syntax = "rcslog" diff --git a/runtime/syntax/rebol.vim b/runtime/syntax/rebol.vim index e6395758f3..a5d50c4ab1 100644 --- a/runtime/syntax/rebol.vim +++ b/runtime/syntax/rebol.vim @@ -6,11 +6,8 @@ " URL: http://www.eandem.co.uk/mrw/vim " -" 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 @@ -18,11 +15,7 @@ endif syn case ignore " As per current users documentation -if version < 600 - set isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ -else - setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ -endif +setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ " Yer TODO highlighter syn keyword rebolTodo contained TODO @@ -145,65 +138,55 @@ syn keyword rebolConstant none " 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_rebol_syntax_inits") - if version < 508 - let did_rebol_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link rebolTodo Todo + +hi def link rebolStatement Statement +hi def link rebolLabel Label +hi def link rebolConditional Conditional +hi def link rebolRepeat Repeat + +hi def link rebolOperator Operator +hi def link rebolLogicOperator rebolOperator +hi def link rebolLogicFunction rebolLogicOperator +hi def link rebolMathOperator rebolOperator +hi def link rebolMathFunction rebolMathOperator +hi def link rebolBinaryOperator rebolOperator +hi def link rebolBinaryFunction rebolBinaryOperator + +hi def link rebolType Type +hi def link rebolTypeFunction rebolOperator + +hi def link rebolWord Identifier +hi def link rebolWordPath rebolWord +hi def link rebolFunction Function + +hi def link rebolCharacter Character +hi def link rebolSpecialCharacter SpecialChar +hi def link rebolString String + +hi def link rebolNumber Number +hi def link rebolInteger rebolNumber +hi def link rebolDecimal rebolNumber +hi def link rebolTime rebolNumber +hi def link rebolDate rebolNumber +hi def link rebolMoney rebolNumber +hi def link rebolBinary rebolNumber +hi def link rebolEmail rebolString +hi def link rebolFile rebolString +hi def link rebolURL rebolString +hi def link rebolIssue rebolNumber +hi def link rebolTuple rebolNumber +hi def link rebolFloat Float +hi def link rebolBoolean Boolean + +hi def link rebolConstant Constant + +hi def link rebolComment Comment + +hi def link rebolError Error - HiLink rebolTodo Todo - - HiLink rebolStatement Statement - HiLink rebolLabel Label - HiLink rebolConditional Conditional - HiLink rebolRepeat Repeat - - HiLink rebolOperator Operator - HiLink rebolLogicOperator rebolOperator - HiLink rebolLogicFunction rebolLogicOperator - HiLink rebolMathOperator rebolOperator - HiLink rebolMathFunction rebolMathOperator - HiLink rebolBinaryOperator rebolOperator - HiLink rebolBinaryFunction rebolBinaryOperator - - HiLink rebolType Type - HiLink rebolTypeFunction rebolOperator - - HiLink rebolWord Identifier - HiLink rebolWordPath rebolWord - HiLink rebolFunction Function - - HiLink rebolCharacter Character - HiLink rebolSpecialCharacter SpecialChar - HiLink rebolString String - - HiLink rebolNumber Number - HiLink rebolInteger rebolNumber - HiLink rebolDecimal rebolNumber - HiLink rebolTime rebolNumber - HiLink rebolDate rebolNumber - HiLink rebolMoney rebolNumber - HiLink rebolBinary rebolNumber - HiLink rebolEmail rebolString - HiLink rebolFile rebolString - HiLink rebolURL rebolString - HiLink rebolIssue rebolNumber - HiLink rebolTuple rebolNumber - HiLink rebolFloat Float - HiLink rebolBoolean Boolean - - HiLink rebolConstant Constant - - HiLink rebolComment Comment - - HiLink rebolError Error - - delcommand HiLink -endif if exists("my_rebol_file") if file_readable(expand(my_rebol_file)) diff --git a/runtime/syntax/redif.vim b/runtime/syntax/redif.vim index 1a44a9f479..725067fd32 100644 --- a/runtime/syntax/redif.vim +++ b/runtime/syntax/redif.vim @@ -7,10 +7,8 @@ " File Extension: rdf " Note: The ReDIF format is used by RePEc. -" To be compatible with Vim 5.8 use: -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 diff --git a/runtime/syntax/registry.vim b/runtime/syntax/registry.vim index 4524247a08..67b5e49bcb 100644 --- a/runtime/syntax/registry.vim +++ b/runtime/syntax/registry.vim @@ -6,11 +6,8 @@ " Included patch from Alexander A. Ulitin " clear any unwanted syntax defs -" 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 @@ -85,29 +82,20 @@ syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$ " Dword (32 bits) syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial -if version >= 508 || !exists("did_registry_syntax_inits") - if version < 508 - let did_registry_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif " The default methods for highlighting. Can be overridden later - HiLink registryComment Comment - HiLink registryHead Constant - HiLink registryHKEY Constant - HiLink registryPath Special - HiLink registryRemove PreProc - HiLink registryGUID Identifier - HiLink registrySpecial Special - HiLink registrySubKey Type - HiLink registryString String - HiLink registryHex Number - HiLink registryDword Number - - delcommand HiLink -endif +hi def link registryComment Comment +hi def link registryHead Constant +hi def link registryHKEY Constant +hi def link registryPath Special +hi def link registryRemove PreProc +hi def link registryGUID Identifier +hi def link registrySpecial Special +hi def link registrySubKey Type +hi def link registryString String +hi def link registryHex Number +hi def link registryDword Number + let b:current_syntax = "registry" diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim index 98064e043a..9e7ff22e14 100644 --- a/runtime/syntax/remind.vim +++ b/runtime/syntax/remind.vim @@ -13,9 +13,8 @@ " version 0.7: updated email and link " version 0.6: added THROUGH keyword (courtesy of Ben Orchard) -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 @@ -48,35 +47,26 @@ syn match remindDates "'[0-9]\{4}[/-][0-9]\{1,2}[/-][0-9]\{1,2}\(@[0-9]\{1,2}[: syn match remindWarning display excludenl "\S\s\+$"ms=s+1 -if version >= 508 || !exists("did_remind_syn_inits") - if version < 508 - let did_remind_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink remindCommands Function - HiLink remindExpiry Repeat - HiLink remindTag Label - HiLink remindTimed Statement - HiLink remindMove Statement - HiLink remindSpecial Include - HiLink remindRun Function - HiLink remindConditional Conditional - HiLink remindComment Comment - HiLink remindTimes String - HiLink remindString String - HiLink remindDebug Debug - HiLink remindVar Identifier - HiLink remindSubst Constant - HiLink remindAdvanceNumber Number - HiLink remindDateSeparators Comment - HiLink remindDates String - HiLink remindWarning Error +hi def link remindCommands Function +hi def link remindExpiry Repeat +hi def link remindTag Label +hi def link remindTimed Statement +hi def link remindMove Statement +hi def link remindSpecial Include +hi def link remindRun Function +hi def link remindConditional Conditional +hi def link remindComment Comment +hi def link remindTimes String +hi def link remindString String +hi def link remindDebug Debug +hi def link remindVar Identifier +hi def link remindSubst Constant +hi def link remindAdvanceNumber Number +hi def link remindDateSeparators Comment +hi def link remindDates String +hi def link remindWarning Error - delcommand HiLink -endif let b:current_syntax = "remind" diff --git a/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim index 06d6885c1c..a879116a5f 100644 --- a/runtime/syntax/resolv.vim +++ b/runtime/syntax/resolv.vim @@ -9,9 +9,8 @@ " David Necas (Yeti) <yeti@physics.muni.cz> " Stefano Zacchiroli <zack@debian.org> -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 @@ -50,38 +49,29 @@ syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contai " Additional errors syn match resolvError /^search .\{257,}/ -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - HiLink resolvIP Number - HiLink resolvIPNetmask Number - HiLink resolvHostname String - HiLink resolvOption String - - HiLink resolvIPNameserver Number - HiLink resolvHostnameSearch String - HiLink resolvIPNetmaskSortList Number - - HiLink resolvNameServer Identifier - HiLink resolvLwserver Identifier - HiLink resolvDomain Identifier - HiLink resolvSearch Identifier - HiLink resolvSortList Identifier - HiLink resolvOptions Identifier - - HiLink resolvComment Comment - HiLink resolvOperator Operator - HiLink resolvError Error - HiLink resolvIPError Error - HiLink resolvIPSpecial Special - - delcommand HiLink -endif + +hi def link resolvIP Number +hi def link resolvIPNetmask Number +hi def link resolvHostname String +hi def link resolvOption String + +hi def link resolvIPNameserver Number +hi def link resolvHostnameSearch String +hi def link resolvIPNetmaskSortList Number + +hi def link resolvNameServer Identifier +hi def link resolvLwserver Identifier +hi def link resolvDomain Identifier +hi def link resolvSearch Identifier +hi def link resolvSortList Identifier +hi def link resolvOptions Identifier + +hi def link resolvComment Comment +hi def link resolvOperator Operator +hi def link resolvError Error +hi def link resolvIPError Error +hi def link resolvIPSpecial Special + let b:current_syntax = "resolv" diff --git a/runtime/syntax/reva.vim b/runtime/syntax/reva.vim index 03dfc9d4c3..f605992190 100644 --- a/runtime/syntax/reva.vim +++ b/runtime/syntax/reva.vim @@ -7,13 +7,8 @@ " Filetypes: *.rf *.frt " NOTE: You should also have the ftplugin/reva.vim file to set 'isk' -" For version 5.x: Clear all syntax items and don't load -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear - echo "Reva syntax file requires version 6.0 or later of vim!" - finish -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim index ef698a5351..360fc8ff9f 100644 --- a/runtime/syntax/rexx.vim +++ b/runtime/syntax/rexx.vim @@ -6,11 +6,8 @@ " Special Thanks to Dan Sharp <dwsharp@hotmail.com> and Rony G. Flatscher " <Rony.Flatscher@wu-wien.ac.at> for comments and additions -" 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 @@ -244,87 +241,77 @@ syn sync linecont "\(,\|-\ze-\@!\)\ze\s*\(--.*\|\/\*.*\)*$" exec "syn sync fromstart" " 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_rexx_syn_inits") - if version < 508 - let did_rexx_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " make binary and hex strings stand out - hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold - - HiLink rexxLabel2 Function - HiLink doLoopSelectLabelRegion rexxKeyword - HiLink endIterateLeaveLabelRegion rexxKeyword - HiLink rexxLoopKeywords rexxKeyword " Todo - - HiLink rexxNumber Normal "DiffChange -" HiLink rexxIdentifier DiffChange - - HiLink rexxRegularCallSignal Statement - HiLink rexxExceptionHandling Statement - - HiLink rexxLabel Function - HiLink rexxCharacter Character - HiLink rexxParenError rexxError - HiLink rexxInParen rexxError - HiLink rexxCommentError rexxError - HiLink rexxError Error - HiLink rexxKeyword Statement - HiLink rexxKeywordStatements Statement - - HiLink rexxFunction Function - HiLink rexxString String - HiLink rexxComment Comment - HiLink rexxTodo Todo - HiLink rexxSpecialVariable Special - HiLink rexxConditional rexxKeyword - - HiLink rexxOperator Operator - HiLink rexxMessageOperator rexxOperator - HiLink rexxLineComment Comment - - HiLink rexxLineContinue WildMenu - - HiLink rexxDirective rexxKeyword - HiLink rexxClassDirective Type - HiLink rexxMethodDirective rexxFunction - HiLink rexxAttributeDirective rexxFunction - HiLink rexxRequiresDirective Include - HiLink rexxRoutineDirective rexxFunction +" Only when an item doesn't have highlighting yet + +" make binary and hex strings stand out +hi rexxStringConstant term=bold,underline ctermfg=5 cterm=bold guifg=darkMagenta gui=bold + +hi def link rexxLabel2 Function +hi def link doLoopSelectLabelRegion rexxKeyword +hi def link endIterateLeaveLabelRegion rexxKeyword +hi def link rexxLoopKeywords rexxKeyword " Todo + +hi def link rexxNumber Normal "DiffChange +" hi def link rexxIdentifier DiffChange + +hi def link rexxRegularCallSignal Statement +hi def link rexxExceptionHandling Statement + +hi def link rexxLabel Function +hi def link rexxCharacter Character +hi def link rexxParenError rexxError +hi def link rexxInParen rexxError +hi def link rexxCommentError rexxError +hi def link rexxError Error +hi def link rexxKeyword Statement +hi def link rexxKeywordStatements Statement + +hi def link rexxFunction Function +hi def link rexxString String +hi def link rexxComment Comment +hi def link rexxTodo Todo +hi def link rexxSpecialVariable Special +hi def link rexxConditional rexxKeyword + +hi def link rexxOperator Operator +hi def link rexxMessageOperator rexxOperator +hi def link rexxLineComment Comment + +hi def link rexxLineContinue WildMenu + +hi def link rexxDirective rexxKeyword +hi def link rexxClassDirective Type +hi def link rexxMethodDirective rexxFunction +hi def link rexxAttributeDirective rexxFunction +hi def link rexxRequiresDirective Include +hi def link rexxRoutineDirective rexxFunction " rgf, 2012-09-09 - HiLink rexxOptionsDirective rexxFunction - HiLink rexxOptionsDirective2 rexxOptionsDirective - HiLink rexxOptionsDirective3 Normal " rexxOptionsDirective +hi def link rexxOptionsDirective rexxFunction +hi def link rexxOptionsDirective2 rexxOptionsDirective +hi def link rexxOptionsDirective3 Normal " rexxOptionsDirective - HiLink rexxConstantDirective rexxFunction +hi def link rexxConstantDirective rexxFunction - HiLink rexxConst Constant - HiLink rexxTypeSpecifier Type - HiLink rexxBuiltinClass rexxTypeSpecifier +hi def link rexxConst Constant +hi def link rexxTypeSpecifier Type +hi def link rexxBuiltinClass rexxTypeSpecifier - HiLink rexxEnvironmentSymbol rexxConst - HiLink rexxMessage rexxFunction +hi def link rexxEnvironmentSymbol rexxConst +hi def link rexxMessage rexxFunction - HiLink rexxParse rexxKeyword - HiLink rexxParse2 rexxParse +hi def link rexxParse rexxKeyword +hi def link rexxParse2 rexxParse - HiLink rexxGuard rexxKeyword - HiLink rexxTrace rexxKeyword +hi def link rexxGuard rexxKeyword +hi def link rexxTrace rexxKeyword - HiLink rexxRaise rexxKeyword - HiLink rexxRaise2 rexxRaise +hi def link rexxRaise rexxKeyword +hi def link rexxRaise2 rexxRaise - HiLink rexxForward rexxKeyword - HiLink rexxForward2 rexxForward +hi def link rexxForward rexxKeyword +hi def link rexxForward2 rexxForward - delcommand HiLink -endif let b:current_syntax = "rexx" diff --git a/runtime/syntax/rib.vim b/runtime/syntax/rib.vim index 6b9f2b0bd4..0ee607122f 100644 --- a/runtime/syntax/rib.vim +++ b/runtime/syntax/rib.vim @@ -4,10 +4,8 @@ " Last Change: 2003 May 11 " -" Remove any old syntax stuff hanging around -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -46,26 +44,17 @@ syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>" syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>" syn case match -if version >= 508 || !exists("did_rib_syntax_inits") - if version < 508 - let did_rib_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink ribStructure Structure - HiLink ribCommand Statement +hi def link ribStructure Structure +hi def link ribCommand Statement - HiLink ribStructureComment SpecialComment - HiLink ribLineComment Comment +hi def link ribStructureComment SpecialComment +hi def link ribLineComment Comment - HiLink ribString String - HiLink ribNumber Number - HiLink ribFloat Float +hi def link ribString String +hi def link ribNumber Number +hi def link ribFloat Float - delcommand HiLink -end let b:current_syntax = "rib" diff --git a/runtime/syntax/robots.vim b/runtime/syntax/robots.vim index 066628bb3c..396bf52b25 100644 --- a/runtime/syntax/robots.vim +++ b/runtime/syntax/robots.vim @@ -5,11 +5,8 @@ " URL: http://www.mggen.com/vim/syntax/robots.zip " Last change: 2001 May 09 -" 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 @@ -41,26 +38,17 @@ syn match robotsUrl "http[s]\=://\S*" syn match robotsMail "\S*@\S*" syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ -if version >= 508 || !exists("did_robos_syntax_inits") - if version < 508 - let did_robots_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink robotsComment Comment - HiLink robotsAgent Type - HiLink robotsDisallow Statement - HiLink robotsLine Special - HiLink robotsStar Operator - HiLink robotsDelimiter Delimiter - HiLink robotsUrl String - HiLink robotsMail String - HiLink robotsString String - - delcommand HiLink -endif + +hi def link robotsComment Comment +hi def link robotsAgent Type +hi def link robotsDisallow Statement +hi def link robotsLine Special +hi def link robotsStar Operator +hi def link robotsDelimiter Delimiter +hi def link robotsUrl String +hi def link robotsMail String +hi def link robotsString String + let b:current_syntax = "robots" diff --git a/runtime/syntax/rpcgen.vim b/runtime/syntax/rpcgen.vim index 85036dc049..08183d43a4 100644 --- a/runtime/syntax/rpcgen.vim +++ b/runtime/syntax/rpcgen.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: rpcgen " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Jan 13, 2015 -" Version: 10 +" Last Change: Aug 31, 2016 +" Version: 12 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN if exists("b:current_syntax") @@ -10,11 +10,7 @@ if exists("b:current_syntax") endif " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone @@ -28,30 +24,21 @@ syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 syn match rpcPassThru "^\s*%.*$" " 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_rpcgen_syntax_inits") - if version < 508 - let did_rpcgen_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink rpcProgName rpcName - HiLink rpcProgram rpcStatement - HiLink rpcVersName rpcName - HiLink rpcVersion rpcStatement - - HiLink rpcDecl cType - HiLink rpcPassThru cComment - - HiLink rpcName Special - HiLink rpcProcNmbr Delimiter - HiLink rpcProgNmbrErr Error - HiLink rpcStatement Statement - - delcommand HiLink +if !exists("skip_rpcgen_syntax_inits") + + hi def link rpcProgName rpcName + hi def link rpcProgram rpcStatement + hi def link rpcVersName rpcName + hi def link rpcVersion rpcStatement + + hi def link rpcDecl cType + hi def link rpcPassThru cComment + + hi def link rpcName Special + hi def link rpcProcNmbr Delimiter + hi def link rpcProgNmbrErr Error + hi def link rpcStatement Statement + endif let b:current_syntax = "rpcgen" diff --git a/runtime/syntax/rpl.vim b/runtime/syntax/rpl.vim index 6457803a06..f339f7ae6e 100644 --- a/runtime/syntax/rpl.vim +++ b/runtime/syntax/rpl.vim @@ -6,11 +6,8 @@ " URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim " Credits: Nothing -" 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 @@ -417,77 +414,67 @@ syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplS syntax match rplTab "\t" transparent " 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_rpl_syntax_inits") - if version < 508 - let did_rpl_syntax_inits = 1 - command -nargs=+ HiLink highlight link <args> - else - command -nargs=+ HiLink highlight default link <args> - endif - - " The default highlighting. - - HiLink rplControl Statement - HiLink rplStatement Statement - HiLink rplAlgConditional Conditional - HiLink rplConditional Repeat - HiLink rplConditionalError Error - HiLink rplRepeat Repeat - HiLink rplCycle Repeat - HiLink rplUntil Repeat - HiLink rplIntrinsic Special - HiLink rplStorage StorageClass - HiLink rplStorageExpr StorageClass - HiLink rplStorageError Error - HiLink rplReadWrite rplIntrinsic - - HiLink rplOperator Operator - - HiLink rplList Special - HiLink rplArray Special - HiLink rplConstant Identifier - HiLink rplExpr Type - - HiLink rplString String - HiLink rplStringGuilles String - HiLink rplStringAntislash String - - HiLink rplBinary Boolean - HiLink rplOctal Boolean - HiLink rplDecimal Boolean - HiLink rplHexadecimal Boolean - HiLink rplInteger Number - HiLink rplFloat Float - HiLink rplComplex Float - HiLink rplBoolean Identifier - - HiLink rplObsolete Todo - - HiLink rplPreCondit PreCondit - HiLink rplInclude Include - HiLink rplIncluded rplString - HiLink rplInclude Include - HiLink rplExecPath Include - HiLink rplPreProc PreProc - HiLink rplComment Comment - HiLink rplCommentLine Comment - HiLink rplCommentString Comment - HiLink rplSubDelimitor rplStorage - HiLink rplCommentError Error - HiLink rplParenError Error - HiLink rplSubError Error - HiLink rplArrayError Error - HiLink rplListError Error - HiLink rplTab Error - HiLink rplBinaryError Error - HiLink rplOctalError Error - HiLink rplDecimalError Error - HiLink rplHexadecimalError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. + +hi def link rplControl Statement +hi def link rplStatement Statement +hi def link rplAlgConditional Conditional +hi def link rplConditional Repeat +hi def link rplConditionalError Error +hi def link rplRepeat Repeat +hi def link rplCycle Repeat +hi def link rplUntil Repeat +hi def link rplIntrinsic Special +hi def link rplStorage StorageClass +hi def link rplStorageExpr StorageClass +hi def link rplStorageError Error +hi def link rplReadWrite rplIntrinsic + +hi def link rplOperator Operator + +hi def link rplList Special +hi def link rplArray Special +hi def link rplConstant Identifier +hi def link rplExpr Type + +hi def link rplString String +hi def link rplStringGuilles String +hi def link rplStringAntislash String + +hi def link rplBinary Boolean +hi def link rplOctal Boolean +hi def link rplDecimal Boolean +hi def link rplHexadecimal Boolean +hi def link rplInteger Number +hi def link rplFloat Float +hi def link rplComplex Float +hi def link rplBoolean Identifier + +hi def link rplObsolete Todo + +hi def link rplPreCondit PreCondit +hi def link rplInclude Include +hi def link rplIncluded rplString +hi def link rplInclude Include +hi def link rplExecPath Include +hi def link rplPreProc PreProc +hi def link rplComment Comment +hi def link rplCommentLine Comment +hi def link rplCommentString Comment +hi def link rplSubDelimitor rplStorage +hi def link rplCommentError Error +hi def link rplParenError Error +hi def link rplSubError Error +hi def link rplArrayError Error +hi def link rplListError Error +hi def link rplTab Error +hi def link rplBinaryError Error +hi def link rplOctalError Error +hi def link rplDecimalError Error +hi def link rplHexadecimalError Error + let b:current_syntax = "rpl" diff --git a/runtime/syntax/rtf.vim b/runtime/syntax/rtf.vim index 8f5ea71a36..c856f9ffcf 100644 --- a/runtime/syntax/rtf.vim +++ b/runtime/syntax/rtf.vim @@ -13,11 +13,8 @@ " TODO: render underline, italic, bold -" 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 @@ -52,35 +49,25 @@ syn match rtfBlue "\\blue[0-9][0-9]*" syn match rtfFootNote "[#$K+]{\\footnote.*}" contains=rtfControlWord,rtfNewControlWord " 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_rtf_syntax_inits") - if version < 508 - let did_rtf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - HiLink rtfControlWord Statement - HiLink rtfNewControlWord Special - HiLink rtfControlSymbol Constant - HiLink rtfCharacter Character - HiLink rtfUnicodeCharacter SpecialChar - HiLink rtfFootNote Comment - - " Define colors for the syntax file - hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed - hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen - hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue - - HiLink rtfRed rtfRed - HiLink rtfGreen rtfGreen - HiLink rtfBlue rtfBlue - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + + +hi def link rtfControlWord Statement +hi def link rtfNewControlWord Special +hi def link rtfControlSymbol Constant +hi def link rtfCharacter Character +hi def link rtfUnicodeCharacter SpecialChar +hi def link rtfFootNote Comment + +" Define colors for the syntax file +hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed +hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen +hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue + +hi def link rtfRed rtfRed +hi def link rtfGreen rtfGreen +hi def link rtfBlue rtfBlue + let b:current_syntax = "rtf" diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index 28f553decb..ca7f51b1ea 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -9,16 +9,45 @@ " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) " ---------------------------------------------------------------------------- +" Prelude {{{1 if exists("b:current_syntax") finish endif +" this file uses line continuations +let s:cpo_sav = &cpo +set cpo&vim + +" Folding Config {{{1 if has("folding") && exists("ruby_fold") setlocal foldmethod=syntax endif +let s:foldable_groups = split( + \ get( + \ b:, + \ 'ruby_foldable_groups', + \ get(g:, 'ruby_foldable_groups', 'ALL') + \ ) + \ ) + +function! s:foldable(...) abort + if index(s:foldable_groups, 'ALL') > -1 + return 1 + endif + + for l:i in a:000 + if index(s:foldable_groups, l:i) > -1 + return 1 + endif + endfor + + return 0 +endfunction " }}} + syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo +" Whitespace Errors {{{1 if exists("ruby_space_errors") if !exists("ruby_no_trail_space_error") syn match rubySpaceError display excludenl "\s\+$" @@ -28,14 +57,14 @@ if exists("ruby_space_errors") endif endif -" Operators +" Operators {{{1 if exists("ruby_operators") - syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::" + syn match rubyOperator "[~!^|*/%+-]\|&\.\@!\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@1<!>\|\*\*\|\.\.\.\|\.\.\|::" syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" - syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop endif -" Expression Substitution and Backslash Notation +" Expression Substitution and Backslash Notation {{{1 syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display syn match rubyQuoteEscape "\\[\\']" contained display @@ -45,18 +74,19 @@ syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained con syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained -syn region rubyNoInterpolation start="\\#{" end="}" contained +syn region rubyNoInterpolation start="\\#{" end="}" contained syn match rubyNoInterpolation "\\#{" display contained syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained syn match rubyNoInterpolation "\\#\$\W" display contained -syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE +syn match rubyDelimiterEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained +" Regular Expression Metacharacters {{{1 " These are mostly Oniguruma ready syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial @@ -79,36 +109,40 @@ syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolati syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment -" Numbers and ASCII Codes -syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display +" Numbers and ASCII Codes {{{1 +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@1<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*r\=i\=\>" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*r\=i\=\>" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*r\=i\=\>" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)r\=i\=\>" display -" Identifiers +" Identifiers {{{1 syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent -syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!" +syn match rubyConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!" syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display -syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" -syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" -syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" -syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" -syn match rubySymbol "[]})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" -syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 -syn match rubySymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1 -syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1 -syn match rubySymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1 -syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold -syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +syn match rubySymbol "[]})\"':]\@1<!:\%(\^\|\~@\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!@\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@1<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@1<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" +syn match rubySymbol "[]})\"':]\@1<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" + +if s:foldable(':') + syn region rubySymbol start="[]})\"':]\@1<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold + syn region rubySymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +else + syn region rubySymbol start="[]})\"':]\@1<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape + syn region rubySymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial +endif + +syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@=" syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained -syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter +syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" oneline display contains=rubyBlockParameter syn match rubyInvalidVariable "$[^ A-Za-z_-]" syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# @@ -117,93 +151,187 @@ syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" -syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" - -" Normal Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold - -" Generalized Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold - -" Normal String and Shell Command Output -syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold -syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold -syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold - -" Generalized Single Quoted String, Symbol and Array of Strings -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape -syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape - -" Generalized Double Quoted String and Array of Strings and Shell Command Output +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(ARGF\|ARGV\|ENV\|DATA\|FALSE\|NIL\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" + +" Normal Regular Expression {{{1 +if s:foldable('/') + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold +else + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,{[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial +endif + +" Generalized Regular Expression {{{1 +if s:foldable('%') + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +else + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial + syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z(\s\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial +endif + +" Normal String {{{1 +let s:spell_cluster = exists('ruby_spellcheck_strings') ? ',@Spell' : '' +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" ' . + \ (s:foldable('%') ? 'fold' : '') . ' contains=@rubyStringSpecial' . s:spell_cluster +exe 'syn region rubyString matchgroup=rubyStringDelimiter start="''" end="''" skip="\\\\\|\\''" ' . + \ (s:foldable('%') ? 'fold' : '') . ' contains=rubyQuoteEscape' . s:spell_cluster + +" Shell Command Output {{{1 +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial +endif + +" Generalized Single Quoted String, Symbol and Array of Strings {{{1 +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%q\z(\s\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%s\z(\s\)" end="\z1" skip="\\\\\|\\\z1" +endif + +" Generalized Double Quoted String and Array of Strings and Shell Command Output {{{1 " Note: %= is not matched here as the beginning of a double quoted string -syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold - -" Here Document -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop - -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend - -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend -syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +if s:foldable('%') + syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold + syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +else + syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape + syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx]\z(\s\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial +endif + +" Array of Symbols {{{1 +if s:foldable('%') + " Array of Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimiterEscape + + " Array of interpolated Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape fold + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape fold +else + " Array of Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i{" end="}" skip="\\\\\|\\}" contains=rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i<" end=">" skip="\\\\\|\\>" contains=rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i\[" end="\]" skip="\\\\\|\\\]" contains=rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%i(" end=")" skip="\\\\\|\\)" contains=rubyNestedParentheses,rubyDelimiterEscape + + " Array of interpolated Symbols + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I{" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimiterEscape + syn region rubySymbol matchgroup=rubySymbolDelimiter start="%I(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimiterEscape +endif + +" Here Document {{{1 +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop + +if s:foldable('<<') + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend + + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend +else + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial keepend + + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]"\z([^"]*\)"\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart keepend + syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial keepend +endif +" eRuby Config {{{1 if exists('main_syntax') && main_syntax == 'eruby' let b:ruby_no_expensive = 1 end +" Module, Class, Method and Alias Declarations {{{1 syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration -syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 -syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration +syn match rubyFunction "\%(\s\|^\)\@1<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 +syn match rubyFunction "\%([[:space:].]\|^\)\@2<=\%(\[\]=\=\|\*\*\|[-+!~]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter -" Keywords +" Keywords {{{1 " Note: the following keywords have already been defined: " begin case class def do end for if module unless until while syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" syn match rubyOperator "\<defined?" display syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!" syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" -syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise +syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__dir__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" -" Expensive Mode - match 'end' with the appropriate opening keyword for syntax -" based folding and special highlighting of module/class/method definitions +" Expensive Mode {{{1 +" Match 'end' with the appropriate opening keyword for syntax based folding +" and special highlighting of module/class/method definitions if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl @@ -211,23 +339,66 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl - syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold + if s:foldable('def') + syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('class') + syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('module') + syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop + endif " modifiers - syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display - syn match rubyRepeatModifier "\<\%(while\|until\)\>" display + syn match rubyLineContinuation "\\$" nextgroup=rubyConditionalModifier,rubyRepeatModifier skipwhite skipnl + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" + syn match rubyRepeatModifier "\<\%(while\|until\)\>" + + if s:foldable('do') + syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif - syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold " curly bracket block or hash literal - syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold - syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold + if s:foldable('{') + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('[') + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop + endif " statements without 'do' - syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold - syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + if s:foldable('begin') + syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('case') + syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop + endif + + if s:foldable('if') + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold + else + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@1<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop + endif syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression @@ -237,7 +408,12 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") " statements with optional 'do' syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop - syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + + if s:foldable('for') + syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + else + syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine + endif if !exists("ruby_minlines") let ruby_minlines = 500 @@ -252,7 +428,7 @@ else syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" endif -" Special Methods +" Special Methods {{{1 if !exists("ruby_no_special_methods") syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function " attr is a common variable name @@ -263,40 +439,40 @@ if !exists("ruby_no_special_methods") syn keyword rubyException raise fail catch throw " false positive with 'include?' syn match rubyInclude "\<include\>[?!]\@!" - syn keyword rubyInclude autoload extend load prepend require require_relative + syn keyword rubyInclude autoload extend load prepend refine require require_relative using syn keyword rubyKeyword callcc caller lambda proc endif -" Comments and Documentation +" Comments and Documentation {{{1 syn match rubySharpBang "\%^#!.*" display -syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell -if !exists("ruby_no_comment_fold") - syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend +if !exists("ruby_no_comment_fold") && s:foldable('#') + syn region rubyMultilineComment start="^\s*#.*\n\%(^\s*#\)\@=" end="^\s*#.*\n\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold else syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell endif +" Keyword Nobbling {{{1 " Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE - -syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE -syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE - -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|prepend\|private\|proc\|protected\)\>" transparent contains=NONE -syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\|throw\|trap\)\>" transparent contains=NONE - -" __END__ Directive -syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold +syn match rubyKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%([_[:lower:]][_[:alnum:]]*\|\<\%(BEGIN\|END\)\>\)" transparent contains=NONE +syn match rubyKeywordAsMethod "\(defined?\|exit!\)\@!\<[_[:lower:]][_[:alnum:]]*[?!]" transparent contains=NONE + +" More Symbols {{{1 +syn match rubySymbol "\%([{(,]\_s*\)\zs\l\w*[!?]\=::\@!"he=e-1 +syn match rubySymbol "[]})\"':]\@1<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="he=e-1 +syn match rubySymbol "\%([{(,]\_s*\)\zs[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1 +syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],]\@="hs=s+1,he=e-1 + +" __END__ Directive {{{1 +if s:foldable('__END__') + syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold +else + syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" +endif +" Default Highlighting {{{1 hi def link rubyClass rubyDefine hi def link rubyModule rubyDefine hi def link rubyMethodExceptional rubyDefine @@ -336,6 +512,7 @@ hi def link rubyAccess Statement hi def link rubyAttribute Statement hi def link rubyEval Statement hi def link rubyPseudoVariable Constant +hi def link rubyCapitalizedMethod rubyLocalVariableOrMethod hi def link rubyComment Comment hi def link rubyData Comment @@ -349,7 +526,7 @@ hi def link rubyInterpolationDelimiter Delimiter hi def link rubyNoInterpolation rubyString hi def link rubySharpBang PreProc hi def link rubyRegexpDelimiter rubyStringDelimiter -hi def link rubySymbolDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubySymbol hi def link rubyStringDelimiter Delimiter hi def link rubyHeredoc rubyString hi def link rubyString String @@ -366,6 +543,10 @@ hi def link rubyInvalidVariable Error hi def link rubyError Error hi def link rubySpaceError rubyError +" Postscript {{{1 let b:current_syntax = "ruby" -" vim: nowrap sw=2 sts=2 ts=8 noet: +let &cpo = s:cpo_sav +unlet! s:cpo_sav + +" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: diff --git a/runtime/syntax/samba.vim b/runtime/syntax/samba.vim index 93029cc202..5b866cc6d9 100644 --- a/runtime/syntax/samba.vim +++ b/runtime/syntax/samba.vim @@ -8,11 +8,8 @@ " " Don't forget to run your config file through testparm(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 @@ -107,24 +104,14 @@ syn keyword sambaKeyword contained shutdown signing special spnego syn keyword sambaKeyword contained store unknown unwriteable " 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_samba_syn_inits") - if version < 508 - let did_samba_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink sambaParameter Normal - HiLink sambaKeyword Type - HiLink sambaSection Statement - HiLink sambaMacro PreProc - HiLink sambaComment Comment - HiLink sambaContinue Operator - HiLink sambaBoolean Constant - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link sambaParameter Normal +hi def link sambaKeyword Type +hi def link sambaSection Statement +hi def link sambaMacro PreProc +hi def link sambaComment Comment +hi def link sambaContinue Operator +hi def link sambaBoolean Constant let b:current_syntax = "samba" diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim index dc70e1fd90..90d411dc8b 100644 --- a/runtime/syntax/sas.vim +++ b/runtime/syntax/sas.vim @@ -12,11 +12,8 @@ " Attempted to match SAS default syntax colors; " Changed syncing so it doesn't lose colors on large blocks; " Much thanks to Bob Heckel for knowledgeable tweaking. -" 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 @@ -44,7 +41,7 @@ syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo " Comments with * starting after a semicolon (Paulo Tanimoto) syn region sasComment start="^\s*\*" end=";" contains=sasTodo -" This line defines macro variables in code. HiLink at end of file +" This line defines macro variables in code. "hi def link" at end of file " defines the color scheme. Begin region with ampersand and end with " any non-word character offset by -1; put ampersand in the skip list " just in case it is used to concatenate macro variable values. @@ -52,11 +49,7 @@ syn region sasComment start="^\s*\*" end=";" contains=sasTodo " Thanks to ronald höllwarth for this fix to an intra-versioning " problem with this little feature -if version < 600 - syn region sasMacroVar start="\&" skip="[_&]" end="\W"he=e-1 -else " for the older Vim's just do it their way ... - syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 -endif +syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 " I dont think specific PROCs need to be listed if use this line (Bob Heckel). @@ -218,62 +211,52 @@ syn keyword sasUnderscore _ALL_ _AUTOMATIC_ _CHARACTER_ _INFILE_ _N_ _NAME_ _NUL " End of SAS Functions " 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_sas_syntax_inits") - if version < 508 - let did_sas_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Default sas enhanced editor color syntax - hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White - hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow - hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White - hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White - hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White - hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White - hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White - hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White - hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White - hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White - hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White - hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White - hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +" Only when an item doesn't have highlighting yet + + +" Default sas enhanced editor color syntax +hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White +hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow +hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White +hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White +hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White +hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White +hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White +hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White +hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White +hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White +hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White +hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White " Colors that closely match SAS log colors for default color scheme - hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White - hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White - hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White - - - " Special hilighting for the SAS proc section - - HiLink sasComment sComment - HiLink sasConditional sKeyword - HiLink sasStep sSection - HiLink sasFunction sKeyword - HiLink sasMacro mKeyword - HiLink sasMacroVar NonText - HiLink sasNumber sNumber - HiLink sasStatement sKeyword - HiLink sasString sString - HiLink sasProc sProc - " (Bob Heckel) - HiLink sasTodo Todo - HiLink sasErrMsg lError - HiLink sasWarnMsg lWarning - HiLink sasLogMsg lNote - HiLink sasCards sCard - " (Bob Heckel) - HiLink sasUnderscore PreProc - delcommand HiLink -endif +hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White +hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White +hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White + + +" Special hilighting for the SAS proc section + +hi def link sasComment sComment +hi def link sasConditional sKeyword +hi def link sasStep sSection +hi def link sasFunction sKeyword +hi def link sasMacro mKeyword +hi def link sasMacroVar NonText +hi def link sasNumber sNumber +hi def link sasStatement sKeyword +hi def link sasString sString +hi def link sasProc sProc +" (Bob Heckel) +hi def link sasTodo Todo +hi def link sasErrMsg lError +hi def link sasWarnMsg lWarning +hi def link sasLogMsg lNote +hi def link sasCards sCard +" (Bob Heckel) +hi def link sasUnderscore PreProc " Syncronize from beginning to keep large blocks from losing " syntax coloring while moving through code. diff --git a/runtime/syntax/sass.vim b/runtime/syntax/sass.vim index 2ea0722696..d075c8736e 100644 --- a/runtime/syntax/sass.vim +++ b/runtime/syntax/sass.vim @@ -2,7 +2,7 @@ " Language: Sass " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Filenames: *.sass -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("b:current_syntax") finish @@ -13,7 +13,7 @@ runtime! syntax/css.vim syn case ignore syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp -syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp +syn cluster sassCssAttributes contains=css.*Attr,sassEndOfLineComment,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP @@ -58,6 +58,9 @@ syn match sassAmpersand "&" " TODO: Attribute namespaces " TODO: Arithmetic (including strings and concatenation) +syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators +syn keyword sassMediaOperators and not only contained +syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassDebugLine end=";\|$" matchgroup=sassDebug start="@debug\>" contains=@sassCssAttributes,sassVariable,sassFunction syn region sassWarnLine end=";\|$" matchgroup=sassWarn start="@warn\>" contains=@sassCssAttributes,sassVariable,sassFunction @@ -67,7 +70,9 @@ syn keyword sassFor from to through in contained syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo,@Spell +syn match sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell +hi def link sassEndOfLineComment sassComment hi def link sassCssComment sassComment hi def link sassComment Comment hi def link sassDefault cssImportant @@ -80,6 +85,9 @@ hi def link sassExtend PreProc hi def link sassFunctionDecl PreProc hi def link sassReturn PreProc hi def link sassTodo Todo +hi def link sassCharset PreProc +hi def link sassMedia PreProc +hi def link sassMediaOperators PreProc hi def link sassInclude Include hi def link sassDebug sassControl hi def link sassWarn sassControl diff --git a/runtime/syntax/sather.vim b/runtime/syntax/sather.vim index 103cf0b8cd..baa3a825d8 100644 --- a/runtime/syntax/sather.vim +++ b/runtime/syntax/sather.vim @@ -9,11 +9,8 @@ " Homepage: http://www.icsi.berkeley.edu/~sather " Sather files use .sa as suffix -" 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 @@ -61,44 +58,34 @@ syn match satherComment "--.*" contains=satherComment2String,satherCharacter syn sync ccomment satherComment " 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_sather_syn_inits") - if version < 508 - let did_sather_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink satherBranch satherStatement - HiLink satherLabel satherStatement - HiLink satherConditional satherStatement - HiLink satherSynchronize satherStatement - HiLink satherRepeat satherStatement - HiLink satherExceptions satherStatement - HiLink satherStorageClass satherDeclarative - HiLink satherMethodDecl satherDeclarative - HiLink satherClassDecl satherDeclarative - HiLink satherScopeDecl satherDeclarative - HiLink satherBoolValue satherValue - HiLink satherSpecial satherValue - HiLink satherString satherValue - HiLink satherCharacter satherValue - HiLink satherSpecialCharacter satherValue - HiLink satherNumber satherValue - HiLink satherStatement Statement - HiLink satherOperator Statement - HiLink satherComment Comment - HiLink satherType Type - HiLink satherValue String - HiLink satherString String - HiLink satherSpecial String - HiLink satherCharacter String - HiLink satherDeclarative Type - HiLink satherExternal PreCondit - delcommand HiLink -endif +hi def link satherBranch satherStatement +hi def link satherLabel satherStatement +hi def link satherConditional satherStatement +hi def link satherSynchronize satherStatement +hi def link satherRepeat satherStatement +hi def link satherExceptions satherStatement +hi def link satherStorageClass satherDeclarative +hi def link satherMethodDecl satherDeclarative +hi def link satherClassDecl satherDeclarative +hi def link satherScopeDecl satherDeclarative +hi def link satherBoolValue satherValue +hi def link satherSpecial satherValue +hi def link satherString satherValue +hi def link satherCharacter satherValue +hi def link satherSpecialCharacter satherValue +hi def link satherNumber satherValue +hi def link satherStatement Statement +hi def link satherOperator Statement +hi def link satherComment Comment +hi def link satherType Type +hi def link satherValue String +hi def link satherString String +hi def link satherSpecial String +hi def link satherCharacter String +hi def link satherDeclarative Type +hi def link satherExternal PreCondit let b:current_syntax = "sather" diff --git a/runtime/syntax/scala.vim b/runtime/syntax/scala.vim index b04af3be5b..7779c43996 100644 --- a/runtime/syntax/scala.vim +++ b/runtime/syntax/scala.vim @@ -7,9 +7,8 @@ " ---------------------------------------------------------------------------- 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 = 'scala' diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim index c59e09cd17..af9a659e07 100644 --- a/runtime/syntax/scheme.vim +++ b/runtime/syntax/scheme.vim @@ -14,11 +14,8 @@ " Initializing: -" 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 @@ -64,11 +61,7 @@ syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=AL " R5RS Scheme Functions and Syntax: -if version < 600 - set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -else - setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ -endif +setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ syn keyword schemeSyntax lambda and or if cond case define let let* letrec syn keyword schemeSyntax begin do delay set! else => @@ -306,38 +299,28 @@ syn sync match matchPlace grouphere NONE "^[^ \t]" " ... i.e. synchronize on a line that starts at the left margin " 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_scheme_syntax_inits") - if version < 508 - let did_scheme_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink schemeSyntax Statement - HiLink schemeFunc Function +hi def link schemeSyntax Statement +hi def link schemeFunc Function - HiLink schemeString String - HiLink schemeCharacter Character - HiLink schemeNumber Number - HiLink schemeBoolean Boolean +hi def link schemeString String +hi def link schemeCharacter Character +hi def link schemeNumber Number +hi def link schemeBoolean Boolean - HiLink schemeDelimiter Delimiter - HiLink schemeConstant Constant +hi def link schemeDelimiter Delimiter +hi def link schemeConstant Constant - HiLink schemeComment Comment - HiLink schemeMultilineComment Comment - HiLink schemeError Error +hi def link schemeComment Comment +hi def link schemeMultilineComment Comment +hi def link schemeError Error - HiLink schemeExtSyntax Type - HiLink schemeExtFunc PreProc +hi def link schemeExtSyntax Type +hi def link schemeExtFunc PreProc - HiLink schemeLang PreProc +hi def link schemeLang PreProc - delcommand HiLink -endif let b:current_syntax = "scheme" diff --git a/runtime/syntax/scilab.vim b/runtime/syntax/scilab.vim index 1bfc003678..03e123b058 100644 --- a/runtime/syntax/scilab.vim +++ b/runtime/syntax/scilab.vim @@ -9,11 +9,8 @@ " -" 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 @@ -66,49 +63,39 @@ syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" " 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_scilab_syntax_inits") - if version < 508 - let did_scilab_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink scilabStatement Statement - HiLink scilabFunction Keyword - HiLink scilabPredicate Keyword - HiLink scilabKeyword Keyword - HiLink scilabDebug Debug - HiLink scilabRepeat Repeat - HiLink scilabConditional Conditional - HiLink scilabMultiplex Conditional - - HiLink scilabConstant Constant - HiLink scilabBoolean Boolean - - HiLink scilabDelimiter Delimiter - HiLink scilabMlistAccess Delimiter - HiLink scilabComparison Operator - HiLink scilabLogical Operator - HiLink scilabAssignment Operator - HiLink scilabArithmetic Operator - HiLink scilabRange Operator - HiLink scilabLineContinuation Underlined - HiLink scilabTransposition Operator - - HiLink scilabTodo Todo - HiLink scilabComment Comment - - HiLink scilabNumber Number - HiLink scilabString String - - HiLink scilabIdentifier Identifier - HiLink scilabOverload Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link scilabStatement Statement +hi def link scilabFunction Keyword +hi def link scilabPredicate Keyword +hi def link scilabKeyword Keyword +hi def link scilabDebug Debug +hi def link scilabRepeat Repeat +hi def link scilabConditional Conditional +hi def link scilabMultiplex Conditional + +hi def link scilabConstant Constant +hi def link scilabBoolean Boolean + +hi def link scilabDelimiter Delimiter +hi def link scilabMlistAccess Delimiter +hi def link scilabComparison Operator +hi def link scilabLogical Operator +hi def link scilabAssignment Operator +hi def link scilabArithmetic Operator +hi def link scilabRange Operator +hi def link scilabLineContinuation Underlined +hi def link scilabTransposition Operator + +hi def link scilabTodo Todo +hi def link scilabComment Comment + +hi def link scilabNumber Number +hi def link scilabString String + +hi def link scilabIdentifier Identifier +hi def link scilabOverload Special + let b:current_syntax = "scilab" diff --git a/runtime/syntax/sd.vim b/runtime/syntax/sd.vim index 7fa0e04492..b497ba5eaa 100644 --- a/runtime/syntax/sd.vim +++ b/runtime/syntax/sd.vim @@ -5,9 +5,8 @@ " URL: http://netstudent.polito.it/vim_syntax/ " Last Change: 2012 Feb 03 by Thilo Six -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 @@ -51,29 +50,20 @@ syn keyword sdSpecial TRUE FALSE NULL syn keyword sdDelimiter STREAM STREAM_END syn match sdError /^search .\{257,}/ -if version >= 508 || !exists("did_config_syntax_inits") - if version < 508 - let did_config_syntax_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - HiLink sdIP Number - HiLink sdHostname Type - HiLink sdEncoding Identifier - HiLink sdCoding Identifier - HiLink sdSource Identifier - HiLink sdComment Comment - HiLink sdIPError Error - HiLink sdError Error - HiLink sdStatement Statement - HiLink sdIPSpecial Special - HiLink sdSpecial Special - HiLink sdDelimiter Delimiter +hi def link sdIP Number +hi def link sdHostname Type +hi def link sdEncoding Identifier +hi def link sdCoding Identifier +hi def link sdSource Identifier +hi def link sdComment Comment +hi def link sdIPError Error +hi def link sdError Error +hi def link sdStatement Statement +hi def link sdIPSpecial Special +hi def link sdSpecial Special +hi def link sdDelimiter Delimiter - delcommand HiLink -endif let b:current_syntax = "sd" diff --git a/runtime/syntax/sdl.vim b/runtime/syntax/sdl.vim index b524b72266..7df38d1955 100644 --- a/runtime/syntax/sdl.vim +++ b/runtime/syntax/sdl.vim @@ -3,11 +3,8 @@ " Maintainer: Michael Piefel <entwurf@piefel.de> " Last Change: 2 May 2001 -" 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 @@ -129,38 +126,27 @@ syn keyword sdlType STRING OBJECT IDENTIFIER NULL syn sync ccomment sdlComment " 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_sdl_syn_inits") - if version < 508 - let did_sdl_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - command -nargs=+ Hi hi <args> - else - command -nargs=+ HiLink hi def link <args> - command -nargs=+ Hi hi def <args> - endif - - HiLink sdlException Label - HiLink sdlConditional sdlStatement - HiLink sdlVirtual sdlStatement - HiLink sdlExported sdlFlag - HiLink sdlCommentError sdlError - HiLink sdlOperator Operator - HiLink sdlStructure sdlType - Hi sdlStatement term=bold ctermfg=4 guifg=Blue - Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic - Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline - Hi sdlInput term=bold guifg=Red - HiLink sdlType Type - HiLink sdlString String - HiLink sdlComment Comment - HiLink sdlSpecial Special - HiLink sdlError Error - - delcommand HiLink - delcommand Hi -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ Hi hi def <args> + +hi def link sdlException Label +hi def link sdlConditional sdlStatement +hi def link sdlVirtual sdlStatement +hi def link sdlExported sdlFlag +hi def link sdlCommentError sdlError +hi def link sdlOperator Operator +hi def link sdlStructure sdlType +Hi sdlStatement term=bold ctermfg=4 guifg=Blue +Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic +Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline +Hi sdlInput term=bold guifg=Red +hi def link sdlType Type +hi def link sdlString String +hi def link sdlComment Comment +hi def link sdlSpecial Special +hi def link sdlError Error + +delcommand Hi let b:current_syntax = "sdl" diff --git a/runtime/syntax/sed.vim b/runtime/syntax/sed.vim index f0f80300d6..63b39db81f 100644 --- a/runtime/syntax/sed.vim +++ b/runtime/syntax/sed.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim " Last Change: 2010 May 29 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -49,8 +46,12 @@ syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained " Metacharacters: $ * . \ ^ [ ~ " @ is used as delimiter and treated on its own below let __at = char2nr("@") -let __sed_i = char2nr(" ") " ASCII: 32 -let __sed_last = 126 +let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 +if has("ebcdic") + let __sed_last = 255 +else + let __sed_last = 126 +endif let __sed_metacharacters = '$*.\^[~' while __sed_i <= __sed_last let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters) @@ -71,45 +72,36 @@ syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\ " (y) does not allow any flags. To save memory, I ignore this problem. syn match sedST "[sy]" nextgroup=sedRegexp\d\+ -if version >= 508 || !exists("did_sed_syntax_inits") - if version < 508 - let did_sed_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sedAddress Macro - HiLink sedACI NONE - HiLink sedBranch Label - HiLink sedComment Comment - HiLink sedDelete Function - HiLink sedError Error - HiLink sedFlag Type - HiLink sedFlagwrite Constant - HiLink sedFunction Function - HiLink sedLabel Label - HiLink sedLineCont Special - HiLink sedPutHoldspc Function - HiLink sedReplaceMeta Special - HiLink sedRegexpMeta Special - HiLink sedRW Constant - HiLink sedSemicolon Special - HiLink sedST Function - HiLink sedSpecial Special - HiLink sedWhitespace NONE - if exists("highlight_sedtabs") - HiLink sedTab Todo - endif - let __sed_i = char2nr(" ") " ASCII: 32 - while __sed_i <= __sed_last - exe "HiLink sedRegexp".__sed_i "Macro" - exe "HiLink sedReplacement".__sed_i "NONE" - let __sed_i = __sed_i + 1 - endwhile - delcommand HiLink +hi def link sedAddress Macro +hi def link sedACI NONE +hi def link sedBranch Label +hi def link sedComment Comment +hi def link sedDelete Function +hi def link sedError Error +hi def link sedFlag Type +hi def link sedFlagwrite Constant +hi def link sedFunction Function +hi def link sedLabel Label +hi def link sedLineCont Special +hi def link sedPutHoldspc Function +hi def link sedReplaceMeta Special +hi def link sedRegexpMeta Special +hi def link sedRW Constant +hi def link sedSemicolon Special +hi def link sedST Function +hi def link sedSpecial Special +hi def link sedWhitespace NONE +if exists("highlight_sedtabs") +hi def link sedTab Todo endif +let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 +while __sed_i <= __sed_last +exe "hi def link sedRegexp".__sed_i "Macro" +exe "hi def link sedReplacement".__sed_i "NONE" +let __sed_i = __sed_i + 1 +endwhile + unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim index 6cf9395fe9..2e07802047 100644 --- a/runtime/syntax/sendpr.vim +++ b/runtime/syntax/sendpr.vim @@ -5,11 +5,8 @@ " " http://raisdorf.net/files/misc/send-pr.vim -" 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 diff --git a/runtime/syntax/sgml.vim b/runtime/syntax/sgml.vim index c0c3643dd2..d60040c5d9 100644 --- a/runtime/syntax/sgml.vim +++ b/runtime/syntax/sgml.vim @@ -5,11 +5,8 @@ " Filenames: *.sgml,*.sgm " $Id: sgml.vim,v 1.1 2004/06/13 17:52:57 vimboss Exp $ -" 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 diff --git a/runtime/syntax/sgmldecl.vim b/runtime/syntax/sgmldecl.vim index 13551b21c1..6c1cde15ae 100644 --- a/runtime/syntax/sgmldecl.vim +++ b/runtime/syntax/sgmldecl.vim @@ -5,11 +5,8 @@ " You can modify and maintain this file, in other case send comments " the maintainer email address. -" 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 @@ -52,30 +49,20 @@ syn sync lines=250 " 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_sgmldecl_syntax_init") - if version < 508 - let did_sgmldecl_syntax_init = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sgmldeclDeclKeys Keyword - HiLink sgmldeclTypes Type - HiLink sgmldeclConst Constant - HiLink sgmldeclNConst Constant - HiLink sgmldeclString String - HiLink sgmldeclDeclBlock Normal - HiLink sgmldeclBool Boolean - HiLink sgmldeclSpecial Special - HiLink sgmldeclComment Comment - HiLink sgmldeclStatem Statement - HiLink sgmldeclVariables Type - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link sgmldeclDeclKeys Keyword +hi def link sgmldeclTypes Type +hi def link sgmldeclConst Constant +hi def link sgmldeclNConst Constant +hi def link sgmldeclString String +hi def link sgmldeclDeclBlock Normal +hi def link sgmldeclBool Boolean +hi def link sgmldeclSpecial Special +hi def link sgmldeclComment Comment +hi def link sgmldeclStatem Statement +hi def link sgmldeclVariables Type + let b:current_syntax = "sgmldecl" diff --git a/runtime/syntax/sgmllnx.vim b/runtime/syntax/sgmllnx.vim index 28224f601e..ccd78f494a 100644 --- a/runtime/syntax/sgmllnx.vim +++ b/runtime/syntax/sgmllnx.vim @@ -3,11 +3,8 @@ " Maintainer: SungHyun Nam <goweol@gmail.com> " Last Change: 2013 May 13 -" 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 @@ -36,31 +33,21 @@ syn region sgmllnxComment start=+<!--+ end=+-->+ syn region sgmllnxDocType start=+<!doctype+ end=+>+ " 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_sgmllnx_syn_inits") - if version < 508 - let did_sgmllnx_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link sgmllnxTag2 Function +hi def link sgmllnxTagN2 Function +hi def link sgmllnxTag Special +hi def link sgmllnxEndTag Special +hi def link sgmllnxParen Special +hi def link sgmllnxEntity Type +hi def link sgmllnxDocEnt Type +hi def link sgmllnxTagName Statement +hi def link sgmllnxComment Comment +hi def link sgmllnxSpecial Special +hi def link sgmllnxDocType PreProc +hi def link sgmllnxTagError Error - HiLink sgmllnxTag2 Function - HiLink sgmllnxTagN2 Function - HiLink sgmllnxTag Special - HiLink sgmllnxEndTag Special - HiLink sgmllnxParen Special - HiLink sgmllnxEntity Type - HiLink sgmllnxDocEnt Type - HiLink sgmllnxTagName Statement - HiLink sgmllnxComment Comment - HiLink sgmllnxSpecial Special - HiLink sgmllnxDocType PreProc - HiLink sgmllnxTagError Error - - delcommand HiLink -endif let b:current_syntax = "sgmllnx" diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 2fe13fbde6..6048aed4ec 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,17 +2,14 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Aug 23, 2016 -" Version: 161 +" Last Change: Aug 31, 2016 +" Version: 162 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) -" For version 5.x: Clear all syntax items {{{1 -" For version 6.x: Quit when a syntax file was already loaded -if v:version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded {{{1 +if exists("b:current_syntax") finish endif @@ -148,7 +145,7 @@ syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr -syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo,shParen +syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator @@ -384,7 +381,7 @@ ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \ " Here Strings: {{{1 " ============= -" available for: bash; ksh (really should be ksh93 only) but not if its a posix +" available for: bash; ksh (really should be ksh93 only) but not if it's a posix if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix")) syn match shHereString "<<<" skipwhite nextgroup=shCmdParenRegion endif @@ -576,132 +573,134 @@ syn sync match shWhileSync grouphere shRepeat "\<while\>" " Default Highlighting: {{{1 " ===================== -hi def link shArithRegion shShellVariables -hi def link shAstQuote shDoubleQuote -hi def link shAtExpr shSetList -hi def link shBeginHere shRedir -hi def link shCaseBar shConditional -hi def link shCaseCommandSub shCommandSub -hi def link shCaseDoubleQuote shDoubleQuote -hi def link shCaseIn shConditional -hi def link shQuote shOperator -hi def link shCaseSingleQuote shSingleQuote -hi def link shCaseStart shConditional -hi def link shCmdSubRegion shShellVariables -hi def link shColon shComment -hi def link shDerefOp shOperator -hi def link shDerefPOL shDerefOp -hi def link shDerefPPS shDerefOp -hi def link shDerefPSR shDerefOp -hi def link shDeref shShellVariables -hi def link shDerefDelim shOperator -hi def link shDerefSimple shDeref -hi def link shDerefSpecial shDeref -hi def link shDerefString shDoubleQuote -hi def link shDerefVar shDeref -hi def link shDoubleQuote shString -hi def link shEcho shString -hi def link shEchoDelim shOperator -hi def link shEchoQuote shString -hi def link shForPP shLoop -hi def link shFunction Function -hi def link shEmbeddedEcho shString -hi def link shEscape shCommandSub -hi def link shExDoubleQuote shDoubleQuote -hi def link shExSingleQuote shSingleQuote -hi def link shHereDoc shString -hi def link shHereString shRedir -hi def link shHerePayload shHereDoc -hi def link shLoop shStatement -hi def link shSpecialNxt shSpecial -hi def link shNoQuote shDoubleQuote -hi def link shOption shCommandSub -hi def link shPattern shString -hi def link shParen shArithmetic -hi def link shPosnParm shShellVariables -hi def link shQuickComment shComment -hi def link shRange shOperator -hi def link shRedir shOperator -hi def link shSetListDelim shOperator -hi def link shSetOption shOption -hi def link shSingleQuote shString -hi def link shSource shOperator -hi def link shStringSpecial shSpecial -hi def link shSubShRegion shOperator -hi def link shTestOpr shConditional -hi def link shTestPattern shString -hi def link shTestDoubleQuote shString -hi def link shTestSingleQuote shString -hi def link shTouchCmd shStatement -hi def link shVariable shSetList -hi def link shWrapLineOperator shOperator +if !exists("skip_sh_syntax_inits") + hi def link shArithRegion shShellVariables + hi def link shAstQuote shDoubleQuote + hi def link shAtExpr shSetList + hi def link shBeginHere shRedir + hi def link shCaseBar shConditional + hi def link shCaseCommandSub shCommandSub + hi def link shCaseDoubleQuote shDoubleQuote + hi def link shCaseIn shConditional + hi def link shQuote shOperator + hi def link shCaseSingleQuote shSingleQuote + hi def link shCaseStart shConditional + hi def link shCmdSubRegion shShellVariables + hi def link shColon shComment + hi def link shDerefOp shOperator + hi def link shDerefPOL shDerefOp + hi def link shDerefPPS shDerefOp + hi def link shDerefPSR shDerefOp + hi def link shDeref shShellVariables + hi def link shDerefDelim shOperator + hi def link shDerefSimple shDeref + hi def link shDerefSpecial shDeref + hi def link shDerefString shDoubleQuote + hi def link shDerefVar shDeref + hi def link shDoubleQuote shString + hi def link shEcho shString + hi def link shEchoDelim shOperator + hi def link shEchoQuote shString + hi def link shForPP shLoop + hi def link shFunction Function + hi def link shEmbeddedEcho shString + hi def link shEscape shCommandSub + hi def link shExDoubleQuote shDoubleQuote + hi def link shExSingleQuote shSingleQuote + hi def link shHereDoc shString + hi def link shHereString shRedir + hi def link shHerePayload shHereDoc + hi def link shLoop shStatement + hi def link shSpecialNxt shSpecial + hi def link shNoQuote shDoubleQuote + hi def link shOption shCommandSub + hi def link shPattern shString + hi def link shParen shArithmetic + hi def link shPosnParm shShellVariables + hi def link shQuickComment shComment + hi def link shRange shOperator + hi def link shRedir shOperator + hi def link shSetListDelim shOperator + hi def link shSetOption shOption + hi def link shSingleQuote shString + hi def link shSource shOperator + hi def link shStringSpecial shSpecial + hi def link shSubShRegion shOperator + hi def link shTestOpr shConditional + hi def link shTestPattern shString + hi def link shTestDoubleQuote shString + hi def link shTestSingleQuote shString + hi def link shTouchCmd shStatement + hi def link shVariable shSetList + hi def link shWrapLineOperator shOperator -if exists("b:is_bash") - hi def link bashAdminStatement shStatement - hi def link bashSpecialVariables shShellVariables - hi def link bashStatement shStatement - hi def link shCharClass shSpecial - hi def link shDerefOff shDerefOp - hi def link shDerefLen shDerefOff -endif -if exists("b:is_kornshell") - hi def link kshSpecialVariables shShellVariables - hi def link kshStatement shStatement -endif - -if !exists("g:sh_no_error") - hi def link shCaseError Error - hi def link shCondError Error - hi def link shCurlyError Error - hi def link shDerefOpError Error - hi def link shDerefWordError Error - hi def link shDoError Error - hi def link shEsacError Error - hi def link shIfError Error - hi def link shInError Error - hi def link shParenError Error - hi def link shTestError Error + if exists("b:is_bash") + hi def link bashAdminStatement shStatement + hi def link bashSpecialVariables shShellVariables + hi def link bashStatement shStatement + hi def link shCharClass shSpecial + hi def link shDerefOff shDerefOp + hi def link shDerefLen shDerefOff + endif if exists("b:is_kornshell") - hi def link shDTestError Error + hi def link kshSpecialVariables shShellVariables + hi def link kshStatement shStatement + endif + + if !exists("g:sh_no_error") + hi def link shCaseError Error + hi def link shCondError Error + hi def link shCurlyError Error + hi def link shDerefOpError Error + hi def link shDerefWordError Error + hi def link shDoError Error + hi def link shEsacError Error + hi def link shIfError Error + hi def link shInError Error + hi def link shParenError Error + hi def link shTestError Error + if exists("b:is_kornshell") + hi def link shDTestError Error + endif endif -endif -hi def link shArithmetic Special -hi def link shCharClass Identifier -hi def link shSnglCase Statement -hi def link shCommandSub Special -hi def link shComment Comment -hi def link shConditional Conditional -hi def link shCtrlSeq Special -hi def link shExprRegion Delimiter -hi def link shFunctionKey Function -hi def link shFunctionName Function -hi def link shNumber Number -hi def link shOperator Operator -hi def link shRepeat Repeat -hi def link shSet Statement -hi def link shSetList Identifier -hi def link shShellVariables PreProc -hi def link shSpecial Special -hi def link shStatement Statement -hi def link shString String -hi def link shTodo Todo -hi def link shAlias Identifier -hi def link shHereDoc01 shRedir -hi def link shHereDoc02 shRedir -hi def link shHereDoc03 shRedir -hi def link shHereDoc04 shRedir -hi def link shHereDoc05 shRedir -hi def link shHereDoc06 shRedir -hi def link shHereDoc07 shRedir -hi def link shHereDoc08 shRedir -hi def link shHereDoc09 shRedir -hi def link shHereDoc10 shRedir -hi def link shHereDoc11 shRedir -hi def link shHereDoc12 shRedir -hi def link shHereDoc13 shRedir -hi def link shHereDoc14 shRedir -hi def link shHereDoc15 shRedir + hi def link shArithmetic Special + hi def link shCharClass Identifier + hi def link shSnglCase Statement + hi def link shCommandSub Special + hi def link shComment Comment + hi def link shConditional Conditional + hi def link shCtrlSeq Special + hi def link shExprRegion Delimiter + hi def link shFunctionKey Function + hi def link shFunctionName Function + hi def link shNumber Number + hi def link shOperator Operator + hi def link shRepeat Repeat + hi def link shSet Statement + hi def link shSetList Identifier + hi def link shShellVariables PreProc + hi def link shSpecial Special + hi def link shStatement Statement + hi def link shString String + hi def link shTodo Todo + hi def link shAlias Identifier + hi def link shHereDoc01 shRedir + hi def link shHereDoc02 shRedir + hi def link shHereDoc03 shRedir + hi def link shHereDoc04 shRedir + hi def link shHereDoc05 shRedir + hi def link shHereDoc06 shRedir + hi def link shHereDoc07 shRedir + hi def link shHereDoc08 shRedir + hi def link shHereDoc09 shRedir + hi def link shHereDoc10 shRedir + hi def link shHereDoc11 shRedir + hi def link shHereDoc12 shRedir + hi def link shHereDoc13 shRedir + hi def link shHereDoc14 shRedir + hi def link shHereDoc15 shRedir +endif " Delete shell folding commands {{{1 " ============================= diff --git a/runtime/syntax/sicad.vim b/runtime/syntax/sicad.vim index 7e32451bed..20eb14cba1 100644 --- a/runtime/syntax/sicad.vim +++ b/runtime/syntax/sicad.vim @@ -4,28 +4,17 @@ " Last Change: 2003 May 11 " URL: http://lmark.mgx.hu:81/download/vim/sicad.vim -" 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 " use SQL highlighting after 'sql' command -if version >= 600 - syn include @SQL syntax/sql.vim -else - syn include @SQL <sfile>:p:h/sql.vim -endif +syn include @SQL syntax/sql.vim unlet b:current_syntax " spaces are used in (auto)indents since sicad hates tabulator characters -if version >= 600 - setlocal expandtab -else - set expandtab -endif +setlocal expandtab " ignore case syn case ignore @@ -369,44 +358,32 @@ syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn syn keyword sicadStatement zparp zparpn zwinkp zwinkpn " 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_sicad_syntax_inits") - - if version < 508 - let did_sicad_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink sicadLabel PreProc - HiLink sicadLabel1 sicadLabel - HiLink sicadLabel2 sicadLabel - HiLink sicadConditional Conditional - HiLink sicadBoolean Boolean - HiLink sicadNumber Number - HiLink sicadFloat Float - HiLink sicadOperator Operator - HiLink sicadStatement Statement - HiLink sicadParameter sicadStatement - HiLink sicadGoto sicadStatement - HiLink sicadLineCont sicadStatement - HiLink sicadString String - HiLink sicadComment Comment - HiLink sicadSpecial Special - HiLink sicadIdentifier Type -" HiLink sicadIdentifier Identifier - HiLink sicadError Error - HiLink sicadParenError sicadError - HiLink sicadApostropheError sicadError - HiLink sicadStringError sicadError - HiLink sicadCommentError sicadError -" HiLink sqlStatement Special " modified highlight group in sql.vim +hi def link sicadLabel PreProc +hi def link sicadLabel1 sicadLabel +hi def link sicadLabel2 sicadLabel +hi def link sicadConditional Conditional +hi def link sicadBoolean Boolean +hi def link sicadNumber Number +hi def link sicadFloat Float +hi def link sicadOperator Operator +hi def link sicadStatement Statement +hi def link sicadParameter sicadStatement +hi def link sicadGoto sicadStatement +hi def link sicadLineCont sicadStatement +hi def link sicadString String +hi def link sicadComment Comment +hi def link sicadSpecial Special +hi def link sicadIdentifier Type +" hi def link sicadIdentifier Identifier +hi def link sicadError Error +hi def link sicadParenError sicadError +hi def link sicadApostropheError sicadError +hi def link sicadStringError sicadError +hi def link sicadCommentError sicadError +" hi def link sqlStatement Special " modified highlight group in sql.vim - delcommand HiLink - -endif let b:current_syntax = "sicad" diff --git a/runtime/syntax/simula.vim b/runtime/syntax/simula.vim index e952ee26c3..82f66d049e 100644 --- a/runtime/syntax/simula.vim +++ b/runtime/syntax/simula.vim @@ -4,11 +4,8 @@ " URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim " Last Change: 2001 May 15 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -58,42 +55,33 @@ syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" " Real starting with a `.', optional exponent syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" -if version >= 508 || !exists("did_simula_syntax_inits") - if version < 508 - let did_simula_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink simulaAssigned Identifier - HiLink simulaBoolean Boolean - HiLink simulaCharacter Character - HiLink simulaCharError Error - HiLink simulaComment Comment - HiLink simulaCompound Statement - HiLink simulaConditional Conditional - HiLink simulaConstant Constant - HiLink simulaFunction Function - HiLink simulaNumber Number - HiLink simulaOperator Operator - HiLink simulaReal Float - HiLink simulaReferenceType Type - HiLink simulaRepeat Repeat - HiLink simulaReserved Error - HiLink simulaSemicolon Statement - HiLink simulaSpecial Special - HiLink simulaSpecialChar SpecialChar - HiLink simulaSpecialCharErr Error - HiLink simulaStatement Statement - HiLink simulaStorageClass StorageClass - HiLink simulaString String - HiLink simulaStructure Structure - HiLink simulaTodo Todo - HiLink simulaType Type +hi def link simulaAssigned Identifier +hi def link simulaBoolean Boolean +hi def link simulaCharacter Character +hi def link simulaCharError Error +hi def link simulaComment Comment +hi def link simulaCompound Statement +hi def link simulaConditional Conditional +hi def link simulaConstant Constant +hi def link simulaFunction Function +hi def link simulaNumber Number +hi def link simulaOperator Operator +hi def link simulaReal Float +hi def link simulaReferenceType Type +hi def link simulaRepeat Repeat +hi def link simulaReserved Error +hi def link simulaSemicolon Statement +hi def link simulaSpecial Special +hi def link simulaSpecialChar SpecialChar +hi def link simulaSpecialCharErr Error +hi def link simulaStatement Statement +hi def link simulaStorageClass StorageClass +hi def link simulaString String +hi def link simulaStructure Structure +hi def link simulaTodo Todo +hi def link simulaType Type - delcommand HiLink -endif let b:current_syntax = "simula" " vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/sinda.vim b/runtime/syntax/sinda.vim index 2bde267c2f..a6e5b45fcd 100644 --- a/runtime/syntax/sinda.vim +++ b/runtime/syntax/sinda.vim @@ -8,11 +8,8 @@ -" 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 @@ -32,11 +29,7 @@ syn case ignore let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -106,39 +99,29 @@ endif " 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_sinda_syntax_inits") - if version < 508 - let did_sinda_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sindaMacro Macro - HiLink sindaOptions Special - HiLink sindaRoutine Type - HiLink sindaControl Special - HiLink sindaSubRoutine Function - HiLink sindaIdentifier Identifier - - HiLink sindaFortran PreProc - HiLink sindaMotran PreProc - - HiLink sindaComment Comment - HiLink sindaHeader Typedef - HiLink sindaIncludeFile Type - HiLink sindaInteger Number - HiLink sindaFloat Float - HiLink sindaScientific Float - - HiLink sindaEndData Macro - - HiLink sindaTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link sindaMacro Macro +hi def link sindaOptions Special +hi def link sindaRoutine Type +hi def link sindaControl Special +hi def link sindaSubRoutine Function +hi def link sindaIdentifier Identifier + +hi def link sindaFortran PreProc +hi def link sindaMotran PreProc + +hi def link sindaComment Comment +hi def link sindaHeader Typedef +hi def link sindaIncludeFile Type +hi def link sindaInteger Number +hi def link sindaFloat Float +hi def link sindaScientific Float + +hi def link sindaEndData Macro + +hi def link sindaTodo Todo + let b:current_syntax = "sinda" diff --git a/runtime/syntax/sindacmp.vim b/runtime/syntax/sindacmp.vim index 87b483409a..88373eb285 100644 --- a/runtime/syntax/sindacmp.vim +++ b/runtime/syntax/sindacmp.vim @@ -8,11 +8,8 @@ -" 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 @@ -45,28 +42,18 @@ syn match sindacmpFloat "-\=\<[0-9]*\.[0-9]*" " 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_sindacmp_syntax_inits") - if version < 508 - let did_sindacmp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink sindacmpTitle Type - HiLink sindacmpUnit PreProc +hi def link sindacmpTitle Type +hi def link sindacmpUnit PreProc - HiLink sindacmpLabel Statement +hi def link sindacmpLabel Statement - HiLink sindacmpHeader sindaHeader +hi def link sindacmpHeader sindaHeader - HiLink sindacmpInteger Number - HiLink sindacmpFloat Special +hi def link sindacmpInteger Number +hi def link sindacmpFloat Special - delcommand HiLink -endif let b:current_syntax = "sindacmp" diff --git a/runtime/syntax/sindaout.vim b/runtime/syntax/sindaout.vim index b557e017eb..c362f19467 100644 --- a/runtime/syntax/sindaout.vim +++ b/runtime/syntax/sindaout.vim @@ -8,11 +8,8 @@ -" 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 @@ -24,11 +21,7 @@ syn case match " Load SINDA syntax file -if version < 600 - source <sfile>:p:h/sinda.vim -else - runtime! syntax/sinda.vim -endif +runtime! syntax/sinda.vim unlet b:current_syntax @@ -66,33 +59,23 @@ syn match sindaoutError "<<< Error >>>" " 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_sindaout_syntax_inits") - if version < 508 - let did_sindaout_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green - - HiLink sindaoutPos Statement - HiLink sindaoutNeg PreProc - HiLink sindaoutTitle Type - HiLink sindaoutFile sindaIncludeFile - HiLink sindaoutInteger sindaInteger - - HiLink sindaoutSectionDelim Delimiter - HiLink sindaoutSectionTitle Exception - HiLink sindaoutHeaderDelim SpecialComment - HiLink sindaoutLabel Identifier - - HiLink sindaoutError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green + +hi def link sindaoutPos Statement +hi def link sindaoutNeg PreProc +hi def link sindaoutTitle Type +hi def link sindaoutFile sindaIncludeFile +hi def link sindaoutInteger sindaInteger + +hi def link sindaoutSectionDelim Delimiter +hi def link sindaoutSectionTitle Exception +hi def link sindaoutHeaderDelim SpecialComment +hi def link sindaoutLabel Identifier + +hi def link sindaoutError Error + let b:current_syntax = "sindaout" diff --git a/runtime/syntax/sisu.vim b/runtime/syntax/sisu.vim index 0e0f2dbe0a..83d2a17245 100644 --- a/runtime/syntax/sisu.vim +++ b/runtime/syntax/sisu.vim @@ -6,11 +6,9 @@ " <http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob_plain;f=data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim;hb=HEAD> "(originally looked at Ruby Vim by Mirko Nasato) -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish -else endif let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/syntax/skill.vim b/runtime/syntax/skill.vim index 8b960441f6..47afffc0a9 100644 --- a/runtime/syntax/skill.vim +++ b/runtime/syntax/skill.vim @@ -9,11 +9,8 @@ " database. This file also defines syntax highlighting for " certain Design Framework II interface functions. -" 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 @@ -525,37 +522,27 @@ syn match skillCommentError "\*/" syn sync ccomment skillComment minlines=10 " 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_skill_syntax_inits") - if version < 508 - let did_skill_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink skillcdfFunctions Function - HiLink skillgeFunctions Function - HiLink skillhiFunctions Function - HiLink skillleFunctions Function - HiLink skilldbefFunctions Function - HiLink skillddFunctions Function - HiLink skillpcFunctions Function - HiLink skilltechFunctions Function - HiLink skillConstants Constant - HiLink skillFunction Function - HiLink skillKeywords Statement - HiLink skillConditional Conditional - HiLink skillRepeat Repeat - HiLink skillString String - HiLink skillTodo Todo - HiLink skillNote Todo - HiLink skillComment Comment - HiLink skillCommentError Error +hi def link skillcdfFunctions Function +hi def link skillgeFunctions Function +hi def link skillhiFunctions Function +hi def link skillleFunctions Function +hi def link skilldbefFunctions Function +hi def link skillddFunctions Function +hi def link skillpcFunctions Function +hi def link skilltechFunctions Function +hi def link skillConstants Constant +hi def link skillFunction Function +hi def link skillKeywords Statement +hi def link skillConditional Conditional +hi def link skillRepeat Repeat +hi def link skillString String +hi def link skillTodo Todo +hi def link skillNote Todo +hi def link skillComment Comment +hi def link skillCommentError Error - delcommand HiLink -endif let b:current_syntax = "skill" diff --git a/runtime/syntax/sl.vim b/runtime/syntax/sl.vim index fa3bca06dd..1f6c847353 100644 --- a/runtime/syntax/sl.vim +++ b/runtime/syntax/sl.vim @@ -3,11 +3,8 @@ " Maintainer: Dan Piponi <dan@tanelorn.demon.co.uk> " Last Change: 2001 May 09 -" 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 @@ -75,45 +72,35 @@ syn keyword slVariable dtime dPdtime syn sync ccomment slComment minlines=10 " 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_sl_syntax_inits") - if version < 508 - let did_sl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink slLabel Label - HiLink slUserLabel Label - HiLink slConditional Conditional - HiLink slRepeat Repeat - HiLink slCharacter Character - HiLink slSpecialCharacter slSpecial - HiLink slNumber Number - HiLink slFloat Float - HiLink slParenError slError - HiLink slInParen slError - HiLink slCommentError slError - HiLink slOperator Operator - HiLink slStorageClass StorageClass - HiLink slError Error - HiLink slStatement Statement - HiLink slType Type - HiLink slCommentError slError - HiLink slCommentString slString - HiLink slComment2String slString - HiLink slCommentSkip slComment - HiLink slString String - HiLink slComment Comment - HiLink slSpecial SpecialChar - HiLink slTodo Todo - HiLink slVariable Identifier - "HiLink slIdentifier Identifier +hi def link slLabel Label +hi def link slUserLabel Label +hi def link slConditional Conditional +hi def link slRepeat Repeat +hi def link slCharacter Character +hi def link slSpecialCharacter slSpecial +hi def link slNumber Number +hi def link slFloat Float +hi def link slParenError slError +hi def link slInParen slError +hi def link slCommentError slError +hi def link slOperator Operator +hi def link slStorageClass StorageClass +hi def link slError Error +hi def link slStatement Statement +hi def link slType Type +hi def link slCommentError slError +hi def link slCommentString slString +hi def link slComment2String slString +hi def link slCommentSkip slComment +hi def link slString String +hi def link slComment Comment +hi def link slSpecial SpecialChar +hi def link slTodo Todo +hi def link slVariable Identifier +"hi def link slIdentifier Identifier - delcommand HiLink -endif let b:current_syntax = "sl" diff --git a/runtime/syntax/slang.vim b/runtime/syntax/slang.vim index 9fa89b4d61..53ede4dc5a 100644 --- a/runtime/syntax/slang.vim +++ b/runtime/syntax/slang.vim @@ -3,11 +3,8 @@ " Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu> " Last Change: 980216 -" 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 @@ -55,47 +52,37 @@ syn keyword slangOperator sizeof syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber " 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_slang_syntax_inits") - if version < 508 - let did_slang_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink slangDefinition Type - HiLink slangBlock slangDefinition - HiLink slangLabel Label - HiLink slangConditional Conditional - HiLink slangRepeat Repeat - HiLink slangCharacter Character - HiLink slangFloat Float - HiLink slangImaginary Float - HiLink slangDecimal slangNumber - HiLink slangOctal slangNumber - HiLink slangHex slangNumber - HiLink slangNumber Number - HiLink slangParenError Error - HiLink slangOctalError Error - HiLink slangOperator Operator - HiLink slangStructure Structure - HiLink slangInclude Include - HiLink slangPreCondit PreCondit - HiLink slangError Error - HiLink slangStatement Statement - HiLink slangType Type - HiLink slangString String - HiLink slangConstant Constant - HiLink slangRangeArray slangConstant - HiLink slangComment Comment - HiLink slangSpecial SpecialChar - HiLink slangTodo Todo - HiLink slangDelim Delimiter +hi def link slangDefinition Type +hi def link slangBlock slangDefinition +hi def link slangLabel Label +hi def link slangConditional Conditional +hi def link slangRepeat Repeat +hi def link slangCharacter Character +hi def link slangFloat Float +hi def link slangImaginary Float +hi def link slangDecimal slangNumber +hi def link slangOctal slangNumber +hi def link slangHex slangNumber +hi def link slangNumber Number +hi def link slangParenError Error +hi def link slangOctalError Error +hi def link slangOperator Operator +hi def link slangStructure Structure +hi def link slangInclude Include +hi def link slangPreCondit PreCondit +hi def link slangError Error +hi def link slangStatement Statement +hi def link slangType Type +hi def link slangString String +hi def link slangConstant Constant +hi def link slangRangeArray slangConstant +hi def link slangComment Comment +hi def link slangSpecial SpecialChar +hi def link slangTodo Todo +hi def link slangDelim Delimiter - delcommand HiLink -endif let b:current_syntax = "slang" diff --git a/runtime/syntax/slice.vim b/runtime/syntax/slice.vim index 4e2f9a8604..3a57ece913 100644 --- a/runtime/syntax/slice.vim +++ b/runtime/syntax/slice.vim @@ -3,11 +3,8 @@ " Maintainer: Morel Bodin <slice06@nym.hush.com> " Last Change: 2005 Dec 03 -" 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 @@ -58,33 +55,23 @@ syn match sliceComment "//.*" syn sync ccomment sliceComment " 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_slice_syn_inits") - if version < 508 - let did_slice_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink sliceComment Comment - HiLink sliceConstruct Keyword - HiLink sliceType Type - HiLink sliceString String - HiLink sliceIncluded String - HiLink sliceQualifier Keyword - HiLink sliceInclude Include - HiLink sliceGuard PreProc - HiLink sliceBoolean Boolean - HiLink sliceFloat Number - HiLink sliceNumber Number - HiLink sliceOctal Number - HiLink sliceOctalZero Special - HiLink sliceNumberError Special +hi def link sliceComment Comment +hi def link sliceConstruct Keyword +hi def link sliceType Type +hi def link sliceString String +hi def link sliceIncluded String +hi def link sliceQualifier Keyword +hi def link sliceInclude Include +hi def link sliceGuard PreProc +hi def link sliceBoolean Boolean +hi def link sliceFloat Number +hi def link sliceNumber Number +hi def link sliceOctal Number +hi def link sliceOctalZero Special +hi def link sliceNumberError Special - delcommand HiLink -endif let b:current_syntax = "slice" diff --git a/runtime/syntax/slrnrc.vim b/runtime/syntax/slrnrc.vim index 038b62e166..cf0734ae85 100644 --- a/runtime/syntax/slrnrc.vim +++ b/runtime/syntax/slrnrc.vim @@ -3,11 +3,8 @@ " Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Last Change: 23 April 2006 -" 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 @@ -150,44 +147,34 @@ syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrn syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= " 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_slrnrc_syntax_inits") - if version < 508 - let did_slrnrc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink slrnrcTodo Todo - HiLink slrnrcSpaceError Error - HiLink slrnrcNumber Number - HiLink slrnrcSpecKey SpecialChar - HiLink slrnrcKey String - HiLink slrnrcSpecChar SpecialChar - HiLink slrnrcString String - HiLink slrnSlangPreCondit Special - HiLink slrnrcComment Comment - HiLink slrnrcVarInt Identifier - HiLink slrnrcVarStr Identifier - HiLink slrnrcCmd slrnrcSet - HiLink slrnrcSet Operator - HiLink slrnrcColor Keyword - HiLink slrnrcColorObj Identifier - HiLink slrnrcColorVal String - HiLink slrnrcMono Keyword - HiLink slrnrcMonoObj Identifier - HiLink slrnrcMonoVal String - HiLink slrnrcFunArt Macro - HiLink slrnrcFunGroup Macro - HiLink slrnrcFunRead Macro - HiLink slrnrcSetkeyObj Identifier - HiLink slrnrcSetkey Keyword - HiLink slrnrcUnsetkey slrnrcSetkey - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link slrnrcTodo Todo +hi def link slrnrcSpaceError Error +hi def link slrnrcNumber Number +hi def link slrnrcSpecKey SpecialChar +hi def link slrnrcKey String +hi def link slrnrcSpecChar SpecialChar +hi def link slrnrcString String +hi def link slrnSlangPreCondit Special +hi def link slrnrcComment Comment +hi def link slrnrcVarInt Identifier +hi def link slrnrcVarStr Identifier +hi def link slrnrcCmd slrnrcSet +hi def link slrnrcSet Operator +hi def link slrnrcColor Keyword +hi def link slrnrcColorObj Identifier +hi def link slrnrcColorVal String +hi def link slrnrcMono Keyword +hi def link slrnrcMonoObj Identifier +hi def link slrnrcMonoVal String +hi def link slrnrcFunArt Macro +hi def link slrnrcFunGroup Macro +hi def link slrnrcFunRead Macro +hi def link slrnrcSetkeyObj Identifier +hi def link slrnrcSetkey Keyword +hi def link slrnrcUnsetkey slrnrcSetkey + let b:current_syntax = "slrnrc" diff --git a/runtime/syntax/slrnsc.vim b/runtime/syntax/slrnsc.vim index 838af6ad1c..9f51cad380 100644 --- a/runtime/syntax/slrnsc.vim +++ b/runtime/syntax/slrnsc.vim @@ -3,20 +3,13 @@ " Maintainer: Preben 'Peppe' Guldberg <peppe@wielders.org> " Last Change: 8 Oct 2004 -" 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 " characters in newsgroup names -if version < 600 - set isk=@,48-57,.,-,_,+ -else - setlocal isk=@,48-57,.,-,_,+ -endif +setlocal isk=@,48-57,.,-,_,+ syn match slrnscComment "%.*$" syn match slrnscSectionCom ".].*"lc=2 @@ -51,34 +44,24 @@ syn match slrnscScoreIdent contained "%.*" syn match slrnScoreLine "^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent " 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_slrnsc_syntax_inits") - if version < 508 - let did_slrnsc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink slrnscComment Comment - HiLink slrnscSectionCom slrnscComment - HiLink slrnscGroup String - HiLink slrnscNumber Number - HiLink slrnscDate Special - HiLink slrnscDelim Delimiter - HiLink slrnscComma SpecialChar - HiLink slrnscOper SpecialChar - HiLink slrnscEsc String - HiLink slrnscSectionStd Type - HiLink slrnscSectionNot Delimiter - HiLink slrnscItem Statement - HiLink slrnscScore Keyword - HiLink slrnscScoreIdent Identifier - HiLink slrnscInclude Keyword +hi def link slrnscComment Comment +hi def link slrnscSectionCom slrnscComment +hi def link slrnscGroup String +hi def link slrnscNumber Number +hi def link slrnscDate Special +hi def link slrnscDelim Delimiter +hi def link slrnscComma SpecialChar +hi def link slrnscOper SpecialChar +hi def link slrnscEsc String +hi def link slrnscSectionStd Type +hi def link slrnscSectionNot Delimiter +hi def link slrnscItem Statement +hi def link slrnscScore Keyword +hi def link slrnscScoreIdent Identifier +hi def link slrnscInclude Keyword - delcommand HiLink -endif let b:current_syntax = "slrnsc" diff --git a/runtime/syntax/sm.vim b/runtime/syntax/sm.vim index 8fdc14b71a..cb01d44bb6 100644 --- a/runtime/syntax/sm.vim +++ b/runtime/syntax/sm.vim @@ -56,36 +56,26 @@ syn match smClauseCont contained "^\t" syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont " 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_smil_syntax_inits") - if version < 508 - let did_smil_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smClause Special - HiLink smClauseError Error - HiLink smComment Comment - HiLink smDefine Statement - HiLink smElse Delimiter - HiLink smHeader Statement - HiLink smHeaderSep String - HiLink smMesg Special - HiLink smPrecedence Number - HiLink smRewrite Statement - HiLink smRewriteComment Comment - HiLink smRewriteLhsToken String - HiLink smRewriteLhsUser Statement - HiLink smRewriteRhsToken String - HiLink smRuleset Preproc - HiLink smTrusted Special - HiLink smVar String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link smClause Special +hi def link smClauseError Error +hi def link smComment Comment +hi def link smDefine Statement +hi def link smElse Delimiter +hi def link smHeader Statement +hi def link smHeaderSep String +hi def link smMesg Special +hi def link smPrecedence Number +hi def link smRewrite Statement +hi def link smRewriteComment Comment +hi def link smRewriteLhsToken String +hi def link smRewriteLhsUser Statement +hi def link smRewriteRhsToken String +hi def link smRuleset Preproc +hi def link smTrusted Special +hi def link smVar String + let b:current_syntax = "sm" diff --git a/runtime/syntax/smarty.vim b/runtime/syntax/smarty.vim index 6dda366ba2..a39c290abe 100644 --- a/runtime/syntax/smarty.vim +++ b/runtime/syntax/smarty.vim @@ -8,11 +8,10 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish -endif + " quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif let main_syntax = 'smarty' endif @@ -57,25 +56,16 @@ syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,ja syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc,smartyZone -if version >= 508 || !exists("did_smarty_syn_inits") - if version < 508 - let did_smarty_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink smartyTagName Identifier - HiLink smartyProperty Constant - " if you want the text inside the braces to be colored, then - " remove the comment in from of the next statement - "HiLink smartyZone Include - HiLink smartyInFunc Function - HiLink smartyBlock Constant - HiLink smartyDot SpecialChar - HiLink smartyModifier Function - delcommand HiLink -endif +hi def link smartyTagName Identifier +hi def link smartyProperty Constant +" if you want the text inside the braces to be colored, then +" remove the comment in from of the next statement +"hi def link smartyZone Include +hi def link smartyInFunc Function +hi def link smartyBlock Constant +hi def link smartyDot SpecialChar +hi def link smartyModifier Function let b:current_syntax = "smarty" diff --git a/runtime/syntax/smcl.vim b/runtime/syntax/smcl.vim index d9afba6de5..a5baa47e96 100644 --- a/runtime/syntax/smcl.vim +++ b/runtime/syntax/smcl.vim @@ -10,9 +10,8 @@ " check for 'b:current_syntax', removed 'did_smcl_syntax_inits' " 26apr2006 changed 'stata_smcl' to 'smcl' -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 diff --git a/runtime/syntax/smil.vim b/runtime/syntax/smil.vim index 6b5a002868..4cf6e84710 100644 --- a/runtime/syntax/smil.vim +++ b/runtime/syntax/smil.vim @@ -7,11 +7,8 @@ " To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ " and to http://www.helio.org/products/smil/tutorial/ -" 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 @@ -115,38 +112,28 @@ endif syn region smilComment start=+<!DOCTYPE+ keepend end=+>+ " 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_smil_syntax_inits") - if version < 508 - let did_smil_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smilTag Function - HiLink smilEndTag Identifier - HiLink smilArg Type - HiLink smilTagName smilStatement - HiLink smilSpecialTagName Exception - HiLink smilValue Value - HiLink smilSpecialChar Special - - HiLink smilSpecial Special - HiLink smilSpecialChar Special - HiLink smilString String - HiLink smilStatement Statement - HiLink smilComment Comment - HiLink smilCommentPart Comment - HiLink smilPreProc PreProc - HiLink smilValue String - HiLink smilCommentError smilError - HiLink smilTagError smilError - HiLink smilError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link smilTag Function +hi def link smilEndTag Identifier +hi def link smilArg Type +hi def link smilTagName smilStatement +hi def link smilSpecialTagName Exception +hi def link smilValue Value +hi def link smilSpecialChar Special + +hi def link smilSpecial Special +hi def link smilSpecialChar Special +hi def link smilString String +hi def link smilStatement Statement +hi def link smilComment Comment +hi def link smilCommentPart Comment +hi def link smilPreProc PreProc +hi def link smilValue String +hi def link smilCommentError smilError +hi def link smilTagError smilError +hi def link smilError Error + let b:current_syntax = "smil" diff --git a/runtime/syntax/smith.vim b/runtime/syntax/smith.vim index e05ce69683..b045d3b963 100644 --- a/runtime/syntax/smith.vim +++ b/runtime/syntax/smith.vim @@ -3,11 +3,8 @@ " Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> " Last Change: 21.07.2000 -" 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 @@ -28,24 +25,14 @@ syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ syn case match " 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_smith_syntax_inits") - if version < 508 - let did_smith_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smithRegister Identifier - HiLink smithKeyword Keyword - HiLink smithComment Comment - HiLink smithString String - HiLink smithNumber Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link smithRegister Identifier +hi def link smithKeyword Keyword +hi def link smithComment Comment +hi def link smithString String +hi def link smithNumber Number + let b:current_syntax = "smith" diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim index aa7d64a33a..fa4524f93d 100644 --- a/runtime/syntax/sml.vim +++ b/runtime/syntax/sml.vim @@ -8,11 +8,8 @@ " 2002 Jun 02 - Fixed small typo (MM) " 2001 Nov 20 - Fixed small highlighting bug with modules (MM) -" 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 @@ -168,62 +165,52 @@ syn sync match smlSigSync grouphere smlSig "\<sig\>" syn sync match smlSigSync groupthere smlSig "\<end\>" " 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_sml_syntax_inits") - if version < 508 - let did_sml_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink smlBraceErr Error - HiLink smlBrackErr Error - HiLink smlParenErr Error - - HiLink smlCommentErr Error - - HiLink smlEndErr Error - HiLink smlThenErr Error - - HiLink smlCharErr Error - - HiLink smlComment Comment - - HiLink smlModPath Include - HiLink smlModule Include - HiLink smlModParam1 Include - HiLink smlModType Include - HiLink smlMPRestr3 Include - HiLink smlFullMod Include - HiLink smlModTypeRestr Include - HiLink smlWith Include - HiLink smlMTDef Include - - HiLink smlConstructor Constant - - HiLink smlModPreRHS Keyword - HiLink smlMPRestr2 Keyword - HiLink smlKeyword Keyword - HiLink smlFunDef Keyword - HiLink smlRefAssign Keyword - HiLink smlKeyChar Keyword - HiLink smlAnyVar Keyword - HiLink smlTopStop Keyword - HiLink smlOperator Keyword - - HiLink smlBoolean Boolean - HiLink smlCharacter Character - HiLink smlNumber Number - HiLink smlReal Float - HiLink smlString String - HiLink smlType Type - HiLink smlTodo Todo - HiLink smlEncl Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link smlBraceErr Error +hi def link smlBrackErr Error +hi def link smlParenErr Error + +hi def link smlCommentErr Error + +hi def link smlEndErr Error +hi def link smlThenErr Error + +hi def link smlCharErr Error + +hi def link smlComment Comment + +hi def link smlModPath Include +hi def link smlModule Include +hi def link smlModParam1 Include +hi def link smlModType Include +hi def link smlMPRestr3 Include +hi def link smlFullMod Include +hi def link smlModTypeRestr Include +hi def link smlWith Include +hi def link smlMTDef Include + +hi def link smlConstructor Constant + +hi def link smlModPreRHS Keyword +hi def link smlMPRestr2 Keyword +hi def link smlKeyword Keyword +hi def link smlFunDef Keyword +hi def link smlRefAssign Keyword +hi def link smlKeyChar Keyword +hi def link smlAnyVar Keyword +hi def link smlTopStop Keyword +hi def link smlOperator Keyword + +hi def link smlBoolean Boolean +hi def link smlCharacter Character +hi def link smlNumber Number +hi def link smlReal Float +hi def link smlString String +hi def link smlType Type +hi def link smlTodo Todo +hi def link smlEncl Keyword + let b:current_syntax = "sml" diff --git a/runtime/syntax/snnsnet.vim b/runtime/syntax/snnsnet.vim index 6b24de5634..9dc9e06e78 100644 --- a/runtime/syntax/snnsnet.vim +++ b/runtime/syntax/snnsnet.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -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 @@ -54,23 +53,14 @@ syn match snnsnetNumbers "\d" contained syn match snnsnetComment "#.*$" contains=snnsnetTodo syn keyword snnsnetTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnsnet_syn_inits") - if version < 508 - let did_snnsnet_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink snnsnetType Type - HiLink snnsnetComment Comment - HiLink snnsnetNumbers Number - HiLink snnsnetSection Statement - HiLink snnsnetTitle Label - HiLink snnsnetTodo Todo +hi def link snnsnetType Type +hi def link snnsnetComment Comment +hi def link snnsnetNumbers Number +hi def link snnsnetSection Statement +hi def link snnsnetTitle Label +hi def link snnsnetTodo Todo - delcommand HiLink -endif let b:current_syntax = "snnsnet" diff --git a/runtime/syntax/snnspat.vim b/runtime/syntax/snnspat.vim index 5bfa48e624..cb6e9c5bd1 100644 --- a/runtime/syntax/snnspat.vim +++ b/runtime/syntax/snnspat.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -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 @@ -44,26 +43,17 @@ syn match snnspatNumbers "\d" contained syn match snnspatComment "#.*$" contains=snnspatTodo syn keyword snnspatTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnspat_syn_inits") - if version < 508 - let did_snnspat_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink snnspatGen Statement - HiLink snnspatHeader Error - HiLink snnspatNoHeader Define - HiLink snnspatNumbers Number - HiLink snnspatComment Comment - HiLink snnspatError Error - HiLink snnspatTodo Todo - HiLink snnspatAccepted NONE - HiLink snnspatBrac NONE +hi def link snnspatGen Statement +hi def link snnspatHeader Error +hi def link snnspatNoHeader Define +hi def link snnspatNumbers Number +hi def link snnspatComment Comment +hi def link snnspatError Error +hi def link snnspatTodo Todo +hi def link snnspatAccepted NONE +hi def link snnspatBrac NONE - delcommand HiLink -endif let b:current_syntax = "snnspat" diff --git a/runtime/syntax/snnsres.vim b/runtime/syntax/snnsres.vim index 4c1d596009..2f19b67dbe 100644 --- a/runtime/syntax/snnsres.vim +++ b/runtime/syntax/snnsres.vim @@ -8,9 +8,8 @@ " SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ " is a simulator for neural networks. -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 @@ -37,23 +36,14 @@ syn match snnsresNumbers "\d" contained syn match snnsresComment "#.*$" contains=snnsresTodo syn keyword snnsresTodo TODO XXX FIXME contained -if version >= 508 || !exists("did_snnsres_syn_inits") - if version < 508 - let did_snnsres_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink snnsresGen Statement - HiLink snnsresHeader Statement - HiLink snnsresNoHeader Define - HiLink snnsresNumbers Number - HiLink snnsresComment Comment - HiLink snnsresTodo Todo - - delcommand HiLink -endif + +hi def link snnsresGen Statement +hi def link snnsresHeader Statement +hi def link snnsresNoHeader Define +hi def link snnsresNumbers Number +hi def link snnsresComment Comment +hi def link snnsresTodo Todo + let b:current_syntax = "snnsres" diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim index 07eb63dec7..a14f15eef4 100644 --- a/runtime/syntax/snobol4.vim +++ b/runtime/syntax/snobol4.vim @@ -10,11 +10,8 @@ " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. -" 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 @@ -79,47 +76,37 @@ syn match snobol4ErrInBracket display contained "[){}]\|<%\|%>" " syn match snobol4Comment "^\#\!.*$" " 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_snobol4_syntax_inits") - if version < 508 - let did_snobol4_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink snobol4Constant Constant - HiLink snobol4Label Label - HiLink snobol4Goto Repeat - HiLink snobol4Conditional Conditional - HiLink snobol4Repeat Repeat - HiLink snobol4Number Number - HiLink snobol4Error Error - HiLink snobol4Statement PreProc - HiLink snobol4BogusStatement snobol4Error - HiLink snobol4String String - HiLink snobol4Comment Comment - HiLink snobol4Special Special - HiLink snobol4Todo Todo - HiLink snobol4Keyword Keyword - HiLink snobol4Function Function - HiLink snobol4MathsOperator Operator - HiLink snobol4ParenError snobol4Error - HiLink snobol4ErrInParen snobol4Error - HiLink snobol4ErrInBracket snobol4Error - HiLink snobol4SysVar Keyword - HiLink snobol4BogusSysVar snobol4Error - if exists("snobol4_strict_mode") - HiLink snobol4ExtSysVar WarningMsg - HiLink snobol4ExtKeyword WarningMsg - else - HiLink snobol4ExtSysVar snobol4SysVar - HiLink snobol4ExtKeyword snobol4Keyword - endif - - delcommand HiLink +hi def link snobol4Constant Constant +hi def link snobol4Label Label +hi def link snobol4Goto Repeat +hi def link snobol4Conditional Conditional +hi def link snobol4Repeat Repeat +hi def link snobol4Number Number +hi def link snobol4Error Error +hi def link snobol4Statement PreProc +hi def link snobol4BogusStatement snobol4Error +hi def link snobol4String String +hi def link snobol4Comment Comment +hi def link snobol4Special Special +hi def link snobol4Todo Todo +hi def link snobol4Keyword Keyword +hi def link snobol4Function Function +hi def link snobol4MathsOperator Operator +hi def link snobol4ParenError snobol4Error +hi def link snobol4ErrInParen snobol4Error +hi def link snobol4ErrInBracket snobol4Error +hi def link snobol4SysVar Keyword +hi def link snobol4BogusSysVar snobol4Error +if exists("snobol4_strict_mode") +hi def link snobol4ExtSysVar WarningMsg +hi def link snobol4ExtKeyword WarningMsg +else +hi def link snobol4ExtSysVar snobol4SysVar +hi def link snobol4ExtKeyword snobol4Keyword endif + let b:current_syntax = "snobol4" " vim: ts=8 diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index 9952bd2548..3a7dc9e422 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -5,11 +5,8 @@ " Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) " Last Change: Sat Apr 9 15:30 2016 Filip SzymaÅ„ski -" 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 @@ -159,78 +156,68 @@ syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" " 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_spec_syntax_inits") - if version < 508 - let did_spec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - "main types color definitions - HiLink specSection Structure - HiLink specSectionMacro Macro - HiLink specWWWlink PreProc - HiLink specOpts Operator - - "yes, it's ugly, but white is sooo cool - if &background == "dark" - hi def specGlobalMacro ctermfg=white - else - HiLink specGlobalMacro Identifier - endif - - "sh colors - HiLink shComment Comment - HiLink shIf Statement - HiLink shOperator Special - HiLink shQuote1 String - HiLink shQuote2 String - HiLink shQuoteDelim Statement - - "spec colors - HiLink specBlock Function - HiLink specColon Special - HiLink specCommand Statement - HiLink specCommandOpts specOpts - HiLink specCommandSpecial Special - HiLink specComment Comment - HiLink specConfigure specCommand - HiLink specDate String - HiLink specDescriptionOpts specOpts - HiLink specEmail specWWWlink - HiLink specError Error - HiLink specFilesDirective specSectionMacro - HiLink specFilesOpts specOpts - HiLink specLicense String - HiLink specMacroNameLocal specGlobalMacro - HiLink specMacroNameOther specGlobalMacro - HiLink specManpageFile NONE - HiLink specMonth specDate - HiLink specNoNumberHilite NONE - HiLink specNumber Number - HiLink specPackageOpts specOpts - HiLink specPercent Special - HiLink specSpecialChar Special - HiLink specSpecialVariables specGlobalMacro - HiLink specSpecialVariablesNames specGlobalMacro - HiLink specTarCommand specCommand - HiLink specURL specWWWlink - HiLink specURLMacro specWWWlink - HiLink specVariables Identifier - HiLink specWeekday specDate - HiLink specListedFilesBin Statement - HiLink specListedFilesDoc Statement - HiLink specListedFilesEtc Statement - HiLink specListedFilesLib Statement - HiLink specListedFilesPrefix Statement - HiLink specListedFilesShare Statement - - delcommand HiLink +" Only when an item doesn't have highlighting yet + +"main types color definitions +hi def link specSection Structure +hi def link specSectionMacro Macro +hi def link specWWWlink PreProc +hi def link specOpts Operator + +"yes, it's ugly, but white is sooo cool +if &background == "dark" +hi def specGlobalMacro ctermfg=white +else +hi def link specGlobalMacro Identifier endif +"sh colors +hi def link shComment Comment +hi def link shIf Statement +hi def link shOperator Special +hi def link shQuote1 String +hi def link shQuote2 String +hi def link shQuoteDelim Statement + +"spec colors +hi def link specBlock Function +hi def link specColon Special +hi def link specCommand Statement +hi def link specCommandOpts specOpts +hi def link specCommandSpecial Special +hi def link specComment Comment +hi def link specConfigure specCommand +hi def link specDate String +hi def link specDescriptionOpts specOpts +hi def link specEmail specWWWlink +hi def link specError Error +hi def link specFilesDirective specSectionMacro +hi def link specFilesOpts specOpts +hi def link specLicense String +hi def link specMacroNameLocal specGlobalMacro +hi def link specMacroNameOther specGlobalMacro +hi def link specManpageFile NONE +hi def link specMonth specDate +hi def link specNoNumberHilite NONE +hi def link specNumber Number +hi def link specPackageOpts specOpts +hi def link specPercent Special +hi def link specSpecialChar Special +hi def link specSpecialVariables specGlobalMacro +hi def link specSpecialVariablesNames specGlobalMacro +hi def link specTarCommand specCommand +hi def link specURL specWWWlink +hi def link specURLMacro specWWWlink +hi def link specVariables Identifier +hi def link specWeekday specDate +hi def link specListedFilesBin Statement +hi def link specListedFilesDoc Statement +hi def link specListedFilesEtc Statement +hi def link specListedFilesLib Statement +hi def link specListedFilesPrefix Statement +hi def link specListedFilesShare Statement + + let b:current_syntax = "spec" " vim: ts=8 diff --git a/runtime/syntax/specman.vim b/runtime/syntax/specman.vim index 93fb4a86c6..9387925ef2 100644 --- a/runtime/syntax/specman.vim +++ b/runtime/syntax/specman.vim @@ -10,11 +10,8 @@ "--------------------------------------------------------- " Remove any old syntax stuff hanging around -" 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 @@ -137,46 +134,36 @@ syn region specmanString start=+"+ end=+"+ syn sync lines=50 " 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_specman_syn_inits") - if version < 508 - let did_specman_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default methods for highlighting. Can be overridden later - HiLink specmanConditional Conditional - HiLink specmanConstraint Conditional - HiLink specmanRepeat Repeat - HiLink specmanString String - HiLink specmanComment Comment - HiLink specmanConstant Macro - HiLink specmanNumber Number - HiLink specmanCompare Operator - HiLink specmanOperator Operator - HiLink specmanLogical Operator - HiLink specmanStatement Statement - HiLink specmanHDL SpecialChar - HiLink specmanMethod Function - HiLink specmanInclude Include - HiLink specmanStructure Structure - HiLink specmanBoolean Boolean - HiLink specmanFSM Label - HiLink specmanSpecial Special - HiLink specmanType Type - HiLink specmanTemporal Type - HiLink specmanFile Include - HiLink specmanPreCondit Include - HiLink specmanDefine Typedef - HiLink specmanLabel Label - HiLink specmanPacking keyword - HiLink specmanTodo Todo - HiLink specmanParenError Error - HiLink specmanErrInParen Error - HiLink specmanErrInBracket Error - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +" The default methods for highlighting. Can be overridden later +hi def link specmanConditional Conditional +hi def link specmanConstraint Conditional +hi def link specmanRepeat Repeat +hi def link specmanString String +hi def link specmanComment Comment +hi def link specmanConstant Macro +hi def link specmanNumber Number +hi def link specmanCompare Operator +hi def link specmanOperator Operator +hi def link specmanLogical Operator +hi def link specmanStatement Statement +hi def link specmanHDL SpecialChar +hi def link specmanMethod Function +hi def link specmanInclude Include +hi def link specmanStructure Structure +hi def link specmanBoolean Boolean +hi def link specmanFSM Label +hi def link specmanSpecial Special +hi def link specmanType Type +hi def link specmanTemporal Type +hi def link specmanFile Include +hi def link specmanPreCondit Include +hi def link specmanDefine Typedef +hi def link specmanLabel Label +hi def link specmanPacking keyword +hi def link specmanTodo Todo +hi def link specmanParenError Error +hi def link specmanErrInParen Error +hi def link specmanErrInBracket Error let b:current_syntax = "specman" diff --git a/runtime/syntax/spice.vim b/runtime/syntax/spice.vim index 200e1aaea4..306039bc74 100644 --- a/runtime/syntax/spice.vim +++ b/runtime/syntax/spice.vim @@ -7,11 +7,8 @@ " This is based on sh.vim by Lennart Schultz " but greatly simplified -" 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 @@ -53,28 +50,18 @@ syn match spiceParenError ")" syn sync minlines=50 " 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_spice_syntax_inits") - if version < 508 - let did_spice_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink spiceTodo Todo - HiLink spiceWrapLineOperator spiceOperator - HiLink spiceSinglequote spiceExpr - HiLink spiceExpr Function - HiLink spiceParenError Error - HiLink spiceStatement Statement - HiLink spiceNumber Number - HiLink spiceComment Comment - HiLink spiceOperator Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link spiceTodo Todo +hi def link spiceWrapLineOperator spiceOperator +hi def link spiceSinglequote spiceExpr +hi def link spiceExpr Function +hi def link spiceParenError Error +hi def link spiceStatement Statement +hi def link spiceNumber Number +hi def link spiceComment Comment +hi def link spiceOperator Operator + let b:current_syntax = "spice" diff --git a/runtime/syntax/splint.vim b/runtime/syntax/splint.vim index dc09d8b9d6..8eba57d288 100644 --- a/runtime/syntax/splint.vim +++ b/runtime/syntax/splint.vim @@ -15,20 +15,13 @@ " in your vimrc file or filetype.vim -" 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 " Read the C syntax to start with -if version < 600 - so <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim " FIXME: uses and changes several clusters defined in c.vim @@ -199,61 +192,51 @@ syn cluster cPreProcGroup add=@splintAllStuff syn cluster cMultiGroup add=@splintAllStuff " 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_splint_syntax_inits") - if version < 508 - let did_splint_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink splintShortAnn splintAnnotation - HiLink splintAnnotation Comment - HiLink splintAnnError splintError - HiLink splintAnnError2 splintError - HiLink splintFlag SpecialComment - HiLink splintGlobalFlag splintError - HiLink splintSpecialAnnot splintAnnKey - HiLink splintStateAnnot splintAnnKey - HiLink splintSpecTag splintAnnKey - HiLink splintModifies splintAnnKey - HiLink splintRequires splintAnnKey - HiLink splintGlobals splintAnnKey - HiLink splintGlobitem Constant - HiLink splintGlobannot splintAnnKey - HiLink splintWarning splintAnnKey - HiLink splintModitem Constant - HiLink splintIter splintAnnKey - HiLink splintConst splintAnnKey - HiLink splintAlt splintAnnKey - HiLink splintType splintAnnKey - HiLink splintGlobalType splintAnnKey - HiLink splintMemMgm splintAnnKey - HiLink splintAlias splintAnnKey - HiLink splintExposure splintAnnKey - HiLink splintDefState splintAnnKey - HiLink splintGlobState splintAnnKey - HiLink splintNullState splintAnnKey - HiLink splintNullPred splintAnnKey - HiLink splintExit splintAnnKey - HiLink splintExec splintAnnKey - HiLink splintSef splintAnnKey - HiLink splintDecl splintAnnKey - HiLink splintCase splintAnnKey - HiLink splintBreak splintAnnKey - HiLink splintUnreach splintAnnKey - HiLink splintSpecFunc splintAnnKey - HiLink splintErrSupp splintAnnKey - HiLink splintTypeAcc splintAnnKey - HiLink splintMacro splintAnnKey - HiLink splintSpecType splintAnnKey - HiLink splintAnnKey Type - HiLink splintError Error +" Only when an item doesn't have highlighting yet + +hi def link splintShortAnn splintAnnotation +hi def link splintAnnotation Comment +hi def link splintAnnError splintError +hi def link splintAnnError2 splintError +hi def link splintFlag SpecialComment +hi def link splintGlobalFlag splintError +hi def link splintSpecialAnnot splintAnnKey +hi def link splintStateAnnot splintAnnKey +hi def link splintSpecTag splintAnnKey +hi def link splintModifies splintAnnKey +hi def link splintRequires splintAnnKey +hi def link splintGlobals splintAnnKey +hi def link splintGlobitem Constant +hi def link splintGlobannot splintAnnKey +hi def link splintWarning splintAnnKey +hi def link splintModitem Constant +hi def link splintIter splintAnnKey +hi def link splintConst splintAnnKey +hi def link splintAlt splintAnnKey +hi def link splintType splintAnnKey +hi def link splintGlobalType splintAnnKey +hi def link splintMemMgm splintAnnKey +hi def link splintAlias splintAnnKey +hi def link splintExposure splintAnnKey +hi def link splintDefState splintAnnKey +hi def link splintGlobState splintAnnKey +hi def link splintNullState splintAnnKey +hi def link splintNullPred splintAnnKey +hi def link splintExit splintAnnKey +hi def link splintExec splintAnnKey +hi def link splintSef splintAnnKey +hi def link splintDecl splintAnnKey +hi def link splintCase splintAnnKey +hi def link splintBreak splintAnnKey +hi def link splintUnreach splintAnnKey +hi def link splintSpecFunc splintAnnKey +hi def link splintErrSupp splintAnnKey +hi def link splintTypeAcc splintAnnKey +hi def link splintMacro splintAnnKey +hi def link splintSpecType splintAnnKey +hi def link splintAnnKey Type +hi def link splintError Error - delcommand HiLink -endif let b:current_syntax = "splint" diff --git a/runtime/syntax/spup.vim b/runtime/syntax/spup.vim index 8d7a9e525c..743c7b5711 100644 --- a/runtime/syntax/spup.vim +++ b/runtime/syntax/spup.vim @@ -17,11 +17,8 @@ " If you encounter problems or have questions or suggestions, mail me " Remove old syntax stuff -" 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 @@ -206,74 +203,64 @@ syn sync match spupSyncTitle grouphere spupTitle "^TITLE" syn sync match spupSyncUnit grouphere spupUnit "^UNIT" " 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_spup_syn_inits") - if version < 508 - let did_spup_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink spupCdi spupSection - HiLink spupConditions spupSection - HiLink spupDeclare spupSection - HiLink spupEstimation spupSection - HiLink spupExternal spupSection - HiLink spupFlowsheet spupSection - HiLink spupFunction spupSection - HiLink spupGlobal spupSection - HiLink spupHomotopy spupSection - HiLink spupMacro spupSection - HiLink spupModel spupSection - HiLink spupOperation spupSection - HiLink spupOptions spupSection - HiLink spupProcedure spupSection - HiLink spupProfiles spupSection - HiLink spupReport spupSection - HiLink spupTitle spupConstant " this is correct, truly ;) - HiLink spupUnit spupSection +hi def link spupCdi spupSection +hi def link spupConditions spupSection +hi def link spupDeclare spupSection +hi def link spupEstimation spupSection +hi def link spupExternal spupSection +hi def link spupFlowsheet spupSection +hi def link spupFunction spupSection +hi def link spupGlobal spupSection +hi def link spupHomotopy spupSection +hi def link spupMacro spupSection +hi def link spupModel spupSection +hi def link spupOperation spupSection +hi def link spupOptions spupSection +hi def link spupProcedure spupSection +hi def link spupProfiles spupSection +hi def link spupReport spupSection +hi def link spupTitle spupConstant " this is correct, truly ;) +hi def link spupUnit spupSection - HiLink spupCdiSubs spupSubs - HiLink spupConditionsSubs spupSubs - HiLink spupDeclareSubs spupSubs - HiLink spupEstimationSubs spupSubs - HiLink spupExternalSubs spupSubs - HiLink spupFlowsheetSubs spupSubs - HiLink spupFunctionSubs spupSubs - HiLink spupHomotopySubs spupSubs - HiLink spupMacroSubs spupSubs - HiLink spupModelSubs spupSubs - HiLink spupOperationSubs spupSubs - HiLink spupOptionsSubs spupSubs - HiLink spupProcedureSubs spupSubs - HiLink spupReportSubs spupSubs - HiLink spupUnitSubs spupSubs +hi def link spupCdiSubs spupSubs +hi def link spupConditionsSubs spupSubs +hi def link spupDeclareSubs spupSubs +hi def link spupEstimationSubs spupSubs +hi def link spupExternalSubs spupSubs +hi def link spupFlowsheetSubs spupSubs +hi def link spupFunctionSubs spupSubs +hi def link spupHomotopySubs spupSubs +hi def link spupMacroSubs spupSubs +hi def link spupModelSubs spupSubs +hi def link spupOperationSubs spupSubs +hi def link spupOptionsSubs spupSubs +hi def link spupProcedureSubs spupSubs +hi def link spupReportSubs spupSubs +hi def link spupUnitSubs spupSubs - HiLink spupCode Normal - HiLink spupComment Comment - HiLink spupComment2 spupComment - HiLink spupConditional Statement - HiLink spupConstant Constant - HiLink spupError Error - HiLink spupHelp Normal - HiLink spupIdentifier Identifier - HiLink spupNumber Constant - HiLink spupOperator Special - HiLink spupOpenBrace spupError - HiLink spupSection Statement - HiLink spupSpecial spupTextprocGeneric - HiLink spupStreams Type - HiLink spupString Constant - HiLink spupSubs Statement - HiLink spupSymbol Special - HiLink spupTextprocError Normal - HiLink spupTextprocGeneric PreProc - HiLink spupTypes Type +hi def link spupCode Normal +hi def link spupComment Comment +hi def link spupComment2 spupComment +hi def link spupConditional Statement +hi def link spupConstant Constant +hi def link spupError Error +hi def link spupHelp Normal +hi def link spupIdentifier Identifier +hi def link spupNumber Constant +hi def link spupOperator Special +hi def link spupOpenBrace spupError +hi def link spupSection Statement +hi def link spupSpecial spupTextprocGeneric +hi def link spupStreams Type +hi def link spupString Constant +hi def link spupSubs Statement +hi def link spupSymbol Special +hi def link spupTextprocError Normal +hi def link spupTextprocGeneric PreProc +hi def link spupTypes Type - delcommand HiLink -endif let b:current_syntax = "spup" diff --git a/runtime/syntax/spyce.vim b/runtime/syntax/spyce.vim index e76cb1a1a2..169de199dc 100644 --- a/runtime/syntax/spyce.vim +++ b/runtime/syntax/spyce.vim @@ -4,11 +4,8 @@ " URL: http://spyce.sourceforge.net " Last Change: 2009 Nov 11 -" 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 @@ -20,13 +17,9 @@ endif " Read the HTML syntax to start with let b:did_indent = 1 " don't perform HTML indentation! let html_no_rendering = 1 " do not render <b>,<i>, etc... -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax - syntax spell default " added by Bram -endif +runtime! syntax/html.vim +unlet b:current_syntax +syntax spell default " added by Bram " include python syn include @Python <sfile>:p:h/python.vim diff --git a/runtime/syntax/sql.vim b/runtime/syntax/sql.vim index 7ba20f3446..6de3f4a5c0 100644 --- a/runtime/syntax/sql.vim +++ b/runtime/syntax/sql.vim @@ -10,11 +10,8 @@ " If the above exist, it will source the type specified. " If none exist, it will source the default sql.vim file. " -" 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 diff --git a/runtime/syntax/sqlanywhere.vim b/runtime/syntax/sqlanywhere.vim index 05b05c9f4f..e91a99de65 100644 --- a/runtime/syntax/sqlanywhere.vim +++ b/runtime/syntax/sqlanywhere.vim @@ -12,11 +12,8 @@ " Updated to Adaptive Server Anywhere 9.0.1 " Updated to Adaptive Server Anywhere 9.0.0 " -" 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 diff --git a/runtime/syntax/sqlforms.vim b/runtime/syntax/sqlforms.vim index 055b2ae870..6077dd1e94 100644 --- a/runtime/syntax/sqlforms.vim +++ b/runtime/syntax/sqlforms.vim @@ -7,21 +7,14 @@ " " TODO Find a new maintainer who knows SQL*Forms. - " 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 syntax case ignore -if version >= 600 - setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> -else - set iskeyword=a-z,A-Z,48-57,_,.,-,> -endif +setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> " The SQL reserved words, defined as keywords. @@ -138,30 +131,21 @@ syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" syntax sync ccomment sqlComment -if version >= 508 || !exists("did_sqlforms_syn_inits") - if version < 508 - let did_sqlforms_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sqlComment Comment - HiLink sqlKeyword Statement - HiLink sqlNumber Number - HiLink sqlOperator Statement - HiLink sqlProcedure Statement - HiLink sqlFunction Statement - HiLink sqlSystem Identifier - HiLink sqlSpecial Special - HiLink sqlStatement Statement - HiLink sqlString String - HiLink sqlType Type - HiLink sqlCodes Identifier - HiLink sqlTriggers PreProc - - delcommand HiLink -endif + +hi def link sqlComment Comment +hi def link sqlKeyword Statement +hi def link sqlNumber Number +hi def link sqlOperator Statement +hi def link sqlProcedure Statement +hi def link sqlFunction Statement +hi def link sqlSystem Identifier +hi def link sqlSpecial Special +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlCodes Identifier +hi def link sqlTriggers PreProc + let b:current_syntax = "sqlforms" diff --git a/runtime/syntax/sqlhana.vim b/runtime/syntax/sqlhana.vim index 1410e99eb4..2e334bb56e 100644 --- a/runtime/syntax/sqlhana.vim +++ b/runtime/syntax/sqlhana.vim @@ -7,11 +7,8 @@ " Description: Updated to SAP HANA SP4 " -" 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 diff --git a/runtime/syntax/sqlinformix.vim b/runtime/syntax/sqlinformix.vim index b4d023600c..e01912bc40 100644 --- a/runtime/syntax/sqlinformix.vim +++ b/runtime/syntax/sqlinformix.vim @@ -4,11 +4,8 @@ " Maintainer: Dean Hill <dhill@hotmail.com> " Last Change: 2004 Aug 30 -" 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 @@ -154,43 +151,33 @@ syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE " 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_sql_syn_inits") - if version < 508 - let did_sql_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - - " === Comment syntax group === - HiLink sqlComment Comment - - " === Constant syntax group === - HiLink sqlNumber Number - HiLink sqlBoolean Boolean - HiLink sqlString String - - " === Statment syntax group === - HiLink sqlStatement Statement - HiLink sqlConditional Conditional - HiLink sqlRepeat Repeat - HiLink sqlKeyword Keyword - HiLink sqlOperator Operator - HiLink sqlException Exception - - " === Identifier syntax group === - HiLink sqlFunction Function - - " === Type syntax group === - HiLink sqlType Type - - " === Todo syntax group === - HiLink sqlTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + + +" === Comment syntax group === +hi def link sqlComment Comment + +" === Constant syntax group === +hi def link sqlNumber Number +hi def link sqlBoolean Boolean +hi def link sqlString String + +" === Statment syntax group === +hi def link sqlStatement Statement +hi def link sqlConditional Conditional +hi def link sqlRepeat Repeat +hi def link sqlKeyword Keyword +hi def link sqlOperator Operator +hi def link sqlException Exception + +" === Identifier syntax group === +hi def link sqlFunction Function + +" === Type syntax group === +hi def link sqlType Type + +" === Todo syntax group === +hi def link sqlTodo Todo + let b:current_syntax = "sqlinformix" diff --git a/runtime/syntax/sqlj.vim b/runtime/syntax/sqlj.vim index 51398ef9c2..c901145c3c 100644 --- a/runtime/syntax/sqlj.vim +++ b/runtime/syntax/sqlj.vim @@ -8,10 +8,8 @@ " au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim -" Remove any old syntax stuff hanging around -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 @@ -76,27 +74,18 @@ syn match sqlComment "--.*" syn sync ccomment sqljComment -if version >= 508 || !exists("did_sqlj_syn_inits") - if version < 508 - let did_sqlj_syn_inits = 1 - command! -nargs=+ HiLink hi link <args> - else - command! -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later. - HiLink sqljComment Comment - HiLink sqljKeyword sqljSpecial - HiLink sqljNumber Number - HiLink sqljOperator sqljStatement - HiLink sqljSpecial Special - HiLink sqljStatement Statement - HiLink sqljString String - HiLink sqljType Type - HiLink sqljPre PreProc - - delcommand HiLink -endif + +" The default methods for highlighting. Can be overridden later. +hi def link sqljComment Comment +hi def link sqljKeyword sqljSpecial +hi def link sqljNumber Number +hi def link sqljOperator sqljStatement +hi def link sqljSpecial Special +hi def link sqljStatement Statement +hi def link sqljString String +hi def link sqljType Type +hi def link sqljPre PreProc + let b:current_syntax = "sqlj" diff --git a/runtime/syntax/sqloracle.vim b/runtime/syntax/sqloracle.vim index f9e24af98c..bf2862f497 100644 --- a/runtime/syntax/sqloracle.vim +++ b/runtime/syntax/sqloracle.vim @@ -128,19 +128,17 @@ syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xml syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained " Define the default highlighting. -command -nargs=+ HiLink hi def link <args> -HiLink Quote Special -HiLink sqlComment Comment -HiLink sqlFunction Function -HiLink sqlKeyword sqlSpecial -HiLink sqlNumber Number -HiLink sqlOperator sqlStatement -HiLink sqlSpecial Special -HiLink sqlStatement Statement -HiLink sqlString String -HiLink sqlType Type -HiLink sqlTodo Todo - -delcommand HiLink +hi def link Quote Special +hi def link sqlComment Comment +hi def link sqlFunction Function +hi def link sqlKeyword sqlSpecial +hi def link sqlNumber Number +hi def link sqlOperator sqlStatement +hi def link sqlSpecial Special +hi def link sqlStatement Statement +hi def link sqlString String +hi def link sqlType Type +hi def link sqlTodo Todo + let b:current_syntax = "sql" " vim: ts=8 diff --git a/runtime/syntax/sqr.vim b/runtime/syntax/sqr.vim index 8c9e7b49e4..40b48358c6 100644 --- a/runtime/syntax/sqr.vim +++ b/runtime/syntax/sqr.vim @@ -16,19 +16,12 @@ " http://lanzarotta.tripod.com/vim.html " jefflanzarotta at yahoo dot com -" 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 -if version >= 600 - setlocal iskeyword=@,48-57,_,-,#,$,{,} -else - set iskeyword=@,48-57,_,-,#,$,{,} -endif +setlocal iskeyword=@,48-57,_,-,#,$,{,} syn case ignore @@ -220,75 +213,49 @@ syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### syn match sqrTodo /???/ -if version >= 600 - " See also the sqrString section above for handling of ! characters - " inside of strings. (Those patterns override the ones below.) - syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo - " the ! can't be preceded by another !, - " and must be followed by at least one - " character other than ! or =, or immediately - " by the end-of-line - syn match sqrComment /^!=.*/ contains=sqrTodo - syn match sqrComment /^!!.*/ contains=sqrTodo - syn match sqrError /^\s\+\zs!=.*/ - " it's an error to have "!=" preceded by - " just whitespace on the line ("!=" - " preceded by non-whitespace is treated - " as neither a comment nor an error, since - " it is often correct, i.e. - " if #count != 7 - syn match sqrError /.\+\zs!!.*/ - " a "!!" anywhere but at the beginning of - " the line is always an error -else "For versions before 6.0, same idea as above but we are limited - "to simple patterns only. Also, the sqrString patterns above - "don't seem to take precedence in v5 as they do in v6, so - "we split the last rule to ignore comments found inside of - "string literals. - syn match sqrComment /!\([^!=].*\|$\)/ contains=sqrTodo - syn match sqrComment /^!=.*/ contains=sqrTodo - syn match sqrComment /^!!.*/ contains=sqrTodo - syn match sqrError /^\s\+!=.*/ - syn match sqrError /^[^'!]\+!!/ - " flag !! on lines that don't have ! or ' - syn match sqrError /^\([^!']*'[^']*'[^!']*\)\+!!/ - " flag !! found after matched ' ' chars - " (that aren't also commented) -endif +" See also the sqrString section above for handling of ! characters +" inside of strings. (Those patterns override the ones below.) +syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo +" the ! can't be preceded by another !, +" and must be followed by at least one +" character other than ! or =, or immediately +" by the end-of-line +syn match sqrComment /^!=.*/ contains=sqrTodo +syn match sqrComment /^!!.*/ contains=sqrTodo +syn match sqrError /^\s\+\zs!=.*/ +" it's an error to have "!=" preceded by +" just whitespace on the line ("!=" +" preceded by non-whitespace is treated +" as neither a comment nor an error, since +" it is often correct, i.e. +" if #count != 7 +syn match sqrError /.\+\zs!!.*/ +" a "!!" anywhere but at the beginning of +" the line is always an error " 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_sqr_syn_inits") - if version < 508 - let did_sqr_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sqrSection Statement - HiLink sqrParagraph Statement - HiLink sqrReserved Statement - HiLink sqrParameter Statement - HiLink sqrPreProc PreProc - HiLink sqrSubstVar PreProc - HiLink sqrCommand Statement - HiLink sqrParam Type - HiLink sqrFunction Special - - HiLink sqrString String - HiLink sqrStrOpen Todo - HiLink sqrNumber Number - HiLink sqrVariable Identifier - - HiLink sqrComment Comment - HiLink sqrTodo Todo - HiLink sqrError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet. + +hi def link sqrSection Statement +hi def link sqrParagraph Statement +hi def link sqrReserved Statement +hi def link sqrParameter Statement +hi def link sqrPreProc PreProc +hi def link sqrSubstVar PreProc +hi def link sqrCommand Statement +hi def link sqrParam Type +hi def link sqrFunction Special + +hi def link sqrString String +hi def link sqrStrOpen Todo +hi def link sqrNumber Number +hi def link sqrVariable Identifier + +hi def link sqrComment Comment +hi def link sqrTodo Todo +hi def link sqrError Error + let b:current_syntax = "sqr" diff --git a/runtime/syntax/squid.vim b/runtime/syntax/squid.vim index a8462bbdce..a8abd180a0 100644 --- a/runtime/syntax/squid.vim +++ b/runtime/syntax/squid.vim @@ -7,11 +7,8 @@ " Michael Dotzler <Michael.Dotzler@leoni.com> -" 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 @@ -123,30 +120,20 @@ syn match squidRegexOpt contained "\(^\s*acl\s\+\S\+\s\+\S\+\(_regex\|_mime_type syn sync minlines=3 " 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_squid_syntax_inits") - if version < 508 - let did_squid_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink squidTodo Todo - HiLink squidComment Comment - HiLink squidTag Special - HiLink squidConf Keyword - HiLink squidOpt Constant - HiLink squidAction String - HiLink squidNumber Number - HiLink squidIP Number - HiLink squidAcl Keyword - HiLink squidStr String - HiLink squidRegexOpt Special +hi def link squidTodo Todo +hi def link squidComment Comment +hi def link squidTag Special +hi def link squidConf Keyword +hi def link squidOpt Constant +hi def link squidAction String +hi def link squidNumber Number +hi def link squidIP Number +hi def link squidAcl Keyword +hi def link squidStr String +hi def link squidRegexOpt Special - delcommand HiLink -endif let b:current_syntax = "squid" diff --git a/runtime/syntax/srec.vim b/runtime/syntax/srec.vim index 19b6d97426..6ac22d9062 100644 --- a/runtime/syntax/srec.vim +++ b/runtime/syntax/srec.vim @@ -24,11 +24,8 @@ " States in parentheses in the upper format description indicate that they " should not appear in a valid file. -" 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 @@ -63,33 +60,23 @@ syn match srecDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=srecDataUnexp syn match srecChecksum "[0-9a-fA-F]\{2}$" contained " 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_srec_syntax_inits") - if version < 508 - let did_srec_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default methods for highlighting. Can be overridden later - HiLink srecRecStart srecRecType - HiLink srecRecTypeUnknown srecRecType - HiLink srecRecType WarningMsg - HiLink srecByteCount Constant - hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic - HiLink srecNoAddress DiffAdd - HiLink srecDataAddress Comment - HiLink srecRecCount srecNoAddress - HiLink srecStartAddress srecDataAddress - hi def srecDataOdd term=bold cterm=bold gui=bold - hi def srecDataEven term=NONE cterm=NONE gui=NONE - HiLink srecDataUnexpected Error - HiLink srecChecksum DiffChange +" The default methods for highlighting. Can be overridden later +hi def link srecRecStart srecRecType +hi def link srecRecTypeUnknown srecRecType +hi def link srecRecType WarningMsg +hi def link srecByteCount Constant +hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic +hi def link srecNoAddress DiffAdd +hi def link srecDataAddress Comment +hi def link srecRecCount srecNoAddress +hi def link srecStartAddress srecDataAddress +hi def srecDataOdd term=bold cterm=bold gui=bold +hi def srecDataEven term=NONE cterm=NONE gui=NONE +hi def link srecDataUnexpected Error +hi def link srecChecksum DiffChange - delcommand HiLink -endif let b:current_syntax = "srec" diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim index 302d073f1e..8401923e02 100644 --- a/runtime/syntax/sshconfig.vim +++ b/runtime/syntax/sshconfig.vim @@ -10,19 +10,12 @@ " " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on @@ -233,40 +226,31 @@ syn keyword sshconfigKeyword VisualHostKey syn keyword sshconfigKeyword XAuthLocation " Define the default highlighting -if version >= 508 || !exists("did_sshconfig_syntax_inits") - if version < 508 - let did_sshconfig_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink sshconfigComment Comment - HiLink sshconfigTodo Todo - HiLink sshconfigHostPort sshconfigConstant - HiLink sshconfigNumber sshconfigConstant - HiLink sshconfigConstant Constant - HiLink sshconfigYesNo sshconfigEnum - HiLink sshconfigCipher sshconfigEnum - HiLink sshconfigCiphers sshconfigEnum - HiLink sshconfigMAC sshconfigEnum - HiLink sshconfigHostKeyAlgo sshconfigEnum - HiLink sshconfigLogLevel sshconfigEnum - HiLink sshconfigSysLogFacility sshconfigEnum - HiLink sshconfigAddressFamily sshconfigEnum - HiLink sshconfigIPQoS sshconfigEnum - HiLink sshconfigKbdInteractive sshconfigEnum - HiLink sshconfigKexAlgo sshconfigEnum - HiLink sshconfigTunnel sshconfigEnum - HiLink sshconfigPreferredAuth sshconfigEnum - HiLink sshconfigVar sshconfigEnum - HiLink sshconfigEnum Identifier - HiLink sshconfigSpecial Special - HiLink sshconfigKeyword Keyword - HiLink sshconfigHostSect Type - HiLink sshconfigMatch Type - delcommand HiLink -endif +hi def link sshconfigComment Comment +hi def link sshconfigTodo Todo +hi def link sshconfigHostPort sshconfigConstant +hi def link sshconfigNumber sshconfigConstant +hi def link sshconfigConstant Constant +hi def link sshconfigYesNo sshconfigEnum +hi def link sshconfigCipher sshconfigEnum +hi def link sshconfigCiphers sshconfigEnum +hi def link sshconfigMAC sshconfigEnum +hi def link sshconfigHostKeyAlgo sshconfigEnum +hi def link sshconfigLogLevel sshconfigEnum +hi def link sshconfigSysLogFacility sshconfigEnum +hi def link sshconfigAddressFamily sshconfigEnum +hi def link sshconfigIPQoS sshconfigEnum +hi def link sshconfigKbdInteractive sshconfigEnum +hi def link sshconfigKexAlgo sshconfigEnum +hi def link sshconfigTunnel sshconfigEnum +hi def link sshconfigPreferredAuth sshconfigEnum +hi def link sshconfigVar sshconfigEnum +hi def link sshconfigEnum Identifier +hi def link sshconfigSpecial Special +hi def link sshconfigKeyword Keyword +hi def link sshconfigHostSect Type +hi def link sshconfigMatch Type let b:current_syntax = "sshconfig" diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim index 6b7b98d893..1556258b25 100644 --- a/runtime/syntax/sshdconfig.vim +++ b/runtime/syntax/sshdconfig.vim @@ -11,19 +11,12 @@ " " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif -if version >= 600 - setlocal iskeyword=_,-,a-z,A-Z,48-57 -else - set iskeyword=_,-,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,a-z,A-Z,48-57 " case on @@ -239,43 +232,34 @@ syn keyword sshdconfigKeyword XAuthLocation " Define the default highlighting -if version >= 508 || !exists("did_sshdconfig_syntax_inits") - if version < 508 - let did_sshdconfig_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink sshdconfigComment Comment - HiLink sshdconfigTodo Todo - HiLink sshdconfigHostPort sshdconfigConstant - HiLink sshdconfigTime sshdconfigConstant - HiLink sshdconfigNumber sshdconfigConstant - HiLink sshdconfigConstant Constant - HiLink sshdconfigYesNo sshdconfigEnum - HiLink sshdconfigAddressFamily sshdconfigEnum - HiLink sshdconfigPrivilegeSeparation sshdconfigEnum - HiLink sshdconfigTcpForwarding sshdconfigEnum - HiLink sshdconfigRootLogin sshdconfigEnum - HiLink sshdconfigCiphers sshdconfigEnum - HiLink sshdconfigMAC sshdconfigEnum - HiLink sshdconfigHostKeyAlgo sshdconfigEnum - HiLink sshdconfigRootLogin sshdconfigEnum - HiLink sshdconfigLogLevel sshdconfigEnum - HiLink sshdconfigSysLogFacility sshdconfigEnum - HiLink sshdconfigVar sshdconfigEnum - HiLink sshdconfigCompression sshdconfigEnum - HiLink sshdconfigIPQoS sshdconfigEnum - HiLink sshdconfigKexAlgo sshdconfigEnum - HiLink sshdconfigTunnel sshdconfigEnum - HiLink sshdconfigSubsystem sshdconfigEnum - HiLink sshdconfigEnum Function - HiLink sshdconfigSpecial Special - HiLink sshdconfigKeyword Keyword - HiLink sshdconfigMatch Type - delcommand HiLink -endif + +hi def link sshdconfigComment Comment +hi def link sshdconfigTodo Todo +hi def link sshdconfigHostPort sshdconfigConstant +hi def link sshdconfigTime sshdconfigConstant +hi def link sshdconfigNumber sshdconfigConstant +hi def link sshdconfigConstant Constant +hi def link sshdconfigYesNo sshdconfigEnum +hi def link sshdconfigAddressFamily sshdconfigEnum +hi def link sshdconfigPrivilegeSeparation sshdconfigEnum +hi def link sshdconfigTcpForwarding sshdconfigEnum +hi def link sshdconfigRootLogin sshdconfigEnum +hi def link sshdconfigCiphers sshdconfigEnum +hi def link sshdconfigMAC sshdconfigEnum +hi def link sshdconfigHostKeyAlgo sshdconfigEnum +hi def link sshdconfigRootLogin sshdconfigEnum +hi def link sshdconfigLogLevel sshdconfigEnum +hi def link sshdconfigSysLogFacility sshdconfigEnum +hi def link sshdconfigVar sshdconfigEnum +hi def link sshdconfigCompression sshdconfigEnum +hi def link sshdconfigIPQoS sshdconfigEnum +hi def link sshdconfigKexAlgo sshdconfigEnum +hi def link sshdconfigTunnel sshdconfigEnum +hi def link sshdconfigSubsystem sshdconfigEnum +hi def link sshdconfigEnum Function +hi def link sshdconfigSpecial Special +hi def link sshdconfigKeyword Keyword +hi def link sshdconfigMatch Type let b:current_syntax = "sshdconfig" diff --git a/runtime/syntax/st.vim b/runtime/syntax/st.vim index 47aa07de5d..8160c7704a 100644 --- a/runtime/syntax/st.vim +++ b/runtime/syntax/st.vim @@ -3,11 +3,8 @@ " Maintainer: Arndt Hesse <hesse@self.de> " Last Change: 2012 Feb 12 by Thilo Six -" 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 @@ -77,30 +74,20 @@ hi link stBlockError stError syn sync minlines=50 " 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_st_syntax_inits") - if version < 508 - let did_st_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink stKeyword Statement - HiLink stMethod Statement - HiLink stComment Comment - HiLink stCharacter Constant - HiLink stString Constant - HiLink stSymbol Special - HiLink stNumber Type - HiLink stFloat Type - HiLink stError Error - HiLink stLocalVariables Identifier - HiLink stBlockVariable Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link stKeyword Statement +hi def link stMethod Statement +hi def link stComment Comment +hi def link stCharacter Constant +hi def link stString Constant +hi def link stSymbol Special +hi def link stNumber Type +hi def link stFloat Type +hi def link stError Error +hi def link stLocalVariables Identifier +hi def link stBlockVariable Identifier + let b:current_syntax = "st" diff --git a/runtime/syntax/stata.vim b/runtime/syntax/stata.vim index e1f19c84fc..29f5052ebe 100644 --- a/runtime/syntax/stata.vim +++ b/runtime/syntax/stata.vim @@ -12,9 +12,8 @@ " 26apr2006 fixed brace confusion in stataErrInParen and stataErrInBracket " fixed paren/bracket confusion in stataFuncGroup -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 diff --git a/runtime/syntax/stp.vim b/runtime/syntax/stp.vim index f4f0f3b615..2992d8be47 100644 --- a/runtime/syntax/stp.vim +++ b/runtime/syntax/stp.vim @@ -4,11 +4,8 @@ " URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip " Last Change: March 05, 2002 -" 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 @@ -131,36 +128,26 @@ syn match stpParenError ")" syn sync minlines=10 maxlines=100 " Define the default highlighting. -" For version 5.x and earlier, only when not done already. -" For version 5.8 and later, only when and item doesn't have highlighting yet. -if version >= 508 || !exists("did_stp_syn_inits") - if version < 508 - let did_stp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink stpConditional Conditional - HiLink stpComment Comment - HiLink stpKeyword Keyword - HiLink stpNumber Number - HiLink stpOperator Operator - HiLink stpSpecial Special - HiLink stpStatement Statement - HiLink stpString String - HiLink stpStringError Error - HiLink stpType Type - HiLink stpTodo Todo - HiLink stpFunction Function - HiLink stpGlobals Macro - HiLink stpParen Normal - HiLink stpParenError Error - HiLink stpSQLKeyword Function - HiLink stpRepeat Repeat - - delcommand HiLink -endif +" Only when and item doesn't have highlighting yet. + +hi def link stpConditional Conditional +hi def link stpComment Comment +hi def link stpKeyword Keyword +hi def link stpNumber Number +hi def link stpOperator Operator +hi def link stpSpecial Special +hi def link stpStatement Statement +hi def link stpString String +hi def link stpStringError Error +hi def link stpType Type +hi def link stpTodo Todo +hi def link stpFunction Function +hi def link stpGlobals Macro +hi def link stpParen Normal +hi def link stpParenError Error +hi def link stpSQLKeyword Function +hi def link stpRepeat Repeat + let b:current_syntax = "stp" diff --git a/runtime/syntax/strace.vim b/runtime/syntax/strace.vim index 0f686fd808..206c58919e 100644 --- a/runtime/syntax/strace.vim +++ b/runtime/syntax/strace.vim @@ -5,12 +5,9 @@ " Last Change: 2015-01-16 " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -35,31 +32,22 @@ syn match straceOperator "[-+=*/!%&|:,]" syn region straceComment start="/\*" end="\*/" oneline " Define the default highlighting -if version >= 508 || !exists("did_strace_syntax_inits") - if version < 508 - let did_strace_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink straceComment Comment - HiLink straceVerbosed Comment - HiLink stracePID PreProc - HiLink straceNumber Number - HiLink straceNumberRHS Type - HiLink straceOtherRHS Type - HiLink straceString String - HiLink straceConstant Function - HiLink straceEquals Type - HiLink straceSysCallEmbed straceSysCall - HiLink straceSysCall Statement - HiLink straceParenthesis Statement - HiLink straceOperator Normal - HiLink straceSpecialChar Special - HiLink straceOtherPID PreProc +hi def link straceComment Comment +hi def link straceVerbosed Comment +hi def link stracePID PreProc +hi def link straceNumber Number +hi def link straceNumberRHS Type +hi def link straceOtherRHS Type +hi def link straceString String +hi def link straceConstant Function +hi def link straceEquals Type +hi def link straceSysCallEmbed straceSysCall +hi def link straceSysCall Statement +hi def link straceParenthesis Statement +hi def link straceOperator Normal +hi def link straceSpecialChar Special +hi def link straceOtherPID PreProc - delcommand HiLink -endif let b:current_syntax = "strace" diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim index 6536d6d11c..6239790f12 100644 --- a/runtime/syntax/svn.vim +++ b/runtime/syntax/svn.vim @@ -15,11 +15,8 @@ " Myk Taylor " Stefano Zacchiroli -" 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 @@ -42,28 +39,18 @@ syn sync clear syn sync match svnSync grouphere svnRegion "^--.*--$"me=s-1 " 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_svn_syn_inits") - if version <= 508 - let did_svn_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet. - HiLink svnSummary Keyword - HiLink svnBlank Error +hi def link svnSummary Keyword +hi def link svnBlank Error - HiLink svnRegion Comment - HiLink svnDelimiter NonText - HiLink svnRemoved Constant - HiLink svnAdded Identifier - HiLink svnModified Special - HiLink svnProperty Special - HiLink svnRenamed Special +hi def link svnRegion Comment +hi def link svnDelimiter NonText +hi def link svnRemoved Constant +hi def link svnAdded Identifier +hi def link svnModified Special +hi def link svnProperty Special +hi def link svnRenamed Special - delcommand HiLink -endif let b:current_syntax = "svn" diff --git a/runtime/syntax/systemverilog.vim b/runtime/syntax/systemverilog.vim index 5bf2935078..f99ea8d889 100644 --- a/runtime/syntax/systemverilog.vim +++ b/runtime/syntax/systemverilog.vim @@ -3,21 +3,14 @@ " Maintainer: kocha <kocha.lsifrontend@gmail.com> " Last Change: 12-Aug-2013. -" 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 " Read in Verilog syntax files -if version < 600 - so <sfile>:p:h/verilog.vim -else - runtime! syntax/verilog.vim - unlet b:current_syntax -endif +runtime! syntax/verilog.vim +unlet b:current_syntax " IEEE1800-2005 syn keyword systemverilogStatement always_comb always_ff always_latch @@ -76,25 +69,16 @@ syn keyword systemverilogStatement implements syn keyword systemverilogStatement interconnect soft nettype " Define the default highlighting. -if version >= 508 || !exists("did_systemverilog_syn_inits") - if version < 508 - let did_systemverilog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - " The default highlighting. - HiLink systemverilogStatement Statement - HiLink systemverilogTypeDef TypeDef - HiLink systemverilogConditional Conditional - HiLink systemverilogRepeat Repeat - HiLink systemverilogLabel Label - HiLink systemverilogGlobal Define - HiLink systemverilogNumber Number +" The default highlighting. +hi def link systemverilogStatement Statement +hi def link systemverilogTypeDef TypeDef +hi def link systemverilogConditional Conditional +hi def link systemverilogRepeat Repeat +hi def link systemverilogLabel Label +hi def link systemverilogGlobal Define +hi def link systemverilogNumber Number - delcommand HiLink -endif let b:current_syntax = "systemverilog" diff --git a/runtime/syntax/tads.vim b/runtime/syntax/tads.vim index 260ff360f7..23a65b99ec 100644 --- a/runtime/syntax/tads.vim +++ b/runtime/syntax/tads.vim @@ -13,11 +13,8 @@ " Actually, should cvtstr etc. be functions?! (change tadsFunction) " Make global etc. into Identifiers, since we don't have regular variables? -" 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 @@ -122,57 +119,47 @@ endif execute "syn sync maxlines=" . tads_sync_dist " 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_tads_syn_inits") - if version < 508 - let did_tads_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - HiLink tadsFunctionDef Function - HiLink tadsFunction Structure - HiLink tadsClass Structure - HiLink tadsClassDef Identifier - HiLink tadsObjectDef Identifier +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link tadsFunctionDef Function +hi def link tadsFunction Structure +hi def link tadsClass Structure +hi def link tadsClassDef Identifier +hi def link tadsObjectDef Identifier " no highlight for tadsEmbedded, so it prints as normal text w/in the string - HiLink tadsOperator Operator - HiLink tadsStructure Structure - HiLink tadsTodo Todo - HiLink tadsLabel Label - HiLink tadsConditional Conditional - HiLink tadsRepeat Repeat - HiLink tadsException Exception - HiLink tadsStatement Statement - HiLink tadsStorageClass StorageClass - HiLink tadsKeyWord Keyword - HiLink tadsSpecial SpecialChar - HiLink tadsNumber Number - HiLink tadsBoolean Boolean - HiLink tadsDoubleString tadsString - HiLink tadsSingleString tadsString - - HiLink tadsOctalError tadsError - HiLink tadsCommentError tadsError - HiLink tadsBraceError tadsError - HiLink tadsInBrace tadsError - HiLink tadsError Error - - HiLink tadsInclude Include - HiLink tadsPreProc PreProc - HiLink tadsDefine Macro - HiLink tadsIncluded tadsString - HiLink tadsPreCondit PreCondit - - HiLink tadsString String - HiLink tadsComment Comment - - delcommand HiLink -endif +hi def link tadsOperator Operator +hi def link tadsStructure Structure +hi def link tadsTodo Todo +hi def link tadsLabel Label +hi def link tadsConditional Conditional +hi def link tadsRepeat Repeat +hi def link tadsException Exception +hi def link tadsStatement Statement +hi def link tadsStorageClass StorageClass +hi def link tadsKeyWord Keyword +hi def link tadsSpecial SpecialChar +hi def link tadsNumber Number +hi def link tadsBoolean Boolean +hi def link tadsDoubleString tadsString +hi def link tadsSingleString tadsString + +hi def link tadsOctalError tadsError +hi def link tadsCommentError tadsError +hi def link tadsBraceError tadsError +hi def link tadsInBrace tadsError +hi def link tadsError Error + +hi def link tadsInclude Include +hi def link tadsPreProc PreProc +hi def link tadsDefine Macro +hi def link tadsIncluded tadsString +hi def link tadsPreCondit PreCondit + +hi def link tadsString String +hi def link tadsComment Comment + let b:current_syntax = "tads" diff --git a/runtime/syntax/tags.vim b/runtime/syntax/tags.vim index c86f17a618..3980f84a30 100644 --- a/runtime/syntax/tags.vim +++ b/runtime/syntax/tags.vim @@ -1,14 +1,11 @@ " Language: tags " Maintainer: Charles E. Campbell <NdrOchip@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 4 +" Last Change: Aug 31, 2016 +" Version: 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TAGS -" 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 @@ -22,24 +19,15 @@ syn match tagComment "^!_TAG_.*$" syn match tagField contained "[a-z]*:" " 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_drchip_tags_inits") - if version < 508 - let did_drchip_tags_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +if !exists("skip_drchip_tags_inits") - HiLink tagBaseFile PreProc - HiLink tagComment Comment - HiLink tagDelim Delimiter - HiLink tagField Number - HiLink tagName Identifier - HiLink tagPath PreProc + hi def link tagBaseFile PreProc + hi def link tagComment Comment + hi def link tagDelim Delimiter + hi def link tagField Number + hi def link tagName Identifier + hi def link tagPath PreProc - delcommand HiLink endif let b:current_syntax = "tags" diff --git a/runtime/syntax/tak.vim b/runtime/syntax/tak.vim index 20186db143..7a8fceb860 100644 --- a/runtime/syntax/tak.vim +++ b/runtime/syntax/tak.vim @@ -8,11 +8,8 @@ -" 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 @@ -32,11 +29,7 @@ syn case ignore let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -95,40 +88,30 @@ endif " 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_tak_syntax_inits") - if version < 508 - let did_tak_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink takMacro Macro - HiLink takOptions Special - HiLink takRoutine Type - HiLink takControl Special - HiLink takSolids Special - HiLink takSolidsArg Statement - HiLink takIdentifier Identifier - - HiLink takFortran PreProc - HiLink takMotran PreProc - - HiLink takComment Comment - HiLink takHeader Typedef - HiLink takIncludeFile Type - HiLink takInteger Number - HiLink takFloat Float - HiLink takScientific Float - - HiLink takEndData Macro - - HiLink takTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link takMacro Macro +hi def link takOptions Special +hi def link takRoutine Type +hi def link takControl Special +hi def link takSolids Special +hi def link takSolidsArg Statement +hi def link takIdentifier Identifier + +hi def link takFortran PreProc +hi def link takMotran PreProc + +hi def link takComment Comment +hi def link takHeader Typedef +hi def link takIncludeFile Type +hi def link takInteger Number +hi def link takFloat Float +hi def link takScientific Float + +hi def link takEndData Macro + +hi def link takTodo Todo + let b:current_syntax = "tak" diff --git a/runtime/syntax/takcmp.vim b/runtime/syntax/takcmp.vim index a94609b325..9426e02223 100644 --- a/runtime/syntax/takcmp.vim +++ b/runtime/syntax/takcmp.vim @@ -8,11 +8,8 @@ -" 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 @@ -51,30 +48,20 @@ syn case ignore " 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_takcmp_syntax_inits") - if version < 508 - let did_takcmp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink takcmpTitle Type - HiLink takcmpUnit PreProc +hi def link takcmpTitle Type +hi def link takcmpUnit PreProc - HiLink takcmpLabel Statement +hi def link takcmpLabel Statement - HiLink takcmpHeader takHeader +hi def link takcmpHeader takHeader - HiLink takcmpDate Identifier - HiLink takcmpTime Identifier - HiLink takcmpInteger Number - HiLink takcmpFloat Special +hi def link takcmpDate Identifier +hi def link takcmpTime Identifier +hi def link takcmpInteger Number +hi def link takcmpFloat Special - delcommand HiLink -endif let b:current_syntax = "takcmp" diff --git a/runtime/syntax/takout.vim b/runtime/syntax/takout.vim index 774353942a..5e5d360767 100644 --- a/runtime/syntax/takout.vim +++ b/runtime/syntax/takout.vim @@ -8,11 +8,8 @@ -" 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 @@ -24,11 +21,7 @@ syn case match " Load TAK syntax file -if version < 600 - source <sfile>:p:h/tak.vim -else - runtime! syntax/tak.vim -endif +runtime! syntax/tak.vim unlet b:current_syntax @@ -70,31 +63,21 @@ syn match takoutError "<<< Error >>>" " 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_takout_syntax_inits") - if version < 508 - let did_takout_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink takoutPos Statement - HiLink takoutNeg PreProc - HiLink takoutTitle Type - HiLink takoutFile takIncludeFile - HiLink takoutInteger takInteger - - HiLink takoutSectionDelim Delimiter - HiLink takoutSectionTitle Exception - HiLink takoutHeaderDelim SpecialComment - HiLink takoutLabel Identifier - - HiLink takoutError Error - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link takoutPos Statement +hi def link takoutNeg PreProc +hi def link takoutTitle Type +hi def link takoutFile takIncludeFile +hi def link takoutInteger takInteger + +hi def link takoutSectionDelim Delimiter +hi def link takoutSectionTitle Exception +hi def link takoutHeaderDelim SpecialComment +hi def link takoutLabel Identifier + +hi def link takoutError Error + let b:current_syntax = "takout" diff --git a/runtime/syntax/taskdata.vim b/runtime/syntax/taskdata.vim index b37c70cc1f..63a8284adf 100644 --- a/runtime/syntax/taskdata.vim +++ b/runtime/syntax/taskdata.vim @@ -4,11 +4,8 @@ " Updated: Wed Jul 8 19:46:20 EDT 2009 -" 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 diff --git a/runtime/syntax/taskedit.vim b/runtime/syntax/taskedit.vim index 170153c0ee..d33ca78650 100644 --- a/runtime/syntax/taskedit.vim +++ b/runtime/syntax/taskedit.vim @@ -4,11 +4,8 @@ " Updated: Wed Jul 8 19:46:32 EDT 2009 -" 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 diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim index 2f8559610e..c9fc8186d0 100644 --- a/runtime/syntax/tasm.vim +++ b/runtime/syntax/tasm.vim @@ -3,11 +3,8 @@ " Maintaner: FooLman of United Force <foolman@bigfoot.com> " Last Change: 2012 Feb 03 by Thilo Six -" 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 @@ -95,32 +92,22 @@ syn match tasmOct "\<[0-7]\+O\>" syn match tasmBin "\<[01]\+B\>" " 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_tasm_syntax_inits") - if version < 508 - let did_tasm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink tasmString String - HiLink tasmDec Number - HiLink tasmHex Number - HiLink tasmOct Number - HiLink tasmBin Number - HiLink tasmInstruction Keyword - HiLink tasmCoprocInstr Keyword - HiLink tasmMMXInst Keyword - HiLink tasmDirective PreProc - HiLink tasmRegister Identifier - HiLink tasmProctype PreProc - HiLink tasmComment Comment - HiLink tasmLabel Label +hi def link tasmString String +hi def link tasmDec Number +hi def link tasmHex Number +hi def link tasmOct Number +hi def link tasmBin Number +hi def link tasmInstruction Keyword +hi def link tasmCoprocInstr Keyword +hi def link tasmMMXInst Keyword +hi def link tasmDirective PreProc +hi def link tasmRegister Identifier +hi def link tasmProctype PreProc +hi def link tasmComment Comment +hi def link tasmLabel Label - delcommand HiLink -endif let b:curret_syntax = "tasm" diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim index 06629d077f..64efd6fec4 100644 --- a/runtime/syntax/tcl.vim +++ b/runtime/syntax/tcl.vim @@ -10,11 +10,8 @@ " Version: 1.14 " URL: http://bitbucket.org/taylor_venable/metasyntax/src/tip/Config/vim/syntax/tcl.vim -" 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 @@ -238,49 +235,39 @@ syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo "syn sync ccomment tclComment " 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_tcl_syntax_inits") - if version < 508 - let did_tcl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tcltkSwitch Special - HiLink tclExpand Special - HiLink tclLabel Label - HiLink tclConditional Conditional - HiLink tclRepeat Repeat - HiLink tclNumber Number - HiLink tclError Error - HiLink tclCommand Statement - HiLink tclProcCommand Type - HiLink tclString String - HiLink tclComment Comment - HiLink tclSpecial Special - HiLink tclTodo Todo - " Below here are the commands and their options. - HiLink tcltkCommandColor Statement - HiLink tcltkWidgetColor Structure - HiLink tclLineContinue WarningMsg +" Only when an item doesn't have highlighting yet + +hi def link tcltkSwitch Special +hi def link tclExpand Special +hi def link tclLabel Label +hi def link tclConditional Conditional +hi def link tclRepeat Repeat +hi def link tclNumber Number +hi def link tclError Error +hi def link tclCommand Statement +hi def link tclProcCommand Type +hi def link tclString String +hi def link tclComment Comment +hi def link tclSpecial Special +hi def link tclTodo Todo +" Below here are the commands and their options. +hi def link tcltkCommandColor Statement +hi def link tcltkWidgetColor Structure +hi def link tclLineContinue WarningMsg if exists('g:tcl_warn_continuation') - HiLink tclNotLineContinue ErrorMsg -endif - HiLink tcltkStringSwitch Special - HiLink tcltkArraySwitch Special - HiLink tcltkLsortSwitch Special - HiLink tcltkPackSwitch Special - HiLink tcltkPackConfSwitch Special - HiLink tcltkMaths Special - HiLink tcltkNamespaceSwitch Special - HiLink tcltkWidgetSwitch Special - HiLink tcltkPackConfColor Identifier - HiLink tclVarRef Identifier - - delcommand HiLink +hi def link tclNotLineContinue ErrorMsg endif +hi def link tcltkStringSwitch Special +hi def link tcltkArraySwitch Special +hi def link tcltkLsortSwitch Special +hi def link tcltkPackSwitch Special +hi def link tcltkPackConfSwitch Special +hi def link tcltkMaths Special +hi def link tcltkNamespaceSwitch Special +hi def link tcltkWidgetSwitch Special +hi def link tcltkPackConfColor Identifier +hi def link tclVarRef Identifier + let b:current_syntax = "tcl" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index c0982d84da..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 <NdrchipO@ScampbellPfamily.AbizM> -" 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 @@ -40,29 +40,14 @@ " 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 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 -if version >= 508 || !exists("did_tex_syntax_inits") - let did_tex_syntax_inits = 1 - if version < 508 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif -endif - " by default, enable all region-based highlighting let s:tex_fast= "bcmMprsSvV" if exists("g:tex_fast") @@ -414,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 @@ -598,27 +583,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 @@ -1279,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 diff --git a/runtime/syntax/texinfo.vim b/runtime/syntax/texinfo.vim index 134fc6763c..a4b7689707 100644 --- a/runtime/syntax/texinfo.vim +++ b/runtime/syntax/texinfo.vim @@ -9,10 +9,8 @@ " since @ can have special meanings, everything is 'match'-ed and 'region'-ed " (including @ in 'iskeyword' option has unexpected effects) -" Remove any old syntax stuff hanging around, if needed -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -356,48 +354,37 @@ syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd "============================================================================== " 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_texinfo_syn_inits") - - if version < 508 - let did_texinfo_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink texinfoSpecialChar Special - HiLink texinfoHFSpecialChar Special - - HiLink texinfoError Error - HiLink texinfoIdent Identifier - HiLink texinfoAssignment Identifier - HiLink texinfoSinglePar Identifier - HiLink texinfoIndexPar Identifier - HiLink texinfoSIPar Identifier - HiLink texinfoDIEPar Identifier - HiLink texinfoTexCmd PreProc - - - HiLink texinfoAtCmd Statement "@-command - HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters - "is String because is found as a region and is 'matchgroup'-ed - "to texinfoAtCmd - HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) - "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd - HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands - HiLink texinfoMltlnAtCmd String "@-command in multiple lines - "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd - HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) - HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) - HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) - HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) - - HiLink texinfoComment Comment - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link texinfoSpecialChar Special +hi def link texinfoHFSpecialChar Special + +hi def link texinfoError Error +hi def link texinfoIdent Identifier +hi def link texinfoAssignment Identifier +hi def link texinfoSinglePar Identifier +hi def link texinfoIndexPar Identifier +hi def link texinfoSIPar Identifier +hi def link texinfoDIEPar Identifier +hi def link texinfoTexCmd PreProc + + +hi def link texinfoAtCmd Statement "@-command +hi def link texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters + "is String because is found as a region and is 'matchgroup'-ed + "to texinfoAtCmd +hi def link texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd +hi def link texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands +hi def link texinfoMltlnAtCmd String "@-command in multiple lines + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd +hi def link texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) +hi def link texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) +hi def link texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) +hi def link texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) + +hi def link texinfoComment Comment + let b:current_syntax = "texinfo" diff --git a/runtime/syntax/texmf.vim b/runtime/syntax/texmf.vim index 7b91168f08..d1268faff7 100644 --- a/runtime/syntax/texmf.vim +++ b/runtime/syntax/texmf.vim @@ -6,12 +6,9 @@ " URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -45,42 +42,33 @@ syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLB syn match texmfBraceError "}" " Define the default highlighting -if version >= 508 || !exists("did_texmf_syntax_inits") - if version < 508 - let did_texmf_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink texmfComment Comment - HiLink texmfTodo Todo +hi def link texmfComment Comment +hi def link texmfTodo Todo - HiLink texmfPassedParameter texmfVariable - HiLink texmfVariable Identifier +hi def link texmfPassedParameter texmfVariable +hi def link texmfVariable Identifier - HiLink texmfNumber Number - HiLink texmfString String +hi def link texmfNumber Number +hi def link texmfString String - HiLink texmfLHSStart texmfLHS - HiLink texmfLHSVariable texmfLHS - HiLink texmfLHSDot texmfLHS - HiLink texmfLHS Type +hi def link texmfLHSStart texmfLHS +hi def link texmfLHSVariable texmfLHS +hi def link texmfLHSDot texmfLHS +hi def link texmfLHS Type - HiLink texmfEquals Normal +hi def link texmfEquals Normal - HiLink texmfBraceBrace texmfDelimiter - HiLink texmfComma texmfDelimiter - HiLink texmfColons texmfDelimiter - HiLink texmfDelimiter Preproc +hi def link texmfBraceBrace texmfDelimiter +hi def link texmfComma texmfDelimiter +hi def link texmfColons texmfDelimiter +hi def link texmfDelimiter Preproc - HiLink texmfDoubleExclam Statement - HiLink texmfSpecial Special +hi def link texmfDoubleExclam Statement +hi def link texmfSpecial Special - HiLink texmfBraceError texmfError - HiLink texmfError Error +hi def link texmfBraceError texmfError +hi def link texmfError Error - delcommand HiLink -endif let b:current_syntax = "texmf" diff --git a/runtime/syntax/tf.vim b/runtime/syntax/tf.vim index 2a9a999883..47775b8637 100644 --- a/runtime/syntax/tf.vim +++ b/runtime/syntax/tf.vim @@ -9,11 +9,8 @@ " Remove any old syntax stuff hanging around -" 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 @@ -161,44 +158,34 @@ else endif " 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_tf_syn_inits") - if version < 508 - let did_tf_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tfComment Comment - HiLink tfString String - HiLink tfNumber Number - HiLink tfFloat Float - HiLink tfIdentifier Identifier - HiLink tfVar Identifier - HiLink tfWorld Identifier - HiLink tfReadonly Identifier - HiLink tfHook Identifier - HiLink tfFunctions Function - HiLink tfRepeat Repeat - HiLink tfConditional Conditional - HiLink tfLabel Label - HiLink tfStatement Statement - HiLink tfType Type - HiLink tfInclude Include - HiLink tfDefine Define - HiLink tfSpecialChar SpecialChar - HiLink tfSpecialCharEsc SpecialChar - HiLink tfParentError Error - HiLink tfTodo Todo - HiLink tfEndCommand Delimiter - HiLink tfJoinLines Delimiter - HiLink tfOperator Operator - HiLink tfRelation Operator - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tfComment Comment +hi def link tfString String +hi def link tfNumber Number +hi def link tfFloat Float +hi def link tfIdentifier Identifier +hi def link tfVar Identifier +hi def link tfWorld Identifier +hi def link tfReadonly Identifier +hi def link tfHook Identifier +hi def link tfFunctions Function +hi def link tfRepeat Repeat +hi def link tfConditional Conditional +hi def link tfLabel Label +hi def link tfStatement Statement +hi def link tfType Type +hi def link tfInclude Include +hi def link tfDefine Define +hi def link tfSpecialChar SpecialChar +hi def link tfSpecialCharEsc SpecialChar +hi def link tfParentError Error +hi def link tfTodo Todo +hi def link tfEndCommand Delimiter +hi def link tfJoinLines Delimiter +hi def link tfOperator Operator +hi def link tfRelation Operator + let b:current_syntax = "tf" diff --git a/runtime/syntax/tli.vim b/runtime/syntax/tli.vim index 5685a6cbf2..b96d4a2119 100644 --- a/runtime/syntax/tli.vim +++ b/runtime/syntax/tli.vim @@ -4,11 +4,8 @@ " Last Change: 2001 May 10 " Version: 1.0 -" 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 @@ -44,27 +41,17 @@ syn match tliComment "#.*" syn case match " 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_tli_syntax_inits") - if version < 508 - let did_tli_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tliNumber Number - HiLink tliString String - HiLink tliComment Comment - HiLink tliSpecial SpecialChar - HiLink tliIdentifier Identifier - HiLink tliObject Statement - HiLink tliField Type - HiLink tliStyle PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tliNumber Number +hi def link tliString String +hi def link tliComment Comment +hi def link tliSpecial SpecialChar +hi def link tliIdentifier Identifier +hi def link tliObject Statement +hi def link tliField Type +hi def link tliStyle PreProc + let b:current_syntax = "tli" diff --git a/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim index 050a2ba78d..1244b97f08 100644 --- a/runtime/syntax/tpp.vim +++ b/runtime/syntax/tpp.vim @@ -17,11 +17,8 @@ " the latest version of this file. " SPAM is _NOT_ welcome - be ready to be reported! -" 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 @@ -51,11 +48,7 @@ syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" if main_syntax != 'sh' " shell command - if version < 600 - syn include @tppShExec <sfile>:p:h/sh.vim - else - syn include @tppShExec syntax/sh.vim - endif + syn include @tppShExec syntax/sh.vim unlet b:current_syntax syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec @@ -65,35 +58,25 @@ endif syn match tppComment "^--##.*$" " 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_tpp_syn_inits") - if version < 508 - let did_tpp_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink tppAbstractOptionKey Special - HiLink tppPageLocalOptionKey Keyword - HiLink tppPageLocalSwitchKey Keyword - HiLink tppColorOptionKey Keyword - HiLink tppTimeOptionKey Comment - HiLink tppNewPageOptionKey PreProc - HiLink tppString String - HiLink tppColor String - HiLink tppTime Number - HiLink tppComment Comment - HiLink tppAbstractOption Error - HiLink tppPageLocalOption Error - HiLink tppPageLocalSwitch Error - HiLink tppColorOption Error - HiLink tppNewPageOption Error - HiLink tppTimeOption Error +hi def link tppAbstractOptionKey Special +hi def link tppPageLocalOptionKey Keyword +hi def link tppPageLocalSwitchKey Keyword +hi def link tppColorOptionKey Keyword +hi def link tppTimeOptionKey Comment +hi def link tppNewPageOptionKey PreProc +hi def link tppString String +hi def link tppColor String +hi def link tppTime Number +hi def link tppComment Comment +hi def link tppAbstractOption Error +hi def link tppPageLocalOption Error +hi def link tppPageLocalSwitch Error +hi def link tppColorOption Error +hi def link tppNewPageOption Error +hi def link tppTimeOption Error - delcommand HiLink -endif let b:current_syntax = "tpp" diff --git a/runtime/syntax/trasys.vim b/runtime/syntax/trasys.vim index cfecc1c1fd..d52b5eeb47 100644 --- a/runtime/syntax/trasys.vim +++ b/runtime/syntax/trasys.vim @@ -8,11 +8,8 @@ -" 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 @@ -21,11 +18,7 @@ endif let fortran_free_source=1 " Load FORTRAN syntax file -if version < 600 - source <sfile>:p:h/fortran.vim -else - runtime! syntax/fortran.vim -endif +runtime! syntax/fortran.vim unlet b:current_syntax @@ -136,40 +129,30 @@ syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" " 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_trasys_syntax_inits") - if version < 508 - let did_trasys_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink trasysOptions Special - HiLink trasysSurface Special - HiLink trasysSurfaceType Constant - HiLink trasysSurfaceArgs Constant - HiLink trasysArgs Constant - HiLink trasysOperations Statement - HiLink trasysSubRoutine Statement - HiLink trassyPrcsrSegm PreProc - HiLink trasysIdentifier Identifier - HiLink trasysComment Comment - HiLink trasysHeader Typedef - HiLink trasysMacro Macro - HiLink trasysInteger Number - HiLink trasysFloat Float - HiLink trasysScientific Float - - HiLink trasysBlank SpecialChar - - HiLink trasysEndData Macro - - HiLink trasysTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link trasysOptions Special +hi def link trasysSurface Special +hi def link trasysSurfaceType Constant +hi def link trasysSurfaceArgs Constant +hi def link trasysArgs Constant +hi def link trasysOperations Statement +hi def link trasysSubRoutine Statement +hi def link trassyPrcsrSegm PreProc +hi def link trasysIdentifier Identifier +hi def link trasysComment Comment +hi def link trasysHeader Typedef +hi def link trasysMacro Macro +hi def link trasysInteger Number +hi def link trasysFloat Float +hi def link trasysScientific Float + +hi def link trasysBlank SpecialChar + +hi def link trasysEndData Macro + +hi def link trasysTodo Todo + let b:current_syntax = "trasys" diff --git a/runtime/syntax/trustees.vim b/runtime/syntax/trustees.vim index 4bc8874772..6c58d3983d 100644 --- a/runtime/syntax/trustees.vim +++ b/runtime/syntax/trustees.vim @@ -3,9 +3,8 @@ " Maintainer: Nima Talebi <nima@it.net.au> " Last Change: 2005-10-12 -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 diff --git a/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim index 887d6b75e7..8dd2a24df9 100644 --- a/runtime/syntax/tsalt.vim +++ b/runtime/syntax/tsalt.vim @@ -4,11 +4,8 @@ " Last Change: 2012 Feb 03 by Thilo Six " Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 -" 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 @@ -171,46 +168,36 @@ syn sync ccomment tsaltComment " 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_tsalt_syntax_inits") - if version < 508 - let did_tsalt_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tsaltFunction Statement - HiLink tsaltSysVar Type - "HiLink tsaltLibFunc UserDefFunc - "HiLink tsaltConstants Type - "HiLink tsaltFuncArg Type - "HiLink tsaltOperator Operator - "HiLink tsaltLabel Label - "HiLink tsaltUserLabel Label - HiLink tsaltConditional Conditional - HiLink tsaltRepeat Repeat - HiLink tsaltCharacter SpecialChar - HiLink tsaltSpecialCharacter SpecialChar - HiLink tsaltNumber Number - HiLink tsaltFloat Float - HiLink tsaltCommentError tsaltError - HiLink tsaltInclude Include - HiLink tsaltPreProc PreProc - HiLink tsaltDefine Macro - HiLink tsaltIncluded tsaltString - HiLink tsaltError Error - HiLink tsaltStatement Statement - HiLink tsaltPreCondit PreCondit - HiLink tsaltType Type - HiLink tsaltString String - HiLink tsaltComment Comment - HiLink tsaltSpecial Special - HiLink tsaltTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tsaltFunction Statement +hi def link tsaltSysVar Type +"hi def link tsaltLibFunc UserDefFunc +"hi def link tsaltConstants Type +"hi def link tsaltFuncArg Type +"hi def link tsaltOperator Operator +"hi def link tsaltLabel Label +"hi def link tsaltUserLabel Label +hi def link tsaltConditional Conditional +hi def link tsaltRepeat Repeat +hi def link tsaltCharacter SpecialChar +hi def link tsaltSpecialCharacter SpecialChar +hi def link tsaltNumber Number +hi def link tsaltFloat Float +hi def link tsaltCommentError tsaltError +hi def link tsaltInclude Include +hi def link tsaltPreProc PreProc +hi def link tsaltDefine Macro +hi def link tsaltIncluded tsaltString +hi def link tsaltError Error +hi def link tsaltStatement Statement +hi def link tsaltPreCondit PreCondit +hi def link tsaltType Type +hi def link tsaltString String +hi def link tsaltComment Comment +hi def link tsaltSpecial Special +hi def link tsaltTodo Todo + let b:current_syntax = "tsalt" diff --git a/runtime/syntax/tsscl.vim b/runtime/syntax/tsscl.vim index 3fc18c6847..fd2a5e2ba9 100644 --- a/runtime/syntax/tsscl.vim +++ b/runtime/syntax/tsscl.vim @@ -8,11 +8,8 @@ -" 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 @@ -179,37 +176,27 @@ syn match tssclScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " 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_tsscl_syntax_inits") - if version < 508 - let did_tsscl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssclCommand Statement - HiLink tssclKeyword Special - HiLink tssclEnd Macro - HiLink tssclUnits Special - - HiLink tssclComment Comment - HiLink tssclDirective Statement - HiLink tssclConditional Conditional - HiLink tssclContChar Macro - HiLink tssclQualifier Typedef - HiLink tssclSymbol Identifier - HiLink tssclSymbol2 Symbol - HiLink tssclString String - HiLink tssclOper Operator - - HiLink tssclInteger Number - HiLink tssclFloat Number - HiLink tssclScientific Number - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tssclCommand Statement +hi def link tssclKeyword Special +hi def link tssclEnd Macro +hi def link tssclUnits Special + +hi def link tssclComment Comment +hi def link tssclDirective Statement +hi def link tssclConditional Conditional +hi def link tssclContChar Macro +hi def link tssclQualifier Typedef +hi def link tssclSymbol Identifier +hi def link tssclSymbol2 Symbol +hi def link tssclString String +hi def link tssclOper Operator + +hi def link tssclInteger Number +hi def link tssclFloat Number +hi def link tssclScientific Number + let b:current_syntax = "tsscl" diff --git a/runtime/syntax/tssgm.vim b/runtime/syntax/tssgm.vim index b8182d48ea..8ca7962e81 100644 --- a/runtime/syntax/tssgm.vim +++ b/runtime/syntax/tssgm.vim @@ -8,11 +8,8 @@ -" 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 @@ -75,35 +72,25 @@ syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " 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_tssgm_syntax_inits") - if version < 508 - let did_tssgm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssgmParam Statement - HiLink tssgmSurfType Type - HiLink tssgmArgs Special - HiLink tssgmDelim Typedef - HiLink tssgmEnd Macro - HiLink tssgmUnits Special - - HiLink tssgmDefault SpecialComment - HiLink tssgmComment Statement - HiLink tssgmCommentString Comment - HiLink tssgmSurfIdent Identifier - HiLink tssgmString Delimiter - - HiLink tssgmInteger Number - HiLink tssgmFloat Float - HiLink tssgmScientific Float - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tssgmParam Statement +hi def link tssgmSurfType Type +hi def link tssgmArgs Special +hi def link tssgmDelim Typedef +hi def link tssgmEnd Macro +hi def link tssgmUnits Special + +hi def link tssgmDefault SpecialComment +hi def link tssgmComment Statement +hi def link tssgmCommentString Comment +hi def link tssgmSurfIdent Identifier +hi def link tssgmString Delimiter + +hi def link tssgmInteger Number +hi def link tssgmFloat Float +hi def link tssgmScientific Float + let b:current_syntax = "tssgm" diff --git a/runtime/syntax/tssop.vim b/runtime/syntax/tssop.vim index d416df054c..6a775b2358 100644 --- a/runtime/syntax/tssop.vim +++ b/runtime/syntax/tssop.vim @@ -8,11 +8,8 @@ -" 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 @@ -56,30 +53,20 @@ syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" " 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_tssop_syntax_inits") - if version < 508 - let did_tssop_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink tssopParam Statement - HiLink tssopProp Identifier - HiLink tssopArgs Special - - HiLink tssopComment Statement - HiLink tssopCommentString Comment - HiLink tssopPropName Typedef - - HiLink tssopInteger Number - HiLink tssopFloat Float - HiLink tssopScientific Float - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link tssopParam Statement +hi def link tssopProp Identifier +hi def link tssopArgs Special + +hi def link tssopComment Statement +hi def link tssopCommentString Comment +hi def link tssopPropName Typedef + +hi def link tssopInteger Number +hi def link tssopFloat Float +hi def link tssopScientific Float + let b:current_syntax = "tssop" diff --git a/runtime/syntax/uc.vim b/runtime/syntax/uc.vim index 7eab1d48ae..90d33396c5 100644 --- a/runtime/syntax/uc.vim +++ b/runtime/syntax/uc.vim @@ -7,11 +7,8 @@ " Please check :help uc.vim for comments on some of the options available. -" 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 @@ -110,64 +107,54 @@ endif exec "syn sync ccomment ucComment minlines=" . uc_minlines " 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_uc_syntax_inits") - if version < 508 - let did_uc_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink ucFuncDef Conditional - HiLink ucEventDef Conditional - HiLink ucBraces Function - HiLink ucBranch Conditional - HiLink ucLabel Label - HiLink ucUserLabel Label - HiLink ucConditional Conditional - HiLink ucRepeat Repeat - HiLink ucStorageClass StorageClass - HiLink ucMethodDecl ucStorageClass - HiLink ucClassDecl ucStorageClass - HiLink ucScopeDecl ucStorageClass - HiLink ucBoolean Boolean - HiLink ucSpecial Special - HiLink ucSpecialError Error - HiLink ucSpecialCharError Error - HiLink ucString String - HiLink ucCharacter Character - HiLink ucSpecialChar SpecialChar - HiLink ucNumber Number - HiLink ucError Error - HiLink ucStringError Error - HiLink ucStatement Statement - HiLink ucOperator Operator - HiLink ucOverLoaded Operator - HiLink ucComment Comment - HiLink ucDocComment Comment - HiLink ucLineComment Comment - HiLink ucConstant ucBoolean - HiLink ucTypedef Typedef - HiLink ucTodo Todo - - HiLink ucCommentTitle SpecialComment - HiLink ucDocTags Special - HiLink ucDocParam Function - HiLink ucCommentStar ucComment - - HiLink ucType Type - HiLink ucExternal Include - - HiLink ucClassKeys Conditional - HiLink ucClassLabel Conditional - - HiLink htmlComment Special - HiLink htmlCommentPart Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link ucFuncDef Conditional +hi def link ucEventDef Conditional +hi def link ucBraces Function +hi def link ucBranch Conditional +hi def link ucLabel Label +hi def link ucUserLabel Label +hi def link ucConditional Conditional +hi def link ucRepeat Repeat +hi def link ucStorageClass StorageClass +hi def link ucMethodDecl ucStorageClass +hi def link ucClassDecl ucStorageClass +hi def link ucScopeDecl ucStorageClass +hi def link ucBoolean Boolean +hi def link ucSpecial Special +hi def link ucSpecialError Error +hi def link ucSpecialCharError Error +hi def link ucString String +hi def link ucCharacter Character +hi def link ucSpecialChar SpecialChar +hi def link ucNumber Number +hi def link ucError Error +hi def link ucStringError Error +hi def link ucStatement Statement +hi def link ucOperator Operator +hi def link ucOverLoaded Operator +hi def link ucComment Comment +hi def link ucDocComment Comment +hi def link ucLineComment Comment +hi def link ucConstant ucBoolean +hi def link ucTypedef Typedef +hi def link ucTodo Todo + +hi def link ucCommentTitle SpecialComment +hi def link ucDocTags Special +hi def link ucDocParam Function +hi def link ucCommentStar ucComment + +hi def link ucType Type +hi def link ucExternal Include + +hi def link ucClassKeys Conditional +hi def link ucClassLabel Conditional + +hi def link htmlComment Special +hi def link htmlCommentPart Special + let b:current_syntax = "uc" diff --git a/runtime/syntax/uil.vim b/runtime/syntax/uil.vim index b5421bcfdb..088a0f6c86 100644 --- a/runtime/syntax/uil.vim +++ b/runtime/syntax/uil.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Motif UIL (User Interface Language) " Maintainer: Thomas Koehler <jean-luc@picard.franken.de> -" Last Change: 2013 May 23 +" Please be aware: I'm often slow to answer email due to a high +" non-computer related workload (sometimes 4-8 weeks) +" Last Change: 2016 September 6 " URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/uil.vim -" 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 @@ -47,37 +47,27 @@ syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLin syn sync ccomment uilComment " 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_uil_syn_inits") - if version < 508 - let did_uil_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default highlighting. - HiLink uilCharacter uilString - HiLink uilSpecialCharacter uilSpecial - HiLink uilNumber uilString - HiLink uilCommentError uilError - HiLink uilInclude uilPreCondit - HiLink uilDefine uilPreCondit - HiLink uilIncluded uilString - HiLink uilSpecialFunction uilRessource - HiLink uilRessource Identifier - HiLink uilSpecialStatement Keyword - HiLink uilError Error - HiLink uilPreCondit PreCondit - HiLink uilType Type - HiLink uilString String - HiLink uilComment Comment - HiLink uilSpecial Special - HiLink uilTodo Todo +" The default highlighting. +hi def link uilCharacter uilString +hi def link uilSpecialCharacter uilSpecial +hi def link uilNumber uilString +hi def link uilCommentError uilError +hi def link uilInclude uilPreCondit +hi def link uilDefine uilPreCondit +hi def link uilIncluded uilString +hi def link uilSpecialFunction uilRessource +hi def link uilRessource Identifier +hi def link uilSpecialStatement Keyword +hi def link uilError Error +hi def link uilPreCondit PreCondit +hi def link uilType Type +hi def link uilString String +hi def link uilComment Comment +hi def link uilSpecial Special +hi def link uilTodo Todo - delcommand HiLink -endif let b:current_syntax = "uil" diff --git a/runtime/syntax/upstart.vim b/runtime/syntax/upstart.vim index b3f2b9e637..140cd174e0 100644 --- a/runtime/syntax/upstart.vim +++ b/runtime/syntax/upstart.vim @@ -10,9 +10,8 @@ " It is inspired by the initng syntax file and includes sh.vim to do the " highlighting of script blocks. -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 diff --git a/runtime/syntax/vb.vim b/runtime/syntax/vb.vim index 0c05b35fbd..8ddb1efac3 100644 --- a/runtime/syntax/vb.vim +++ b/runtime/syntax/vb.vim @@ -11,11 +11,8 @@ " VIM and VIM-DEV mailing lists. It is by no means complete. " Send comments, suggestions and requests to the maintainer. -" 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 @@ -338,40 +335,30 @@ syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1 " 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_vb_syntax_inits") - if version < 508 - let did_vb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink vbBoolean Boolean - HiLink vbLineNumber Comment - HiLink vbComment Comment - HiLink vbConditional Conditional - HiLink vbConst Constant - HiLink vbDefine Constant - HiLink vbError Error - HiLink vbFunction Identifier - HiLink vbIdentifier Identifier - HiLink vbNumber Number - HiLink vbFloat Float - HiLink vbMethods PreProc - HiLink vbOperator Operator - HiLink vbRepeat Repeat - HiLink vbString String - HiLink vbStatement Statement - HiLink vbKeyword Statement - HiLink vbEvents Special - HiLink vbTodo Todo - HiLink vbTypes Type - HiLink vbTypeSpecifier Type +hi def link vbBoolean Boolean +hi def link vbLineNumber Comment +hi def link vbComment Comment +hi def link vbConditional Conditional +hi def link vbConst Constant +hi def link vbDefine Constant +hi def link vbError Error +hi def link vbFunction Identifier +hi def link vbIdentifier Identifier +hi def link vbNumber Number +hi def link vbFloat Float +hi def link vbMethods PreProc +hi def link vbOperator Operator +hi def link vbRepeat Repeat +hi def link vbString String +hi def link vbStatement Statement +hi def link vbKeyword Statement +hi def link vbEvents Special +hi def link vbTodo Todo +hi def link vbTypes Type +hi def link vbTypeSpecifier Type - delcommand HiLink -endif let b:current_syntax = "vb" diff --git a/runtime/syntax/vera.vim b/runtime/syntax/vera.vim index b8e25cf346..b41c0a6cbf 100644 --- a/runtime/syntax/vera.vim +++ b/runtime/syntax/vera.vim @@ -10,11 +10,8 @@ " (change the value for guibg to any color you like) -" 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 @@ -287,74 +284,64 @@ endif exec "syn sync ccomment veraComment minlines=" . b:vera_minlines " 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_vera_syn_inits") - if version < 508 - let did_vera_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet + +hi def link veraClass Identifier +hi def link veraObject Identifier +hi def link veraUserMethod Function +hi def link veraTask Keyword +hi def link veraModifier Tag +hi def link veraDeprecated veraError +hi def link veraMethods Statement +" hi def link veraInterface Label +hi def link veraInterface Function + +hi def link veraFormat veraSpecial +hi def link veraCppString veraString +hi def link veraCommentL veraComment +hi def link veraCommentStart veraComment +hi def link veraLabel Label +hi def link veraUserLabel Label +hi def link veraConditional Conditional +hi def link veraRepeat Repeat +hi def link veraCharacter Character +hi def link veraSpecialCharacter veraSpecial +hi def link veraNumber Number +hi def link veraOctal Number +hi def link veraOctalZero PreProc " link this to Error if you want +hi def link veraFloat Float +hi def link veraOctalError veraError +hi def link veraParenError veraError +hi def link veraErrInParen veraError +hi def link veraErrInBracket veraError +hi def link veraCommentError veraError +hi def link veraCommentStartError veraError +hi def link veraSpaceError SpaceError +hi def link veraSpecialError veraError +hi def link veraOperator Operator +hi def link veraStructure Structure +hi def link veraInclude Include +hi def link veraPreProc PreProc +hi def link veraDefine Macro +hi def link veraIncluded veraString +hi def link veraError Error +hi def link veraStatement Statement +hi def link veraPreCondit PreCondit +hi def link veraType Type +" hi def link veraConstant Constant +hi def link veraConstant Keyword +hi def link veraUserConstant Constant +hi def link veraCommentString veraString +hi def link veraComment2String veraString +hi def link veraCommentSkip veraComment +hi def link veraString String +hi def link veraComment Comment +hi def link veraSpecial SpecialChar +hi def link veraTodo Todo +hi def link veraCppSkip veraCppOut +hi def link veraCppOut2 veraCppOut +hi def link veraCppOut Comment - HiLink veraClass Identifier - HiLink veraObject Identifier - HiLink veraUserMethod Function - HiLink veraTask Keyword - HiLink veraModifier Tag - HiLink veraDeprecated veraError - HiLink veraMethods Statement - " HiLink veraInterface Label - HiLink veraInterface Function - - HiLink veraFormat veraSpecial - HiLink veraCppString veraString - HiLink veraCommentL veraComment - HiLink veraCommentStart veraComment - HiLink veraLabel Label - HiLink veraUserLabel Label - HiLink veraConditional Conditional - HiLink veraRepeat Repeat - HiLink veraCharacter Character - HiLink veraSpecialCharacter veraSpecial - HiLink veraNumber Number - HiLink veraOctal Number - HiLink veraOctalZero PreProc " link this to Error if you want - HiLink veraFloat Float - HiLink veraOctalError veraError - HiLink veraParenError veraError - HiLink veraErrInParen veraError - HiLink veraErrInBracket veraError - HiLink veraCommentError veraError - HiLink veraCommentStartError veraError - HiLink veraSpaceError SpaceError - HiLink veraSpecialError veraError - HiLink veraOperator Operator - HiLink veraStructure Structure - HiLink veraInclude Include - HiLink veraPreProc PreProc - HiLink veraDefine Macro - HiLink veraIncluded veraString - HiLink veraError Error - HiLink veraStatement Statement - HiLink veraPreCondit PreCondit - HiLink veraType Type - " HiLink veraConstant Constant - HiLink veraConstant Keyword - HiLink veraUserConstant Constant - HiLink veraCommentString veraString - HiLink veraComment2String veraString - HiLink veraCommentSkip veraComment - HiLink veraString String - HiLink veraComment Comment - HiLink veraSpecial SpecialChar - HiLink veraTodo Todo - HiLink veraCppSkip veraCppOut - HiLink veraCppOut2 veraCppOut - HiLink veraCppOut Comment - - delcommand HiLink -endif let b:current_syntax = "vera" diff --git a/runtime/syntax/verilog.vim b/runtime/syntax/verilog.vim index f4d21d0739..bbaca491a7 100644 --- a/runtime/syntax/verilog.vim +++ b/runtime/syntax/verilog.vim @@ -3,22 +3,15 @@ " Maintainer: Mun Johl <Mun.Johl@emulex.com> " Last Update: Wed Jul 20 16:04:19 PDT 2011 -" 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 " Set the local value of the 'iskeyword' option. " NOTE: '?' was added so that verilogNumber would be processed correctly when " '?' is the last character of the number. -if version >= 600 - setlocal iskeyword=@,48-57,63,_,192-255 -else - set iskeyword=@,48-57,63,_,192-255 -endif +setlocal iskeyword=@,48-57,63,_,192-255 " A bunch of useful Verilog keywords @@ -102,34 +95,24 @@ syn region verilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s syn sync minlines=50 " 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_verilog_syn_inits") - if version < 508 - let did_verilog_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default highlighting. - HiLink verilogCharacter Character - HiLink verilogConditional Conditional - HiLink verilogRepeat Repeat - HiLink verilogString String - HiLink verilogTodo Todo - HiLink verilogComment Comment - HiLink verilogConstant Constant - HiLink verilogLabel Label - HiLink verilogNumber Number - HiLink verilogOperator Special - HiLink verilogStatement Statement - HiLink verilogGlobal Define - HiLink verilogDirective SpecialComment - HiLink verilogEscape Special - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link verilogCharacter Character +hi def link verilogConditional Conditional +hi def link verilogRepeat Repeat +hi def link verilogString String +hi def link verilogTodo Todo +hi def link verilogComment Comment +hi def link verilogConstant Constant +hi def link verilogLabel Label +hi def link verilogNumber Number +hi def link verilogOperator Special +hi def link verilogStatement Statement +hi def link verilogGlobal Define +hi def link verilogDirective SpecialComment +hi def link verilogEscape Special + let b:current_syntax = "verilog" diff --git a/runtime/syntax/verilogams.vim b/runtime/syntax/verilogams.vim index d16e4bffb4..7551b681a8 100644 --- a/runtime/syntax/verilogams.vim +++ b/runtime/syntax/verilogams.vim @@ -9,20 +9,13 @@ " Minor reserved keyword updates. " Last Update: Thursday September 15 15:36:03 CST 2005 -" 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 " Set the local value of the 'iskeyword' option -if version >= 600 - setlocal iskeyword=@,48-57,_,192-255 -else - set iskeyword=@,48-57,_,192-255 -endif +setlocal iskeyword=@,48-57,_,192-255 " Annex B.1 'All keywords' syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim @@ -113,36 +106,26 @@ syn match verilogamsEscape "\\\o\o\=\o\=" contained syn sync lines=50 " 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_verilogams_syn_inits") - if version < 508 - let did_verilogams_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - " The default highlighting. - HiLink verilogamsCharacter Character - HiLink verilogamsConditional Conditional - HiLink verilogamsRepeat Repeat - HiLink verilogamsString String - HiLink verilogamsTodo Todo - HiLink verilogamsComment Comment - HiLink verilogamsConstant Constant - HiLink verilogamsLabel Label - HiLink verilogamsNumber Number - HiLink verilogamsOperator Special - HiLink verilogamsStatement Statement - HiLink verilogamsGlobal Define - HiLink verilogamsDirective SpecialComment - HiLink verilogamsEscape Special - HiLink verilogamsType Type - HiLink verilogamsSystask Function +" The default highlighting. +hi def link verilogamsCharacter Character +hi def link verilogamsConditional Conditional +hi def link verilogamsRepeat Repeat +hi def link verilogamsString String +hi def link verilogamsTodo Todo +hi def link verilogamsComment Comment +hi def link verilogamsConstant Constant +hi def link verilogamsLabel Label +hi def link verilogamsNumber Number +hi def link verilogamsOperator Special +hi def link verilogamsStatement Statement +hi def link verilogamsGlobal Define +hi def link verilogamsDirective SpecialComment +hi def link verilogamsEscape Special +hi def link verilogamsType Type +hi def link verilogamsSystask Function - delcommand HiLink -endif let b:current_syntax = "verilogams" diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index 32503823ee..f4b11ff5dd 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -5,9 +5,8 @@ " Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> " Last Changed: 2016 Mar 05 by Daniel Kho -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 @@ -234,35 +233,25 @@ syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*" syn sync minlines=600 " 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_vhdl_syntax_inits") - if version < 508 - let did_vhdl_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink vhdlSpecial Special - HiLink vhdlStatement Statement - HiLink vhdlCharacter Character - HiLink vhdlString String - HiLink vhdlVector Number - HiLink vhdlBoolean Number - HiLink vhdlTodo Todo - HiLink vhdlFixme Fixme - HiLink vhdlComment Comment - HiLink vhdlNumber Number - HiLink vhdlTime Number - HiLink vhdlType Type - HiLink vhdlOperator Operator - HiLink vhdlError Error - HiLink vhdlAttribute Special - HiLink vhdlPreProc PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link vhdlSpecial Special +hi def link vhdlStatement Statement +hi def link vhdlCharacter Character +hi def link vhdlString String +hi def link vhdlVector Number +hi def link vhdlBoolean Number +hi def link vhdlTodo Todo +hi def link vhdlFixme Fixme +hi def link vhdlComment Comment +hi def link vhdlNumber Number +hi def link vhdlTime Number +hi def link vhdlType Type +hi def link vhdlOperator Operator +hi def link vhdlError Error +hi def link vhdlAttribute Special +hi def link vhdlPreProc PreProc + let b:current_syntax = "vhdl" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 91f70c6a1a..650f2e4a7b 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -139,8 +139,8 @@ syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}" syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimIsCommand "\<\h\w*\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" -syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" -syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" +syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" +syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn keyword vimCommand contained in " Insertions And Appends: insert append {{{2 @@ -772,171 +772,169 @@ syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" " Highlighting Settings {{{2 " ==================== -if !exists("g:vimsyn_noerror") - hi def link vimBehaveError vimError - hi def link vimCollClassErr vimError - hi def link vimErrSetting vimError - hi def link vimEmbedError vimError - hi def link vimFTError vimError - hi def link vimFunctionError vimError - hi def link vimFunc vimError - hi def link vimHiAttribList vimError - hi def link vimHiCtermError vimError - hi def link vimHiKeyError vimError - hi def link vimKeyCodeError vimError - hi def link vimMapModErr vimError - hi def link vimSubstFlagErr vimError - hi def link vimSynCaseError vimError - hi def link vimBufnrWarn vimWarn -endif - -hi def link vimAbb vimCommand -hi def link vimAddress vimMark -hi def link vimAugroupError vimError -hi def link vimAugroupKey vimCommand -hi def link vimAuHighlight vimHighlight -hi def link vimAutoCmdOpt vimOption -hi def link vimAutoCmd vimCommand -hi def link vimAutoEvent Type -hi def link nvimAutoEvent vimAutoEvent -hi def link vimAutoSet vimCommand -hi def link vimBehaveModel vimBehave -hi def link vimBehave vimCommand -hi def link vimBracket Delimiter -hi def link vimCmplxRepeat SpecialChar -hi def link vimCommand Statement -hi def link vimComment Comment -hi def link vimCommentString vimString -hi def link vimCommentTitle PreProc -hi def link vimCondHL vimCommand -hi def link vimContinue Special -hi def link vimCtrlChar SpecialChar -hi def link vimEchoHLNone vimGroup -hi def link vimEchoHL vimCommand -hi def link vimElseIfErr Error -hi def link vimElseif vimCondHL -hi def link vimEnvvar PreProc -hi def link vimError Error -hi def link vimFBVar vimVar -hi def link vimFgBgAttrib vimHiAttrib -hi def link vimFold Folded -hi def link vimFTCmd vimCommand -hi def link vimFTOption vimSynType -hi def link vimFuncKey vimCommand -hi def link vimFuncName Function -hi def link vimFuncSID Special -hi def link vimFuncVar Identifier -hi def link vimGroupAdd vimSynOption -hi def link vimGroupName vimGroup -hi def link vimGroupRem vimSynOption -hi def link vimGroupSpecial Special -hi def link vimGroup Type -hi def link vimHiAttrib PreProc -hi def link vimHiClear vimHighlight -hi def link vimHiCtermFgBg vimHiTerm -hi def link vimHiCTerm vimHiTerm -hi def link vimHighlight vimCommand -hi def link vimHiGroup vimGroupName -hi def link vimHiGuiFgBg vimHiTerm -hi def link vimHiGuiFont vimHiTerm -hi def link vimHiGuiRgb vimNumber -hi def link vimHiGui vimHiTerm -hi def link vimHiNmbr Number -hi def link vimHiStartStop vimHiTerm -hi def link vimHiTerm Type -hi def link vimHLGroup vimGroup -hi def link nvimHLGroup vimHLGroup -hi def link vimHLMod PreProc -hi def link vimInsert vimString -hi def link vimIskSep Delimiter -hi def link vimKeyCode vimSpecFile -hi def link vimKeyword Statement -hi def link vimLet vimCommand -hi def link vimLineComment vimComment -hi def link vimMapBang vimCommand -hi def link vimMapModKey vimFuncSID -hi def link vimMapMod vimBracket -hi def link vimMap vimCommand -hi def link nvimMap vimMap -hi def link vimMark Number -hi def link vimMarkNumber vimNumber -hi def link vimMenuMod vimMapMod -hi def link vimMenuNameMore vimMenuName -hi def link vimMenuName PreProc -hi def link vimMtchComment vimComment -hi def link vimNorm vimCommand -hi def link vimNotation Special -hi def link vimNotFunc vimCommand -hi def link vimNotPatSep vimString -hi def link vimNumber Number -hi def link vimOperError Error -hi def link vimOper Operator -hi def link vimOption PreProc -hi def link vimParenSep Delimiter -hi def link vimPatSepErr vimPatSep -hi def link vimPatSepR vimPatSep -hi def link vimPatSep SpecialChar -hi def link vimPatSepZone vimString -hi def link vimPatSepZ vimPatSep -hi def link vimPattern Type -hi def link vimPlainMark vimMark -hi def link vimPlainRegister vimRegister -hi def link vimRegister SpecialChar -hi def link vimScriptDelim Comment -hi def link vimSearchDelim Statement -hi def link vimSearch vimString -hi def link vimSep Delimiter -hi def link vimSetMod vimOption -hi def link vimSetSep Statement -hi def link vimSetString vimString -hi def link vimSpecFile Identifier -hi def link vimSpecFileMod vimSpecFile -hi def link vimSpecial Type -hi def link vimStatement Statement -hi def link vimStringCont vimString -hi def link vimString String -hi def link vimSubst1 vimSubst -hi def link vimSubstDelim Delimiter -hi def link vimSubstFlags Special -hi def link vimSubstSubstr SpecialChar -hi def link vimSubstTwoBS vimString -hi def link vimSubst vimCommand -hi def link vimSynCaseError Error -hi def link vimSynCase Type -hi def link vimSyncC Type -hi def link vimSyncError Error -hi def link vimSyncGroupName vimGroupName -hi def link vimSyncGroup vimGroupName -hi def link vimSyncKey Type -hi def link vimSyncNone Type -hi def link vimSynContains vimSynOption -hi def link vimSynError Error -hi def link vimSynKeyContainedin vimSynContains -hi def link vimSynKeyOpt vimSynOption -hi def link vimSynMtchGrp vimSynOption -hi def link vimSynMtchOpt vimSynOption -hi def link vimSynNextgroup vimSynOption -hi def link vimSynNotPatRange vimSynRegPat -hi def link vimSynOption Special -hi def link vimSynPatRange vimString -hi def link vimSynRegOpt vimSynOption -hi def link vimSynRegPat vimString -hi def link vimSynReg Type -hi def link vimSyntax vimCommand -hi def link vimSynType vimSpecial -hi def link vimTodo Todo -hi def link vimUnmap vimMap -hi def link nvimUnmap vimMap -hi def link vimUserAttrbCmpltFunc Special -hi def link vimUserAttrbCmplt vimSpecial -hi def link vimUserAttrbKey vimOption -hi def link vimUserAttrb vimSpecial -hi def link vimUserAttrbError Error -hi def link vimUserCmdError Error -hi def link vimUserCommand vimCommand -hi def link vimUserFunc Normal -hi def link vimVar Identifier -hi def link vimWarn WarningMsg +if !exists("skip_vim_syntax_inits") + if !exists("g:vimsyn_noerror") + hi def link vimBehaveError vimError + hi def link vimCollClassErr vimError + hi def link vimErrSetting vimError + hi def link vimEmbedError vimError + hi def link vimFTError vimError + hi def link vimFunctionError vimError + hi def link vimFunc vimError + hi def link vimHiAttribList vimError + hi def link vimHiCtermError vimError + hi def link vimHiKeyError vimError + hi def link vimKeyCodeError vimError + hi def link vimMapModErr vimError + hi def link vimSubstFlagErr vimError + hi def link vimSynCaseError vimError + hi def link vimBufnrWarn vimWarn + endif + + hi def link vimAbb vimCommand + hi def link vimAddress vimMark + hi def link vimAugroupError vimError + hi def link vimAugroupKey vimCommand + hi def link vimAuHighlight vimHighlight + hi def link vimAutoCmdOpt vimOption + hi def link vimAutoCmd vimCommand + hi def link vimAutoEvent Type + hi def link vimAutoSet vimCommand + hi def link vimBehaveModel vimBehave + hi def link vimBehave vimCommand + hi def link vimBracket Delimiter + hi def link vimCmplxRepeat SpecialChar + hi def link vimCommand Statement + hi def link vimComment Comment + hi def link vimCommentString vimString + hi def link vimCommentTitle PreProc + hi def link vimCondHL vimCommand + hi def link vimContinue Special + hi def link vimCtrlChar SpecialChar + hi def link vimEchoHLNone vimGroup + hi def link vimEchoHL vimCommand + hi def link vimElseIfErr Error + hi def link vimElseif vimCondHL + hi def link vimEnvvar PreProc + hi def link vimError Error + hi def link vimFBVar vimVar + hi def link vimFgBgAttrib vimHiAttrib + hi def link vimFold Folded + hi def link vimFTCmd vimCommand + hi def link vimFTOption vimSynType + hi def link vimFuncKey vimCommand + hi def link vimFuncName Function + hi def link vimFuncSID Special + hi def link vimFuncVar Identifier + hi def link vimGroupAdd vimSynOption + hi def link vimGroupName vimGroup + hi def link vimGroupRem vimSynOption + hi def link vimGroupSpecial Special + hi def link vimGroup Type + hi def link vimHiAttrib PreProc + hi def link vimHiClear vimHighlight + hi def link vimHiCtermFgBg vimHiTerm + hi def link vimHiCTerm vimHiTerm + hi def link vimHighlight vimCommand + hi def link vimHiGroup vimGroupName + hi def link vimHiGuiFgBg vimHiTerm + hi def link vimHiGuiFont vimHiTerm + hi def link vimHiGuiRgb vimNumber + hi def link vimHiGui vimHiTerm + hi def link vimHiNmbr Number + hi def link vimHiStartStop vimHiTerm + hi def link vimHiTerm Type + hi def link vimHLGroup vimGroup + hi def link vimHLMod PreProc + hi def link vimInsert vimString + hi def link vimIskSep Delimiter + hi def link vimKeyCode vimSpecFile + hi def link vimKeyword Statement + hi def link vimLet vimCommand + hi def link vimLineComment vimComment + hi def link vimMapBang vimCommand + hi def link vimMapModKey vimFuncSID + hi def link vimMapMod vimBracket + hi def link vimMap vimCommand + hi def link vimMark Number + hi def link vimMarkNumber vimNumber + hi def link vimMenuMod vimMapMod + hi def link vimMenuNameMore vimMenuName + hi def link vimMenuName PreProc + hi def link vimMtchComment vimComment + hi def link vimNorm vimCommand + hi def link vimNotation Special + hi def link vimNotFunc vimCommand + hi def link vimNotPatSep vimString + hi def link vimNumber Number + hi def link vimOperError Error + hi def link vimOper Operator + hi def link vimOption PreProc + hi def link vimParenSep Delimiter + hi def link vimPatSepErr vimPatSep + hi def link vimPatSepR vimPatSep + hi def link vimPatSep SpecialChar + hi def link vimPatSepZone vimString + hi def link vimPatSepZ vimPatSep + hi def link vimPattern Type + hi def link vimPlainMark vimMark + hi def link vimPlainRegister vimRegister + hi def link vimRegister SpecialChar + hi def link vimScriptDelim Comment + hi def link vimSearchDelim Statement + hi def link vimSearch vimString + hi def link vimSep Delimiter + hi def link vimSetMod vimOption + hi def link vimSetSep Statement + hi def link vimSetString vimString + hi def link vimSpecFile Identifier + hi def link vimSpecFileMod vimSpecFile + hi def link vimSpecial Type + hi def link vimStatement Statement + hi def link vimStringCont vimString + hi def link vimString String + hi def link vimSubst1 vimSubst + hi def link vimSubstDelim Delimiter + hi def link vimSubstFlags Special + hi def link vimSubstSubstr SpecialChar + hi def link vimSubstTwoBS vimString + hi def link vimSubst vimCommand + hi def link vimSynCaseError Error + hi def link vimSynCase Type + hi def link vimSyncC Type + hi def link vimSyncError Error + hi def link vimSyncGroupName vimGroupName + hi def link vimSyncGroup vimGroupName + hi def link vimSyncKey Type + hi def link vimSyncNone Type + hi def link vimSynContains vimSynOption + hi def link vimSynError Error + hi def link vimSynKeyContainedin vimSynContains + hi def link vimSynKeyOpt vimSynOption + hi def link vimSynMtchGrp vimSynOption + hi def link vimSynMtchOpt vimSynOption + hi def link vimSynNextgroup vimSynOption + hi def link vimSynNotPatRange vimSynRegPat + hi def link vimSynOption Special + hi def link vimSynPatRange vimString + hi def link vimSynRegOpt vimSynOption + hi def link vimSynRegPat vimString + hi def link vimSynReg Type + hi def link vimSyntax vimCommand + hi def link vimSynType vimSpecial + hi def link vimTodo Todo + hi def link vimUnmap vimMap + hi def link vimUserAttrbCmpltFunc Special + hi def link vimUserAttrbCmplt vimSpecial + hi def link vimUserAttrbKey vimOption + hi def link vimUserAttrb vimSpecial + hi def link vimUserAttrbError Error + hi def link vimUserCmdError Error + hi def link vimUserCommand vimCommand + hi def link vimUserFunc Normal + hi def link vimVar Identifier + hi def link vimWarn WarningMsg +endif " Current Syntax Variable: {{{2 let b:current_syntax = "vim" diff --git a/runtime/syntax/virata.vim b/runtime/syntax/virata.vim index e597b8e31c..0ed54fa899 100644 --- a/runtime/syntax/virata.vim +++ b/runtime/syntax/virata.vim @@ -13,10 +13,8 @@ " Setup Syntax: -if version < 600 - " Clear old syntax settings - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " Virata syntax is case insensitive (mostly) @@ -156,63 +154,53 @@ syn sync minlines=50 "for multiple region nesting " 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_virata_syntax_inits") - if version < 508 - let did_virata_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " Sub Links: - HiLink virataDefSubstError virataPreProcError - HiLink virataDefSubst virataPreProc - HiLink virataInAlter virataOperator - HiLink virataInExec virataOperator - HiLink virataInExport virataOperator - HiLink virataInImport virataOperator - HiLink virataInInstance virataOperator - HiLink virataInMake virataOperator - HiLink virataInModule virataOperator - HiLink virataInProcess virataOperator - HiLink virataInMacAddr virataHexNumber - - " Comment Group: - HiLink virataComment Comment - HiLink virataSpclComment SpecialComment - HiLink virataInCommentTodo Todo - - " Constant Group: - HiLink virataString String - HiLink virataStringError Error - HiLink virataCharacter Character - HiLink virataSpclChar Special - HiLink virataDecNumber Number - HiLink virataHexNumber Number - HiLink virataSizeNumber Number - HiLink virataNumberError Error - - " Identifier Group: - HiLink virataIdentError Error - - " PreProc Group: - HiLink virataPreProc PreProc - HiLink virataDefine Define - HiLink virataInclude Include - HiLink virataPreCondit PreCondit - HiLink virataPreProcError Error - HiLink virataPreProcWarn Todo - - " Directive Group: - HiLink virataStatement Statement - HiLink virataCfgStatement Statement - HiLink virataOperator Operator - HiLink virataDirective Keyword - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" Sub Links: +hi def link virataDefSubstError virataPreProcError +hi def link virataDefSubst virataPreProc +hi def link virataInAlter virataOperator +hi def link virataInExec virataOperator +hi def link virataInExport virataOperator +hi def link virataInImport virataOperator +hi def link virataInInstance virataOperator +hi def link virataInMake virataOperator +hi def link virataInModule virataOperator +hi def link virataInProcess virataOperator +hi def link virataInMacAddr virataHexNumber + +" Comment Group: +hi def link virataComment Comment +hi def link virataSpclComment SpecialComment +hi def link virataInCommentTodo Todo + +" Constant Group: +hi def link virataString String +hi def link virataStringError Error +hi def link virataCharacter Character +hi def link virataSpclChar Special +hi def link virataDecNumber Number +hi def link virataHexNumber Number +hi def link virataSizeNumber Number +hi def link virataNumberError Error + +" Identifier Group: +hi def link virataIdentError Error + +" PreProc Group: +hi def link virataPreProc PreProc +hi def link virataDefine Define +hi def link virataInclude Include +hi def link virataPreCondit PreCondit +hi def link virataPreProcError Error +hi def link virataPreProcWarn Todo + +" Directive Group: +hi def link virataStatement Statement +hi def link virataCfgStatement Statement +hi def link virataOperator Operator +hi def link virataDirective Keyword + let b:current_syntax = "virata" diff --git a/runtime/syntax/vmasm.vim b/runtime/syntax/vmasm.vim index 85d0441258..c5cbb1e3a2 100644 --- a/runtime/syntax/vmasm.vim +++ b/runtime/syntax/vmasm.vim @@ -6,11 +6,8 @@ " This is incomplete. Feel free to contribute... " -" 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 @@ -196,55 +193,45 @@ syn match vmasmDirective "\.\(signed_\)\=word\>" syn case match " 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_macro_syntax_inits") - if version < 508 - let did_macro_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overridden later - " Comment Constant Error Identifier PreProc Special Statement Todo Type - " - " Constant Boolean Character Number String - " Identifier Function - " PreProc Define Include Macro PreCondit - " Special Debug Delimiter SpecialChar SpecialComment Tag - " Statement Conditional Exception Keyword Label Operator Repeat - " Type StorageClass Structure Typedef - - HiLink vmasmComment Comment - HiLink vmasmTodo Todo - - HiLink vmasmhexNumber Number " Constant - HiLink vmasmoctNumber Number " Constant - HiLink vmasmbinNumber Number " Constant - HiLink vmasmdecNumber Number " Constant - HiLink vmasmfloatNumber Number " Constant - -" HiLink vmasmString String " Constant - - HiLink vmasmReg Identifier - HiLink vmasmOperator Identifier - - HiLink vmasmInclude Include " PreProc - HiLink vmasmMacro Macro " PreProc - " HiLink vmasmMacroParam Keyword " Statement - - HiLink vmasmDirective Special - HiLink vmasmPreCond Special - - - HiLink vmasmOpcode Statement - HiLink vmasmCond Conditional " Statement - HiLink vmasmRepeat Repeat " Statement - - HiLink vmasmLabel Type - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" Comment Constant Error Identifier PreProc Special Statement Todo Type +" +" Constant Boolean Character Number String +" Identifier Function +" PreProc Define Include Macro PreCondit +" Special Debug Delimiter SpecialChar SpecialComment Tag +" Statement Conditional Exception Keyword Label Operator Repeat +" Type StorageClass Structure Typedef + +hi def link vmasmComment Comment +hi def link vmasmTodo Todo + +hi def link vmasmhexNumber Number " Constant +hi def link vmasmoctNumber Number " Constant +hi def link vmasmbinNumber Number " Constant +hi def link vmasmdecNumber Number " Constant +hi def link vmasmfloatNumber Number " Constant + +" hi def link vmasmString String " Constant + +hi def link vmasmReg Identifier +hi def link vmasmOperator Identifier + +hi def link vmasmInclude Include " PreProc +hi def link vmasmMacro Macro " PreProc +" hi def link vmasmMacroParam Keyword " Statement + +hi def link vmasmDirective Special +hi def link vmasmPreCond Special + + +hi def link vmasmOpcode Statement +hi def link vmasmCond Conditional " Statement +hi def link vmasmRepeat Repeat " Statement + +hi def link vmasmLabel Type let b:current_syntax = "vmasm" diff --git a/runtime/syntax/vrml.vim b/runtime/syntax/vrml.vim index 44814aad86..2474493c94 100644 --- a/runtime/syntax/vrml.vim +++ b/runtime/syntax/vrml.vim @@ -5,11 +5,8 @@ " Former Maintainer: Gregory Seidman <gsslist+vim@anthropohedron.net> " Last change: 2006 May 03 -" 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 @@ -168,11 +165,9 @@ syn keyword VRMLProtos contained EXTERNPROTO PROTO IS syn keyword VRMLRoutes contained ROUTE TO -if version >= 502 "containment! - syn include @jscript $VIMRUNTIME/syntax/javascript.vim - syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript -endif +syn include @jscript $VIMRUNTIME/syntax/javascript.vim +syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript " match definitions. syn match VRMLSpecial contained "\\[0-9][0-9][0-9]\|\\." @@ -192,47 +187,35 @@ syn region VRMLInstName start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z syn keyword VRMLInstances contained DEF USE syn sync minlines=1 -if version >= 600 "FOLDS! - syn sync fromstart - "setlocal foldmethod=syntax - syn region braceFold start="{" end="}" transparent fold contains=TOP - syn region bracketFold start="\[" end="]" transparent fold contains=TOP - syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString -endif +syn sync fromstart +"setlocal foldmethod=syntax +syn region braceFold start="{" end="}" transparent fold contains=TOP +syn region bracketFold start="\[" end="]" transparent fold contains=TOP +syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString " 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_VRML_syntax_inits") - if version < 508 - let did_VRML_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink VRMLCharacter VRMLString - HiLink VRMLSpecialCharacter VRMLSpecial - HiLink VRMLNumber VRMLString - HiLink VRMLValues VRMLString - HiLink VRMLString String - HiLink VRMLSpecial Special - HiLink VRMLComment Comment - HiLink VRMLNodes Statement - HiLink VRMLFields Type - HiLink VRMLEvents Type - HiLink VRMLfTypes LineNr +" Only when an item doesn't have highlighting yet + +hi def link VRMLCharacter VRMLString +hi def link VRMLSpecialCharacter VRMLSpecial +hi def link VRMLNumber VRMLString +hi def link VRMLValues VRMLString +hi def link VRMLString String +hi def link VRMLSpecial Special +hi def link VRMLComment Comment +hi def link VRMLNodes Statement +hi def link VRMLFields Type +hi def link VRMLEvents Type +hi def link VRMLfTypes LineNr " hi VRMLfTypes ctermfg=6 guifg=Brown - HiLink VRMLInstances PreCondit - HiLink VRMLRoutes PreCondit - HiLink VRMLProtos PreProc - HiLink VRMLRouteNode Identifier - HiLink VRMLInstName Identifier - HiLink VRMLTypes Identifier - - delcommand HiLink -endif +hi def link VRMLInstances PreCondit +hi def link VRMLRoutes PreCondit +hi def link VRMLProtos PreProc +hi def link VRMLRouteNode Identifier +hi def link VRMLInstName Identifier +hi def link VRMLTypes Identifier + let b:current_syntax = "vrml" diff --git a/runtime/syntax/vroom.vim b/runtime/syntax/vroom.vim index 0cd6ccce1d..0509e30b17 100644 --- a/runtime/syntax/vroom.vim +++ b/runtime/syntax/vroom.vim @@ -3,11 +3,8 @@ " Maintainer: David Barnett (https://github.com/google/vim-ft-vroom) " Last Change: 2014 Jul 23 -" For version 5.x: Clear all syntax items. -" For version 6.x and later: Quit when a syntax file was already loaded. -if v:version < 600 - syntax clear -elseif exists('b:current_syntax') +" quit when a syntax file was already loaded +if exists('b:current_syntax') finish endif diff --git a/runtime/syntax/vsejcl.vim b/runtime/syntax/vsejcl.vim index f4f00c65ea..f329836236 100644 --- a/runtime/syntax/vsejcl.vim +++ b/runtime/syntax/vsejcl.vim @@ -4,11 +4,8 @@ " URL: " Last change: 2001 May 10 -" 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 @@ -23,26 +20,16 @@ syn match vsejclString /'.\{-}'/ syn match vsejclParms /(.\{-})/ contained " 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_vsejcl_syntax") - if version < 508 - let did_vsejcl_syntax = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink vsejclComment Comment - HiLink vsejclField Type - HiLink vsejclKeyword Statement - HiLink vsejclObject Constant - HiLink vsejclString Constant - HiLink vsejclMisc Special - HiLink vsejclParms Constant +hi def link vsejclComment Comment +hi def link vsejclField Type +hi def link vsejclKeyword Statement +hi def link vsejclObject Constant +hi def link vsejclString Constant +hi def link vsejclMisc Special +hi def link vsejclParms Constant - delcommand HiLink -endif let b:current_syntax = "vsejcl" diff --git a/runtime/syntax/wdiff.vim b/runtime/syntax/wdiff.vim index 9cd0611819..d0afadff2f 100644 --- a/runtime/syntax/wdiff.vim +++ b/runtime/syntax/wdiff.vim @@ -9,11 +9,8 @@ " SPAM is _NOT_ welcome - be ready to be reported! -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -23,21 +20,10 @@ syn region wdiffNew start="{+" end="+}" " 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_wdiff_syn_inits") - let did_wdiff_syn_inits = 1 - if version < 508 - let did_wdiff_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink wdiffOld Special - HiLink wdiffNew Identifier - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link wdiffOld Special +hi def link wdiffNew Identifier + let b:current_syntax = "wdiff" diff --git a/runtime/syntax/web.vim b/runtime/syntax/web.vim index f7a7fdfdc2..54eebda399 100644 --- a/runtime/syntax/web.vim +++ b/runtime/syntax/web.vim @@ -8,11 +8,8 @@ " the standard WEB distribution, available for anonymous ftp at " ftp://labrea.stanford.edu/pub/tex/web/. -" 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 @@ -20,12 +17,8 @@ endif " we base this syntax file on the modern superset, CWEB. Note: This shortcut " may introduce some illegal constructs, e.g., CWEB's "@c" does _not_ start a " code section in WEB. Anyway, I'm not a WEB programmer. -if version < 600 - source <sfile>:p:h/cweb.vim -else - runtime! syntax/cweb.vim - unlet b:current_syntax -endif +runtime! syntax/cweb.vim +unlet b:current_syntax " Replace C/C++ syntax by Pascal syntax. syntax include @webIncludedC <sfile>:p:h/pascal.vim diff --git a/runtime/syntax/webmacro.vim b/runtime/syntax/webmacro.vim index 3b863f7c37..fb1fff6d3d 100644 --- a/runtime/syntax/webmacro.vim +++ b/runtime/syntax/webmacro.vim @@ -11,21 +11,16 @@ " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded 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 = 'webmacro' endif -if version < 600 - source <sfile>:p:h/html.vim -else - runtime! syntax/html.vim - unlet b:current_syntax -endif +runtime! syntax/html.vim +unlet b:current_syntax syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment @@ -49,31 +44,21 @@ syn match webmacroComment "##.*$" syn match webmacroHash "[#{}\$]" contained " 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_webmacro_syn_inits") - if version < 508 - let did_webmacro_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink webmacroComment CommentTitle - HiLink webmacroVariable PreProc - HiLink webmacroIf webmacroStatement - HiLink webmacroForeach webmacroStatement - HiLink webmacroSet webmacroStatement - HiLink webmacroInclude webmacroStatement - HiLink webmacroParse webmacroStatement - HiLink webmacroStatement Function - HiLink webmacroNumber Number - HiLink webmacroBoolean Boolean - HiLink webmacroSpecial Special - HiLink webmacroString String - HiLink webmacroBracesError Error - delcommand HiLink -endif +hi def link webmacroComment CommentTitle +hi def link webmacroVariable PreProc +hi def link webmacroIf webmacroStatement +hi def link webmacroForeach webmacroStatement +hi def link webmacroSet webmacroStatement +hi def link webmacroInclude webmacroStatement +hi def link webmacroParse webmacroStatement +hi def link webmacroStatement Function +hi def link webmacroNumber Number +hi def link webmacroBoolean Boolean +hi def link webmacroSpecial Special +hi def link webmacroString String +hi def link webmacroBracesError Error let b:current_syntax = "webmacro" diff --git a/runtime/syntax/winbatch.vim b/runtime/syntax/winbatch.vim index aea2cdebcb..15ea0fc77b 100644 --- a/runtime/syntax/winbatch.vim +++ b/runtime/syntax/winbatch.vim @@ -4,11 +4,8 @@ " URL: http://www.mggen.com/vim/syntax/winbatch.zip " Last change: 2001 May 10 -" 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 @@ -158,29 +155,19 @@ syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessage syn keyword winbatchImplicit xsendmessage xverifyccard yield " 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_winbatch_syntax_inits") - if version < 508 - let did_winbatch_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink winbatchLabel PreProc - HiLink winbatchCtl Operator - HiLink winbatchStatement Statement - HiLink winbatchTodo Todo - HiLink winbatchString String - HiLink winbatchVar Type - HiLink winbatchComment Comment - HiLink winbatchImplicit Special - HiLink winbatchNumber Number - HiLink winbatchConstant StorageClass +hi def link winbatchLabel PreProc +hi def link winbatchCtl Operator +hi def link winbatchStatement Statement +hi def link winbatchTodo Todo +hi def link winbatchString String +hi def link winbatchVar Type +hi def link winbatchComment Comment +hi def link winbatchImplicit Special +hi def link winbatchNumber Number +hi def link winbatchConstant StorageClass - delcommand HiLink -endif let b:current_syntax = "winbatch" diff --git a/runtime/syntax/wml.vim b/runtime/syntax/wml.vim index 5957930c8e..73bf822e40 100644 --- a/runtime/syntax/wml.vim +++ b/runtime/syntax/wml.vim @@ -16,21 +16,14 @@ " vim-package around your corner :) -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif " A lot of the web stuff looks like HTML so we load that first -if version < 600 - so <sfile>:p:h/html.vim -else - runtime! syntax/html.vim -endif +runtime! syntax/html.vim unlet b:current_syntax if !exists("main_syntax") @@ -108,11 +101,7 @@ syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" cont " The perl include stuff if main_syntax != 'perl' " Perl script - if version < 600 - syn include @wmlPerlScript <sfile>:p:h/perl.vim - else - syn include @wmlPerlScript syntax/perl.vim - endif + syn include @wmlPerlScript syntax/perl.vim unlet b:current_syntax syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag @@ -140,33 +129,22 @@ if main_syntax == "html" endif " 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_wml_syn_inits") - let did_wml_syn_inits = 1 - if version < 508 - let did_wml_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink wmlNextLine Special - HiLink wmlUse Include - HiLink wmlUsed String - HiLink wmlBody Special - HiLink wmlDiverted Label - HiLink wmlDivert Delimiter - HiLink wmlDivertEnd Delimiter - HiLink wmlLocationId Label - HiLink wmlLocation Delimiter -" HiLink wmlLocationed Delimiter - HiLink wmlDefineName String - HiLink wmlComment Comment - HiLink wmlInclude Include - HiLink wmlSharpBang PreProc - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link wmlNextLine Special +hi def link wmlUse Include +hi def link wmlUsed String +hi def link wmlBody Special +hi def link wmlDiverted Label +hi def link wmlDivert Delimiter +hi def link wmlDivertEnd Delimiter +hi def link wmlLocationId Label +hi def link wmlLocation Delimiter +" hi def link wmlLocationed Delimiter +hi def link wmlDefineName String +hi def link wmlComment Comment +hi def link wmlInclude Include +hi def link wmlSharpBang PreProc + let b:current_syntax = "wml" diff --git a/runtime/syntax/wsml.vim b/runtime/syntax/wsml.vim index 2a92a0d548..d01294caac 100644 --- a/runtime/syntax/wsml.vim +++ b/runtime/syntax/wsml.vim @@ -4,10 +4,8 @@ " URL: none " Last Change: 2006 Apr 30 -" 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 @@ -78,47 +76,37 @@ syn match wsmlSpecial "\\u\d\{4\}" syn cluster wsmlTop add=wsmlString,wsmlCharacter,wsmlNumber,wsmlSpecial,wsmlStringError " 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_wsml_syn_inits") - if version < 508 - let did_wsml_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink wsmlHeader TypeDef - HiLink wsmlNamespace TypeDef - HiLink wsmlOntology Statement - HiLink wsmlAxiom TypeDef - HiLink wsmlService TypeDef - HiLink wsmlNFP TypeDef - HiLink wsmlTopLevel TypeDef - HiLink wsmlMediation TypeDef - HiLink wsmlBehavioral TypeDef - HiLink wsmlChoreographyPri TypeDef - HiLink wsmlChoreographySec Operator - HiLink wsmlChoreographyTer Special - HiLink wsmlString String - HiLink wsmlIdentifier Normal - HiLink wsmlSqName Normal - HiLink wsmlVariable Define - HiLink wsmlKeywordsInsideLEs Operator - HiLink wsmlOperator Operator - HiLink wsmlBrace Operator - HiLink wsmlCharacter Character - HiLink wsmlNumber Number - HiLink wsmlDataTypes Special - HiLink wsmlComment Comment - HiLink wsmlDocComment Comment - HiLink wsmlLineComment Comment - HiLink wsmlTodo Todo - HiLink wsmlFixMe Error - HiLink wsmlCommentTitle SpecialComment - HiLink wsmlCommentStar wsmlComment - endif +" Only when an item doesn't have highlighting yet +hi def link wsmlHeader TypeDef +hi def link wsmlNamespace TypeDef +hi def link wsmlOntology Statement +hi def link wsmlAxiom TypeDef +hi def link wsmlService TypeDef +hi def link wsmlNFP TypeDef +hi def link wsmlTopLevel TypeDef +hi def link wsmlMediation TypeDef +hi def link wsmlBehavioral TypeDef +hi def link wsmlChoreographyPri TypeDef +hi def link wsmlChoreographySec Operator +hi def link wsmlChoreographyTer Special +hi def link wsmlString String +hi def link wsmlIdentifier Normal +hi def link wsmlSqName Normal +hi def link wsmlVariable Define +hi def link wsmlKeywordsInsideLEs Operator +hi def link wsmlOperator Operator +hi def link wsmlBrace Operator +hi def link wsmlCharacter Character +hi def link wsmlNumber Number +hi def link wsmlDataTypes Special +hi def link wsmlComment Comment +hi def link wsmlDocComment Comment +hi def link wsmlLineComment Comment +hi def link wsmlTodo Todo +hi def link wsmlFixMe Error +hi def link wsmlCommentTitle SpecialComment +hi def link wsmlCommentStar wsmlComment -delcommand HiLink let b:current_syntax = "wsml" let b:spell_options="contained" diff --git a/runtime/syntax/xdefaults.vim b/runtime/syntax/xdefaults.vim index 5e38952a75..7da5969cde 100644 --- a/runtime/syntax/xdefaults.vim +++ b/runtime/syntax/xdefaults.vim @@ -10,11 +10,8 @@ " xrdb manual page " xrdb source: ftp://ftp.x.org/pub/R6.4/xc/programs/xrdb/xrdb.c -" 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 @@ -109,36 +106,26 @@ syn keyword xdefaultsSymbol contained X_RESOLUTION syn keyword xdefaultsSymbol contained Y_RESOLUTION " 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_xdefaults_syntax_inits") - if version < 508 - let did_xdefaults_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink xdefaultsLabel Type - HiLink xdefaultsValue Constant - HiLink xdefaultsComment Comment - HiLink xdefaultsCommentH xdefaultsComment - HiLink xdefaultsPreProc PreProc - HiLink xdefaultsInclude xdefaultsPreProc - HiLink xdefaultsCppSkip xdefaultsCppOut - HiLink xdefaultsCppOut2 xdefaultsCppOut - HiLink xdefaultsCppOut Comment - HiLink xdefaultsIncluded String - HiLink xdefaultsDefine Macro - HiLink xdefaultsSymbol Statement - HiLink xdefaultsSpecial Statement - HiLink xdefaultsErrorLine Error - HiLink xdefaultsCommentError Error - HiLink xdefaultsPunct Normal - HiLink xdefaultsLineEnd Special - HiLink xdefaultsTodo Todo - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +hi def link xdefaultsLabel Type +hi def link xdefaultsValue Constant +hi def link xdefaultsComment Comment +hi def link xdefaultsCommentH xdefaultsComment +hi def link xdefaultsPreProc PreProc +hi def link xdefaultsInclude xdefaultsPreProc +hi def link xdefaultsCppSkip xdefaultsCppOut +hi def link xdefaultsCppOut2 xdefaultsCppOut +hi def link xdefaultsCppOut Comment +hi def link xdefaultsIncluded String +hi def link xdefaultsDefine Macro +hi def link xdefaultsSymbol Statement +hi def link xdefaultsSpecial Statement +hi def link xdefaultsErrorLine Error +hi def link xdefaultsCommentError Error +hi def link xdefaultsPunct Normal +hi def link xdefaultsLineEnd Special +hi def link xdefaultsTodo Todo + let b:current_syntax = "xdefaults" diff --git a/runtime/syntax/xf86conf.vim b/runtime/syntax/xf86conf.vim index 62784d2285..545eda7db0 100644 --- a/runtime/syntax/xf86conf.vim +++ b/runtime/syntax/xf86conf.vim @@ -10,12 +10,8 @@ " to force XFree86 3.x or 4.x XF86Config syntax " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif diff --git a/runtime/syntax/xkb.vim b/runtime/syntax/xkb.vim index ff9bfd0dae..59fc497e62 100644 --- a/runtime/syntax/xkb.vim +++ b/runtime/syntax/xkb.vim @@ -6,12 +6,9 @@ " URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim " Setup -if version >= 600 - if exists("b:current_syntax") - finish - endif -else - syntax clear +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish endif syn case match @@ -50,42 +47,33 @@ syn keyword xkbTModif default hidden partial virtual syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types " Define the default highlighting -if version >= 508 || !exists("did_xkb_syntax_inits") - if version < 508 - let did_xkb_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xkbModif xkbPreproc - HiLink xkbTModif xkbPreproc - HiLink xkbPreproc Preproc - - HiLink xkbIdentifier Keyword - HiLink xkbFunction Function - HiLink xkbSect Type - HiLink xkbPhysicalKey Identifier - HiLink xkbKeyword Keyword - - HiLink xkbComment Comment - HiLink xkbTodo Todo - - HiLink xkbConstant Constant - HiLink xkbString String - - HiLink xkbSpecialChar xkbSpecial - HiLink xkbSpecial Special - - HiLink xkbParenError xkbBalancingError - HiLink xkbBraceError xkbBalancingError - HiLink xkbBraketError xkbBalancingError - HiLink xkbBalancingError xkbError - HiLink xkbCommentStartError xkbCommentError - HiLink xkbCommentError xkbError - HiLink xkbError Error - - delcommand HiLink -endif + +hi def link xkbModif xkbPreproc +hi def link xkbTModif xkbPreproc +hi def link xkbPreproc Preproc + +hi def link xkbIdentifier Keyword +hi def link xkbFunction Function +hi def link xkbSect Type +hi def link xkbPhysicalKey Identifier +hi def link xkbKeyword Keyword + +hi def link xkbComment Comment +hi def link xkbTodo Todo + +hi def link xkbConstant Constant +hi def link xkbString String + +hi def link xkbSpecialChar xkbSpecial +hi def link xkbSpecial Special + +hi def link xkbParenError xkbBalancingError +hi def link xkbBraceError xkbBalancingError +hi def link xkbBraketError xkbBalancingError +hi def link xkbBalancingError xkbError +hi def link xkbCommentStartError xkbCommentError +hi def link xkbCommentError xkbError +hi def link xkbError Error + let b:current_syntax = "xkb" diff --git a/runtime/syntax/xmath.vim b/runtime/syntax/xmath.vim index 5434f928c7..22b3e85dae 100644 --- a/runtime/syntax/xmath.vim +++ b/runtime/syntax/xmath.vim @@ -1,15 +1,13 @@ " Vim syntax file " Language: xmath (a simulation tool) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Sep 11, 2006 -" Version: 7 +" Last Change: Aug 31, 2016 +" Version: 9 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH " 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") +if exists("b:current_syntax") finish endif @@ -194,41 +192,32 @@ syn sync match xmathSyncComment grouphere xmathCommentBlock "#{" syn sync match xmathSyncComment groupthere NONE "}#" " 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_xmath_syntax_inits") - if version < 508 - let did_xmath_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xmathBraceError xmathError - HiLink xmathCmd xmathStatement - HiLink xmathCommentBlock xmathComment - HiLink xmathCurlyError xmathError - HiLink xmathFuncCmd xmathStatement - HiLink xmathParenError xmathError +if !exists("skip_xmath_syntax_inits") + + hi def link xmathBraceError xmathError + hi def link xmathCmd xmathStatement + hi def link xmathCommentBlock xmathComment + hi def link xmathCurlyError xmathError + hi def link xmathFuncCmd xmathStatement + hi def link xmathParenError xmathError " The default methods for highlighting. Can be overridden later - HiLink xmathCharacter Character - HiLink xmathComma Delimiter - HiLink xmathComment Comment - HiLink xmathCommentBlock Comment - HiLink xmathConditional Conditional - HiLink xmathError Error - HiLink xmathFunc Function - HiLink xmathLabel PreProc - HiLink xmathNumber Number - HiLink xmathRepeat Repeat - HiLink xmathSpecial Type - HiLink xmathSpecialChar SpecialChar - HiLink xmathStatement Statement - HiLink xmathString String - HiLink xmathTodo Todo - - delcommand HiLink + hi def link xmathCharacter Character + hi def link xmathComma Delimiter + hi def link xmathComment Comment + hi def link xmathCommentBlock Comment + hi def link xmathConditional Conditional + hi def link xmathError Error + hi def link xmathFunc Function + hi def link xmathLabel PreProc + hi def link xmathNumber Number + hi def link xmathRepeat Repeat + hi def link xmathSpecial Type + hi def link xmathSpecialChar SpecialChar + hi def link xmathStatement Statement + hi def link xmathString String + hi def link xmathTodo Todo + endif let b:current_syntax = "xmath" diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim index 3cbc1b54fd..2021c3a967 100644 --- a/runtime/syntax/xpm.vim +++ b/runtime/syntax/xpm.vim @@ -4,11 +4,8 @@ " Last Change: 2008 May 28 " Version: 5.4n.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 @@ -126,24 +123,14 @@ unlet color chars colors cpp n i s endif " has("gui_running") " 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_xpm_syntax_inits") - if version < 508 - let did_xpm_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink xpmType Type - HiLink xpmStorageClass StorageClass - HiLink xpmTodo Todo - HiLink xpmComment Comment - HiLink xpmPixelString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link xpmType Type +hi def link xpmStorageClass StorageClass +hi def link xpmTodo Todo +hi def link xpmComment Comment +hi def link xpmPixelString String + let b:current_syntax = "xpm" diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim index 74b3c66af2..1d0eb572fd 100644 --- a/runtime/syntax/xpm2.vim +++ b/runtime/syntax/xpm2.vim @@ -7,11 +7,8 @@ " " Made from xpm.vim by Ronald Schild <rs@scutum.de> -" 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 @@ -23,13 +20,7 @@ syn keyword xpm2Todo TODO FIXME XXX contained syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo -if version < 508 - command -nargs=+ HiLink hi link <args> - command -nargs=+ Hi hi <args> -else - command -nargs=+ HiLink hi def link <args> - command -nargs=+ Hi hi def <args> -endif +command -nargs=+ Hi hi def <args> if has("gui_running") @@ -63,7 +54,7 @@ if has("gui_running") if s !~ '/' exe 'syn match xpm2Values /' . s . '/' endif - HiLink xpm2Values Statement + hi def link xpm2Values Statement let n = 1 " n = color index @@ -112,11 +103,11 @@ if has("gui_running") " now create syntax items " highlight the color string as normal string (no pixel string) exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef' - exe 'HiLink xpm2Col'.n.'Def Constant' + exe 'hi def link xpm2Col'.n.'Def Constant' " but highlight the first whitespace after chars in its color exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained' - exe 'HiLink xpm2Col'.n.'inDef xpm2Color'.n + exe 'hi def link xpm2Col'.n.'inDef xpm2Color'.n " remove the following whitespace from chars let chars = substitute(chars, '\\s\\+$', '', '') @@ -144,21 +135,14 @@ if has("gui_running") endif " has("gui_running") " 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_xpm2_syntax_inits") - if version < 508 - let did_xpm2_syntax_inits = 1 - endif - - " The default highlighting. - HiLink xpm2Type Type - HiLink xpm2StorageClass StorageClass - HiLink xpm2Todo Todo - HiLink xpm2Comment Comment - HiLink xpm2PixelString String -endif -delcommand HiLink +" Only when an item doesn't have highlighting yet +" The default highlighting. +hi def link xpm2Type Type +hi def link xpm2StorageClass StorageClass +hi def link xpm2Todo Todo +hi def link xpm2Comment Comment +hi def link xpm2PixelString String + delcommand Hi let b:current_syntax = "xpm2" diff --git a/runtime/syntax/xs.vim b/runtime/syntax/xs.vim index 6fd0a468f9..d4ac9d1bc7 100644 --- a/runtime/syntax/xs.vim +++ b/runtime/syntax/xs.vim @@ -5,20 +5,13 @@ " Previous: Vincent Pit <perl@profvince.com> " Last Change: 2013-05-12 -" 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 " Read the C syntax to start with -if version < 600 - source <sfile>:p:h/c.vim -else - runtime! syntax/c.vim -endif +runtime! syntax/c.vim let xs_superseded = 1 " mark C functions superseded by Perl replacements let xs_not_core = 1 " mark private core functions @@ -3249,29 +3242,19 @@ syn keyword xsMacro what_len_TRICKYFOLD_safe whichsig write xio_any xio_dirp syn keyword xsMacro xiv_iv xuv_uv yystype " 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_xs_syntax_inits") - if version < 508 - let did_xs_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet - HiLink xsPrivate Error - HiLink xsSuperseded Error - HiLink xsType Type - HiLink xsString String - HiLink xsConstant Constant - HiLink xsException Exception - HiLink xsKeyword Keyword - HiLink xsFunction Function - HiLink xsVariable Identifier - HiLink xsMacro Macro +hi def link xsPrivate Error +hi def link xsSuperseded Error +hi def link xsType Type +hi def link xsString String +hi def link xsConstant Constant +hi def link xsException Exception +hi def link xsKeyword Keyword +hi def link xsFunction Function +hi def link xsVariable Identifier +hi def link xsMacro Macro - delcommand HiLink -endif let b:current_syntax = "xs" diff --git a/runtime/syntax/xxd.vim b/runtime/syntax/xxd.vim index b2b1e44603..f3c43e816c 100644 --- a/runtime/syntax/xxd.vim +++ b/runtime/syntax/xxd.vim @@ -1,16 +1,13 @@ " Vim syntax file " Language: bin using xxd " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Oct 23, 2014 -" Version: 8 +" Last Change: Aug 31, 2016 +" Version: 10 " Notes: use :help xxd to see how to invoke it " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD -" 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 @@ -20,21 +17,12 @@ syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot syn match xxdDot contained "[.\r]" " 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_xxd_syntax_inits") - if version < 508 - let did_xxd_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +if !exists("skip_xxd_syntax_inits") - HiLink xxdAddress Constant - HiLink xxdSep Identifier - HiLink xxdAscii Statement + hi def link xxdAddress Constant + hi def link xxdSep Identifier + hi def link xxdAscii Statement - delcommand HiLink endif let b:current_syntax = "xxd" diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim index 977ffa75e4..8d5eb13071 100644 --- a/runtime/syntax/yacc.vim +++ b/runtime/syntax/yacc.vim @@ -1,18 +1,15 @@ " Vim syntax file " Language: Yacc " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: Apr 02, 2015 -" Version: 13 -" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax +" Last Change: Aug 31, 2016 +" Version: 15 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_YACC " " Options: {{{1 " g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C " --------------------------------------------------------------------- " this version of syntax/yacc.vim requires 6.0 or later -if version < 600 - finish -endif if exists("b:current_syntax") syntax clear endif @@ -90,7 +87,7 @@ syn sync fromstart " --------------------------------------------------------------------- " Define the default highlighting. {{{1 -if !exists("did_yacc_syn_inits") +if !exists("skip_yacc_syn_inits") hi def link yaccBrkt yaccStmt hi def link yaccComment Comment hi def link yaccCurly Delimiter diff --git a/runtime/syntax/z8a.vim b/runtime/syntax/z8a.vim index a3a8a2bbdf..6809eb98cd 100644 --- a/runtime/syntax/z8a.vim +++ b/runtime/syntax/z8a.vim @@ -3,11 +3,8 @@ " Maintainer: Milan Pikula <www@fornax.elf.stuba.sk> " Last Change: 2003 May 11 -" 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 @@ -85,30 +82,20 @@ syn match z8aComment ";.*" syn case match " 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_z8a_syntax_inits") - if version < 508 - let did_z8a_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - HiLink z8aSection Special - HiLink z8aLabel Label - HiLink z8aSpecialLabel Label - HiLink z8aComment Comment - HiLink z8aInstruction Statement - HiLink z8aSpecInst Statement - HiLink z8aInclude Include - HiLink z8aPreCondit PreCondit - HiLink z8aPreProc PreProc - HiLink z8aNumber Number - HiLink z8aString String - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet + +hi def link z8aSection Special +hi def link z8aLabel Label +hi def link z8aSpecialLabel Label +hi def link z8aComment Comment +hi def link z8aInstruction Statement +hi def link z8aSpecInst Statement +hi def link z8aInclude Include +hi def link z8aPreCondit PreCondit +hi def link z8aPreProc PreProc +hi def link z8aNumber Number +hi def link z8aString String + let b:current_syntax = "z8a" " vim: ts=8 |