]>
Commit | Line | Data |
---|---|---|
1 | --- vim74/runtime/syntax/crontab.vim~ 2013-09-06 00:07:40.000000000 +0300 | |
2 | +++ vim74/runtime/syntax/crontab.vim 2013-09-06 00:09:14.394009460 +0300 | |
3 | @@ -18,17 +18,20 @@ | |
4 | finish | |
5 | endif | |
6 | ||
7 | -syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite | |
8 | -syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained | |
9 | -syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained | |
10 | +syntax match crontabMin "\_^[0-9\-\/\,\.]\{}\>\|\*\(/[0-9]\{}\)\?" nextgroup=crontabHr skipwhite | |
11 | +syntax match crontabHr "\_^[0-9\-\/\,\.]\{}\>\|\*\(/[0-9]\{}\)\?" nextgroup=crontabDay skipwhite contained | |
12 | +syntax match crontabDay "\_^[0-9\-\/\,\.]\{}\>\|\*\(/[0-9]\{}\)\?" nextgroup=crontabMnth skipwhite contained | |
13 | ||
14 | -syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained | |
15 | +syntax match crontabMnth "\<[a-z0-9\-\/\,\.]\{}\>\|\*\(/[0-9]\{}\)\?" nextgroup=crontabDow skipwhite contained | |
16 | syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec | |
17 | ||
18 | syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained | |
19 | syntax keyword crontabDow7 contained sun mon tue wed thu fri sat | |
20 | ||
21 | +syntax match crontabSpecial "@\w\+" nextgroup=crontabCmd skipwhite | |
22 | +syntax match crontabCmdSpecial contained /\\.\|%/ | |
23 | syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent | |
24 | +syntax region crontabCmd start="\S" end="$" nextgroup=crontabCmnt skipwhite contained contains=crontabCmnt,crontabCmdSpecial keepend | |
25 | syntax match crontabCmnt "^\s*#.*" contains=@Spell | |
26 | syntax match crontabPercent "[^\\]%.*"lc=1 contained | |
27 | ||
28 | @@ -37,6 +40,12 @@ | |
29 | ||
30 | syntax match crontabVar "^\s*\k\w*\s*="me=e-1 | |
31 | ||
32 | +syntax match crontabVar /^[A-Za-z][A-Za-z0-9\-\_]*/ nextgroup=crontabVarEq skipwhite | |
33 | +syntax match crontabVarEq contained /=/ nextgroup=CrontabVarValQ,CrontabVarVal skipwhite | |
34 | +syntax match crontabVarValQ contained /\(["']\).*\1/ skipwhite | |
35 | +syntax match crontabVarVal contained /["']\@!\S\+/ skipwhite | |
36 | + | |
37 | + | |
38 | " Define the default highlighting. | |
39 | " For version 5.7 and earlier: only when not done already | |
40 | " For version 5.8 and later: only when an item doesn't have highlighting yet | |
41 | @@ -48,6 +57,7 @@ | |
42 | command -nargs=+ HiLink hi def link <args> | |
43 | endif | |
44 | ||
45 | + HiLink crontabSpecial PreProc | |
46 | HiLink crontabMin Number | |
47 | HiLink crontabHr PreProc | |
48 | HiLink crontabDay Type | |
49 | @@ -69,6 +79,13 @@ | |
50 | " comment out next line for to suppress unix commands coloring. | |
51 | HiLink crontabCmd Statement | |
52 | ||
53 | + HiLink crontabCmdSpecial Special | |
54 | + | |
55 | + HiLink crontabVar Identifier | |
56 | + HiLink crontabVarEq Special | |
57 | + HiLink crontabVarVal Constant | |
58 | + HiLink crontabVarValQ String | |
59 | + | |
60 | HiLink crontabCmnt Comment | |
61 | ||
62 | delcommand HiLink |