annotate runtime/syntax/crontab.vim @ 6092:6f88e2dafbf6 v7.4.384

updated for version 7.4.384 Problem: Test 102 fails when compiled with small features. Solution: Source small.vim. (Jacob Niehus)
author Bram Moolenaar <bram@vim.org>
date Wed, 30 Jul 2014 13:20:39 +0200
parents 1b584a6f446c
children 435956324539
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"
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2788
diff changeset
8 " Last Change: 2012-05-16
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " crontab line format:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Minutes Hours Days Months Days_of_Week Commands # comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
21 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
22 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
23 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
25 syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
26 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
27
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
28 syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
29 syntax keyword crontabDow7 contained sun mon tue wed thu fri sat
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
31 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent
3513
1b584a6f446c Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2788
diff changeset
32 syntax match crontabCmnt "^\s*#.*" contains=@Spell
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
33 syntax match crontabPercent "[^\\]%.*"lc=1 contained
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
34
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
35 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
36
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
37 syntax match crontabVar "^\s*\k\w*\s*="me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " 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
42 if version >= 508 || !exists("did_crontab_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let did_crontab_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 HiLink crontabMin Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink crontabHr PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink crontabDay Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink crontabMnth Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink crontabMnth12 Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink crontabMnthS Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink crontabMnthN Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink crontabDow PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink crontabDow7 PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink crontabDowS PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink crontabDowN PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
64 HiLink crontabNick Special
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
65 HiLink crontabVar Identifier
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
66 HiLink crontabPercent Special
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
67
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " comment out next line for to suppress unix commands coloring.
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
69 HiLink crontabCmd Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink crontabCmnt Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 let b:current_syntax = "crontab"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " vim: ts=8