annotate runtime/syntax/crontab.vim @ 1048:73c0eeeee0b7 v7.0.174

updated for version 7.0-174
author vimboss
date Tue, 28 Nov 2006 20:40:00 +0000
parents 8e5830943bff
children 0877b8d6370e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
2 " Language: crontab
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
4 " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
5 " License: This file can be redistribued and/or modified under the same terms
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
6 " as Vim itself.
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
7 " Filenames: /tmp/crontab.* used by "crontab -e"
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
8 " URL: http://trific.ath.cx/Ftp/vim/syntax/crontab.vim
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
9 " Last Change: 2006-04-20
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " crontab line format:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Minutes Hours Days Months Days_of_Week Commands # comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
22 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
23 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
24 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
26 syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
27 syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
29 syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
30 syntax keyword crontabDow7 contained sun mon tue wed thu fri sat
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
32 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
33 syntax match crontabCmnt "^\s*#.*"
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
34 syntax match crontabPercent "[^\\]%.*"lc=1 contained
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
35
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
36 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
37
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
38 syntax match crontabVar "^\s*\k\w*\s*="me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 if version >= 508 || !exists("did_crontab_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 let did_crontab_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink crontabMin Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink crontabHr PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink crontabDay Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink crontabMnth Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink crontabMnth12 Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink crontabMnthS Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink crontabMnthN Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink crontabDow PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink crontabDow7 PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink crontabDowS PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink crontabDowN PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
65 HiLink crontabNick Special
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
66 HiLink crontabVar Identifier
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
67 HiLink crontabPercent Special
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
68
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " comment out next line for to suppress unix commands coloring.
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
70 HiLink crontabCmd Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink crontabCmnt Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 let b:current_syntax = "crontab"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " vim: ts=8