Mercurial > vim
annotate runtime/syntax/crontab.vim @ 27274:34e3b99f045d
Added tag v8.2.4165 for changeset a9f0c1f06c84a915894a2da5711c4755af4cfa65
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 20 Jan 2022 21:30:03 +0100 |
parents | 46763b01cd9a |
children | ccfca4f03a2b |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
838 | 2 " Language: crontab |
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> | |
4 " Original Maintainer: John Hoelzel johnh51@users.sourceforge.net | |
5 " License: This file can be redistribued and/or modified under the same terms | |
6 " as Vim itself. | |
7 " Filenames: /tmp/crontab.* used by "crontab -e" | |
6530 | 8 " Last Change: 2015-01-20 |
7 | 9 " |
10 " crontab line format: | |
11 " Minutes Hours Days Months Days_of_Week Commands # comments | |
12 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6530
diff
changeset
|
13 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6530
diff
changeset
|
14 if exists("b:current_syntax") |
6530 | 15 finish |
7 | 16 endif |
17 | |
6530 | 18 syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite |
19 | |
20 syntax match crontabVar "^\s*\k\w*\s*="me=e-1 | |
21 | |
22 syntax case ignore | |
23 | |
838 | 24 syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite |
25 syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained | |
26 syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained | |
7 | 27 |
838 | 28 syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained |
29 syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec | |
7 | 30 |
838 | 31 syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained |
32 syntax keyword crontabDow7 contained sun mon tue wed thu fri sat | |
7 | 33 |
838 | 34 syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent |
3513 | 35 syntax match crontabCmnt "^\s*#.*" contains=@Spell |
838 | 36 syntax match crontabPercent "[^\\]%.*"lc=1 contained |
268 | 37 |
7 | 38 " Define the default highlighting. |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6530
diff
changeset
|
39 " Only when an item doesn't have highlighting yet |
7 | 40 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
41 hi def link crontabMin Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link crontabHr PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link crontabDay Type |
7 | 44 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
45 hi def link crontabMnth Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link crontabMnth12 Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
47 hi def link crontabMnthS Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link crontabMnthN Number |
7 | 49 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
50 hi def link crontabDow PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
51 hi def link crontabDow7 PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
52 hi def link crontabDowS PreProc |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
53 hi def link crontabDowN PreProc |
7 | 54 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
55 hi def link crontabNick Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
56 hi def link crontabVar Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
57 hi def link crontabPercent Special |
268 | 58 |
7 | 59 " comment out next line for to suppress unix commands coloring. |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
60 hi def link crontabCmd Statement |
7 | 61 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link crontabCmnt Comment |
7 | 63 |
64 | |
65 let b:current_syntax = "crontab" | |
66 | |
67 " vim: ts=8 |