annotate runtime/syntax/crontab.vim @ 7584:9b7de205336d v7.4.1092

commit https://github.com/vim/vim/commit/a803c7f94070f94b831fdfd1984f288c8b825b5d Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 15 15:31:39 2016 +0100 patch 7.4.1092 Problem: It is not simple to test for an exception and give a proper error message. Solution: Add assert_exception().
author Christian Brabandt <cb@256bit.org>
date Fri, 15 Jan 2016 15:45:05 +0100
parents 435956324539
children 43efa4f5a8ea
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"
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
8 " Last Change: 2015-01-20
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
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
16 syntax clear
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 elseif exists("b:current_syntax")
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
18 finish
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
21 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
22
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
23 syntax match crontabVar "^\s*\k\w*\s*="me=e-1
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
24
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
25 syntax case ignore
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
26
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
27 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
28 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
29 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained
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 match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
32 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
33
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
34 syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
35 syntax keyword crontabDow7 contained sun mon tue wed thu fri sat
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
37 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
38 syntax match crontabCmnt "^\s*#.*" contains=@Spell
838
8e5830943bff updated for version 7.0e04
vimboss
parents: 268
diff changeset
39 syntax match crontabPercent "[^\\]%.*"lc=1 contained
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
40
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " 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
44 if version >= 508 || !exists("did_crontab_syn_inits")
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
45 if version < 508
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
46 let did_crontab_syn_inits = 1
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
47 command -nargs=+ HiLink hi link <args>
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
48 else
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
49 command -nargs=+ HiLink hi def link <args>
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
50 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
52 HiLink crontabMin Number
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
53 HiLink crontabHr PreProc
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
54 HiLink crontabDay Type
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
56 HiLink crontabMnth Number
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
57 HiLink crontabMnth12 Number
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
58 HiLink crontabMnthS Number
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
59 HiLink crontabMnthN Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
61 HiLink crontabDow PreProc
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
62 HiLink crontabDow7 PreProc
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
63 HiLink crontabDowS PreProc
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
64 HiLink crontabDowN PreProc
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
66 HiLink crontabNick Special
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
67 HiLink crontabVar Identifier
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
68 HiLink crontabPercent Special
268
8e3c690f1f3c updated for version 7.0072
vimboss
parents: 7
diff changeset
69
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " comment out next line for to suppress unix commands coloring.
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
71 HiLink crontabCmd Statement
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
73 HiLink crontabCmnt Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
6530
435956324539 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3513
diff changeset
75 delcommand HiLink
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 let b:current_syntax = "crontab"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " vim: ts=8