annotate runtime/syntax/initng.vim @ 32022:1a5c2c5f8524

Added tag v9.0.1342 for changeset 0b0fe53fee8dd1aaf6ddbbb4425cc23dd466eb1c
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Feb 2023 13:45:05 +0100
parents 1e9e9d89f0ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
1 " Vim syntax file
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
2 " Language: initng .i files
22723
5b7ea82bc18f Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 2034
diff changeset
3 " Maintainer: Elan Ruusamäe <glen@pld-linux.org>
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
4 " URL: http://glen.alkohol.ee/pld/initng/
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
5 " License: GPL v2
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
6 " Version: 0.13
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1121
diff changeset
7 " Last Change: $Date: 2007/05/05 17:17:40 $
1121
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
8 "
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
9 " Syntax highlighting for initng .i files. Inherits from sh.vim and adds
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
10 " in the hiliting to start/stop {} blocks. Requires vim 6.3 or later.
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
11
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
12 if &compatible || v:version < 603
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
13 finish
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
14 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
15
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
16 if exists("b:current_syntax")
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
17 finish
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
18 endif
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
19
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
20 syn case match
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
21
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
22 let is_bash = 1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
23 syn include @shTop syntax/sh.vim
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
24
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
25 syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
26 syn cluster initngServiceCluster contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
27
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
28 syn region initngAction matchgroup=initngActionHeader start="^\s*\(script start\|script stop\|script run\)\s*=\s*{" end="}" contains=@initngActionCluster
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
29 syn cluster initngActionCluster contains=@shTop
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
30
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
31 syn match initngDelim /[{}]/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
32
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
33 syn region initngString start=/"/ end=/"/ skip=/\\"/
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
34
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
35 " option = value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
36 syn match initngServiceOption /.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
37 " option without value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
38 syn match initngServiceOption /\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
39
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
40 " options with value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
41 syn keyword initngServiceKeywords also_stop need use nice setuid contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
42 syn keyword initngServiceKeywords delay chdir suid sgid start_pause env_file env_parse pid_file pidfile contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
43 syn keyword initngServiceKeywords pid_of up_when_pid_set stdout stderr syncron just_before contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
44 syn keyword initngServiceKeywords provide lockfile daemon_stops_badly contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
45 syn match initngServiceKeywords /\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
46 syn match initngServiceKeywords /env\s\+\w\+/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
47
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
48 " rlimits
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
49 syn keyword initngServiceKeywords rlimit_cpu_hard rlimit_core_soft contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
50
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
51 " single options
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
52 syn keyword initngServiceKeywords last respawn network_provider require_network require_file critical forks contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
53 " cron options
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
54 syn keyword initngServiceKeywords hourly contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
55 syn match initngVariable /\${\?\w\+\}\?/
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
56
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
57 " Substituted @foo@ macros:
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
58 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
59 syn match initngSubstMacro /@[^@]\+@/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
60 syn cluster initngActionCluster add=initngSubstMacro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
61 syn cluster shCommandSubList add=initngSubstMacro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
62
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
63 " Comments:
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
64 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
65 syn cluster initngCommentGroup contains=initngTodo,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
66 syn keyword initngTodo TODO FIXME XXX contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
67 syn match initngComment /#.*$/ contains=@initngCommentGroup
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
68
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
69 " install_service #macros
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
70 " TODO: syntax check for ifd-endd pairs
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
71 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
72 syn region initngDefine start="^#\(endd\|elsed\|exec\|ifd\|endexec\|endd\)\>" skip="\\$" end="$" end="#"me=s-1
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
73 syn cluster shCommentGroup add=initngDefine
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
74 syn cluster initngCommentGroup add=initngDefine
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
75
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
76 hi def link initngComment Comment
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
77 hi def link initngTodo Todo
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
78
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
79 hi def link initngString String
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
80 hi def link initngServiceKeywords Define
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
81
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
82 hi def link initngServiceHeader Keyword
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
83 hi def link initngActionHeader Type
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
84 hi def link initngDelim Delimiter
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
85
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
86 hi def link initngVariable PreProc
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
87 hi def link initngSubstMacro Comment
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
88 hi def link initngDefine Macro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
89
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
90 let b:current_syntax = "initng"