Mercurial > vim
comparison runtime/syntax/crontab.vim @ 6530:435956324539
Update runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 25 Jan 2015 13:02:57 +0100 |
parents | 1b584a6f446c |
children | 43efa4f5a8ea |
comparison
equal
deleted
inserted
replaced
6529:3d2db5a7403f | 6530:435956324539 |
---|---|
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> | 3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> |
4 " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net | 4 " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net |
5 " License: This file can be redistribued and/or modified under the same terms | 5 " License: This file can be redistribued and/or modified under the same terms |
6 " as Vim itself. | 6 " as Vim itself. |
7 " Filenames: /tmp/crontab.* used by "crontab -e" | 7 " Filenames: /tmp/crontab.* used by "crontab -e" |
8 " Last Change: 2012-05-16 | 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 " For version 5.x: Clear all syntax items |
14 " For version 6.x: Quit when a syntax file was already loaded | 14 " For version 6.x: Quit when a syntax file was already loaded |
15 if version < 600 | 15 if version < 600 |
16 syntax clear | 16 syntax clear |
17 elseif exists("b:current_syntax") | 17 elseif exists("b:current_syntax") |
18 finish | 18 finish |
19 endif | 19 endif |
20 | |
21 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite | |
22 | |
23 syntax match crontabVar "^\s*\k\w*\s*="me=e-1 | |
24 | |
25 syntax case ignore | |
20 | 26 |
21 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite | 27 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite |
22 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained | 28 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained |
23 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained | 29 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained |
24 | 30 |
30 | 36 |
31 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent | 37 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent |
32 syntax match crontabCmnt "^\s*#.*" contains=@Spell | 38 syntax match crontabCmnt "^\s*#.*" contains=@Spell |
33 syntax match crontabPercent "[^\\]%.*"lc=1 contained | 39 syntax match crontabPercent "[^\\]%.*"lc=1 contained |
34 | 40 |
35 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite | |
36 | |
37 syntax match crontabVar "^\s*\k\w*\s*="me=e-1 | |
38 | |
39 " Define the default highlighting. | 41 " Define the default highlighting. |
40 " For version 5.7 and earlier: only when not done already | 42 " For version 5.7 and earlier: only when not done already |
41 " For version 5.8 and later: 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 |
42 if version >= 508 || !exists("did_crontab_syn_inits") | 44 if version >= 508 || !exists("did_crontab_syn_inits") |
43 if version < 508 | 45 if version < 508 |
44 let did_crontab_syn_inits = 1 | 46 let did_crontab_syn_inits = 1 |
45 command -nargs=+ HiLink hi link <args> | 47 command -nargs=+ HiLink hi link <args> |
46 else | 48 else |
47 command -nargs=+ HiLink hi def link <args> | 49 command -nargs=+ HiLink hi def link <args> |
48 endif | 50 endif |
49 | 51 |
50 HiLink crontabMin Number | 52 HiLink crontabMin Number |
51 HiLink crontabHr PreProc | 53 HiLink crontabHr PreProc |
52 HiLink crontabDay Type | 54 HiLink crontabDay Type |
53 | 55 |
54 HiLink crontabMnth Number | 56 HiLink crontabMnth Number |
55 HiLink crontabMnth12 Number | 57 HiLink crontabMnth12 Number |
56 HiLink crontabMnthS Number | 58 HiLink crontabMnthS Number |
57 HiLink crontabMnthN Number | 59 HiLink crontabMnthN Number |
58 | 60 |
59 HiLink crontabDow PreProc | 61 HiLink crontabDow PreProc |
60 HiLink crontabDow7 PreProc | 62 HiLink crontabDow7 PreProc |
61 HiLink crontabDowS PreProc | 63 HiLink crontabDowS PreProc |
62 HiLink crontabDowN PreProc | 64 HiLink crontabDowN PreProc |
63 | 65 |
64 HiLink crontabNick Special | 66 HiLink crontabNick Special |
65 HiLink crontabVar Identifier | 67 HiLink crontabVar Identifier |
66 HiLink crontabPercent Special | 68 HiLink crontabPercent Special |
67 | 69 |
68 " comment out next line for to suppress unix commands coloring. | 70 " comment out next line for to suppress unix commands coloring. |
69 HiLink crontabCmd Statement | 71 HiLink crontabCmd Statement |
70 | 72 |
71 HiLink crontabCmnt Comment | 73 HiLink crontabCmnt Comment |
72 | 74 |
73 delcommand HiLink | 75 delcommand HiLink |
74 endif | 76 endif |
75 | 77 |
76 let b:current_syntax = "crontab" | 78 let b:current_syntax = "crontab" |
77 | 79 |
78 " vim: ts=8 | 80 " vim: ts=8 |