diff options
Diffstat (limited to 'runtime/syntax/crontab.vim')
-rw-r--r-- | runtime/syntax/crontab.vim | 59 |
1 files changed, 23 insertions, 36 deletions
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" |