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