Mercurial > vim
comparison runtime/syntax/crontab.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 435956324539 |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
8 " Last Change: 2015-01-20 | 8 " Last Change: 2015-01-20 |
9 " | 9 " |
10 " crontab line format: | 10 " crontab line format: |
11 " Minutes Hours Days Months Days_of_Week Commands # comments | 11 " Minutes Hours Days Months Days_of_Week Commands # comments |
12 | 12 |
13 " For version 5.x: Clear all syntax items | 13 " quit when a syntax file was already loaded |
14 " For version 6.x: Quit when a syntax file was already loaded | 14 if exists("b:current_syntax") |
15 if version < 600 | |
16 syntax clear | |
17 elseif exists("b:current_syntax") | |
18 finish | 15 finish |
19 endif | 16 endif |
20 | 17 |
21 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite | 18 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite |
22 | 19 |
37 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent | 34 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent |
38 syntax match crontabCmnt "^\s*#.*" contains=@Spell | 35 syntax match crontabCmnt "^\s*#.*" contains=@Spell |
39 syntax match crontabPercent "[^\\]%.*"lc=1 contained | 36 syntax match crontabPercent "[^\\]%.*"lc=1 contained |
40 | 37 |
41 " Define the default highlighting. | 38 " Define the default highlighting. |
42 " For version 5.7 and earlier: only when not done already | 39 " Only when an item doesn't have highlighting yet |
43 " For version 5.8 and later: only when an item doesn't have highlighting yet | 40 command -nargs=+ HiLink hi def link <args> |
44 if version >= 508 || !exists("did_crontab_syn_inits") | |
45 if version < 508 | |
46 let did_crontab_syn_inits = 1 | |
47 command -nargs=+ HiLink hi link <args> | |
48 else | |
49 command -nargs=+ HiLink hi def link <args> | |
50 endif | |
51 | 41 |
52 HiLink crontabMin Number | 42 HiLink crontabMin Number |
53 HiLink crontabHr PreProc | 43 HiLink crontabHr PreProc |
54 HiLink crontabDay Type | 44 HiLink crontabDay Type |
55 | 45 |
56 HiLink crontabMnth Number | 46 HiLink crontabMnth Number |
57 HiLink crontabMnth12 Number | 47 HiLink crontabMnth12 Number |
58 HiLink crontabMnthS Number | 48 HiLink crontabMnthS Number |
59 HiLink crontabMnthN Number | 49 HiLink crontabMnthN Number |
60 | 50 |
61 HiLink crontabDow PreProc | 51 HiLink crontabDow PreProc |
62 HiLink crontabDow7 PreProc | 52 HiLink crontabDow7 PreProc |
63 HiLink crontabDowS PreProc | 53 HiLink crontabDowS PreProc |
64 HiLink crontabDowN PreProc | 54 HiLink crontabDowN PreProc |
65 | 55 |
66 HiLink crontabNick Special | 56 HiLink crontabNick Special |
67 HiLink crontabVar Identifier | 57 HiLink crontabVar Identifier |
68 HiLink crontabPercent Special | 58 HiLink crontabPercent Special |
69 | 59 |
70 " comment out next line for to suppress unix commands coloring. | 60 " comment out next line for to suppress unix commands coloring. |
71 HiLink crontabCmd Statement | 61 HiLink crontabCmd Statement |
72 | 62 |
73 HiLink crontabCmnt Comment | 63 HiLink crontabCmnt Comment |
74 | 64 |
75 delcommand HiLink | 65 delcommand HiLink |
76 endif | |
77 | 66 |
78 let b:current_syntax = "crontab" | 67 let b:current_syntax = "crontab" |
79 | 68 |
80 " vim: ts=8 | 69 " vim: ts=8 |