]>
Commit | Line | Data |
---|---|---|
dd43f8a2 ER |
1 | --- vim-7.4.979/runtime/syntax/crontab.vim~ 2015-12-22 11:05:52.000000000 +0200 |
2 | +++ vim-7.4.979/runtime/syntax/crontab.vim 2015-12-22 11:06:53.383500266 +0200 | |
7928792f | 3 | @@ -18,17 +18,20 @@ |
99890e04 ER |
4 | finish |
5 | endif | |
6 | ||
455038de AG |
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 | |
99890e04 | 13 | |
455038de AG |
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 | |
99890e04 | 17 | |
7928792f | 18 | syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained |
455038de | 19 | syntax keyword crontabDow7 contained sun mon tue wed thu fri sat |
99890e04 ER |
20 | |
21 | +syntax match crontabSpecial "@\w\+" nextgroup=crontabCmd skipwhite | |
9eb47a31 | 22 | +syntax match crontabCmdSpecial contained /\\.\|%/ |
455038de | 23 | syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent |
7928792f ER |
24 | +syntax region crontabCmd start="\S" end="$" nextgroup=crontabCmnt skipwhite contained contains=crontabCmnt,crontabCmdSpecial keepend |
25 | syntax match crontabCmnt "^\s*#.*" contains=@Spell | |
455038de | 26 | syntax match crontabPercent "[^\\]%.*"lc=1 contained |
99890e04 | 27 | |
dd43f8a2 | 28 | @@ -36,6 +39,11 @@ |
9eb47a31 | 29 | |
455038de | 30 | syntax match crontabVar "^\s*\k\w*\s*="me=e-1 |
99890e04 | 31 | |
1b38dc00 ER |
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 | |
99890e04 | 36 | + |
9eb47a31 ER |
37 | " Define the default highlighting. |
38 | " For version 5.7 and earlier: only when not done already | |
39 | " For version 5.8 and later: only when an item doesn't have highlighting yet | |
dd43f8a2 ER |
40 | @@ -63,6 +57,7 @@ |
41 | command -nargs=+ HiLink hi def link <args> | |
42 | endif | |
43 | ||
44 | + HiLink crontabSpecial PreProc | |
45 | HiLink crontabMin Number | |
46 | HiLink crontabHr PreProc | |
47 | HiLink crontabDay Type | |
48 | @@ -84,6 +79,13 @@ | |
99890e04 | 49 | " comment out next line for to suppress unix commands coloring. |
dd43f8a2 | 50 | HiLink crontabCmd Statement |
455038de | 51 | |
dd43f8a2 | 52 | + HiLink crontabCmdSpecial Special |
1b38dc00 | 53 | + |
dd43f8a2 ER |
54 | + HiLink crontabVar Identifier |
55 | + HiLink crontabVarEq Special | |
56 | + HiLink crontabVarVal Constant | |
57 | + HiLink crontabVarValQ String | |
455038de | 58 | + |
dd43f8a2 | 59 | HiLink crontabCmnt Comment |
99890e04 | 60 | |
dd43f8a2 | 61 | delcommand HiLink |