]>
Commit | Line | Data |
---|---|---|
455038de AG |
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 @@ | |
99890e04 ER |
5 | finish |
6 | endif | |
7 | ||
455038de AG |
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 | |
99890e04 | 14 | |
455038de AG |
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 | |
99890e04 | 18 | |
455038de AG |
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 | |
99890e04 ER |
22 | |
23 | +syntax match crontabSpecial "@\w\+" nextgroup=crontabCmd skipwhite | |
9eb47a31 | 24 | +syntax match crontabCmdSpecial contained /\\.\|%/ |
455038de | 25 | syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent |
99890e04 | 26 | +syntax region crontabCmd start="\S" end="$" nextgroup=crontabCmnt skipwhite contained contains=crontabCmnt,crontabCmdSpecial keepend |
455038de AG |
27 | syntax match crontabCmnt "^\s*#.*" |
28 | syntax match crontabPercent "[^\\]%.*"lc=1 contained | |
99890e04 | 29 | |
455038de | 30 | @@ -37,6 +40,12 @@ |
9eb47a31 | 31 | |
455038de | 32 | syntax match crontabVar "^\s*\k\w*\s*="me=e-1 |
99890e04 | 33 | |
9eb47a31 ER |
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 | |
455038de | 38 | + |
99890e04 | 39 | + |
9eb47a31 ER |
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 | |
455038de | 43 | @@ -48,6 +57,7 @@ |
9eb47a31 ER |
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 | |
455038de | 51 | @@ -69,6 +79,13 @@ |
99890e04 | 52 | " comment out next line for to suppress unix commands coloring. |
455038de AG |
53 | HiLink crontabCmd Statement |
54 | ||
9eb47a31 ER |
55 | + HiLink crontabCmdSpecial Special |
56 | + | |
455038de AG |
57 | + HiLink crontabVar Identifier |
58 | + HiLink crontabVarEq Special | |
59 | + HiLink crontabVarVal Constant | |
60 | + HiLink crontabVarValQ String | |
61 | + | |
99890e04 ER |
62 | HiLink crontabCmnt Comment |
63 | ||
455038de AG |
64 | delcommand HiLink |
65 | Only in vim-7.0f/runtime/syntax: crontab.vim.rej |