annotate runtime/syntax/initng.vim @ 7272:17333ebd2bbd

commit https://github.com/vim/vim/commit/d042dc825c9b97dacd84d4728f88300da4d5b6b9 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 24 19:18:36 2015 +0100 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Thu, 26 Nov 2015 08:22:10 +0100
parents 7bc41231fbc7
children 5b7ea82bc18f
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
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
3 " Maintainer: Elan Ruusamäe <glen@pld-linux.org>
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 unlet! b:current_syntax
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
24 syn include @shTop syntax/sh.vim
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
25
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
26 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
27 syn cluster initngServiceCluster contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
28
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
29 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
30 syn cluster initngActionCluster contains=@shTop
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
31
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
32 syn match initngDelim /[{}]/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
33
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
34 syn region initngString start=/"/ end=/"/ skip=/\\"/
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
35
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
36 " option = value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
37 syn match initngServiceOption /.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
38 " option without value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
39 syn match initngServiceOption /\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
40
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
41 " options with value
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
42 syn keyword initngServiceKeywords also_stop need use nice setuid contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
43 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
44 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
45 syn keyword initngServiceKeywords provide lockfile daemon_stops_badly contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
46 syn match initngServiceKeywords /\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
47 syn match initngServiceKeywords /env\s\+\w\+/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
48
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
49 " rlimits
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
50 syn keyword initngServiceKeywords rlimit_cpu_hard rlimit_core_soft contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
51
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
52 " single options
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
53 syn keyword initngServiceKeywords last respawn network_provider require_network require_file critical forks contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
54 " cron options
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
55 syn keyword initngServiceKeywords hourly contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
56 syn match initngVariable /\${\?\w\+\}\?/
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
57
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
58 " Substituted @foo@ macros:
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
59 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
60 syn match initngSubstMacro /@[^@]\+@/ contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
61 syn cluster initngActionCluster add=initngSubstMacro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
62 syn cluster shCommandSubList add=initngSubstMacro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
63
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
64 " Comments:
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
65 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
66 syn cluster initngCommentGroup contains=initngTodo,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
67 syn keyword initngTodo TODO FIXME XXX contained
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
68 syn match initngComment /#.*$/ contains=@initngCommentGroup
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
69
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
70 " install_service #macros
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
71 " TODO: syntax check for ifd-endd pairs
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
72 " ==========
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
73 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
74 syn cluster shCommentGroup add=initngDefine
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
75 syn cluster initngCommentGroup add=initngDefine
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
76
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
77 hi def link initngComment Comment
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
78 hi def link initngTodo Todo
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
79
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
80 hi def link initngString String
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
81 hi def link initngServiceKeywords Define
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
82
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
83 hi def link initngServiceHeader Keyword
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
84 hi def link initngActionHeader Type
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
85 hi def link initngDelim Delimiter
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
86
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
87 hi def link initngVariable PreProc
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
88 hi def link initngSubstMacro Comment
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
89 hi def link initngDefine Macro
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
90
e63691e7c504 updated for version 7.1a
vimboss
parents:
diff changeset
91 let b:current_syntax = "initng"