7
|
1 " Vim syntax file
|
|
2 " This is a GENERATED FILE. Please always refer to source file at the URI below.
|
|
3 " Language: lilo configuration (lilo.conf)
|
|
4 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
|
5 " Last Change: 2003 May 04
|
|
6 " URL: http://trific.ath.cx/Ftp/vim/syntax/lilo.vim
|
|
7
|
|
8 " Setup
|
|
9 if version >= 600
|
|
10 if exists("b:current_syntax")
|
|
11 finish
|
|
12 endif
|
|
13 else
|
|
14 syntax clear
|
|
15 endif
|
|
16
|
|
17 if version >= 600
|
|
18 command -nargs=1 SetIsk setlocal iskeyword=<args>
|
|
19 else
|
|
20 command -nargs=1 SetIsk set iskeyword=<args>
|
|
21 endif
|
|
22 SetIsk @,48-57,.,-,_
|
|
23 delcommand SetIsk
|
|
24
|
|
25 syn case ignore
|
|
26
|
|
27 " Base constructs
|
|
28 syn match liloError "\S\+"
|
|
29 syn match liloComment "#.*$"
|
|
30 syn match liloEnviron "\$\w\+" contained
|
|
31 syn match liloEnviron "\${[^}]\+}" contained
|
|
32 syn match liloDecNumber "\d\+" contained
|
|
33 syn match liloHexNumber "0[xX]\x\+" contained
|
|
34 syn match liloDecNumberP "\d\+p\=" contained
|
|
35 syn match liloSpecial contained "\\\(\"\|\\\|$\)"
|
|
36 syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
|
|
37 syn match liloLabel "\S\+" contained contains=liloSpecial,liloEnviron
|
|
38 syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
|
|
39 syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
|
|
40 syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
|
|
41 syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
|
|
42
|
|
43 " Path
|
|
44 syn keyword liloOption backup bitmap boot disktab force-backup install keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
45 syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
46 syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
47 syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
48
|
|
49 " Other
|
|
50 syn keyword liloOption menu-scheme raid-extra-boot serial nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
|
51 syn keyword liloOption default nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
|
52 syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
|
53 syn keyword liloImageOpt alias label nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
|
54 syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
|
55 syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
|
56
|
|
57 " Symbolic
|
|
58 syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
|
|
59
|
|
60 " Number
|
|
61 syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
|
|
62 syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
|
|
63
|
|
64 " String
|
|
65 syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
|
66 syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
|
67 syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
|
68
|
|
69 " Hex number
|
|
70 syn keyword liloImageOpt map-drive to nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
|
|
71 syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
|
|
72
|
|
73 " Number list
|
|
74 syn keyword liloOption bmp-colors bmp-timer nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
|
|
75
|
|
76 " Number list, some of the numbers followed by p
|
|
77 syn keyword liloOption bmp-table nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
|
|
78
|
|
79 " Flag
|
|
80 syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt
|
|
81 syn keyword liloKernelOpt read-only read-write
|
|
82 syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe
|
|
83 syn keyword liloDiskOpt change activate deactivate inaccessible reset
|
|
84
|
|
85 " Image
|
|
86 syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
87 syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
88 syn keyword liloChRules change-rules
|
|
89
|
|
90 " Vga keywords
|
|
91 syn keyword liloVgaKeyword ask ext extended normal contained
|
|
92
|
|
93 " Comment followed by equal sign and ...
|
|
94 syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
|
95 syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty
|
|
96 syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
|
|
97 syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
|
|
98 syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
|
|
99 syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
|
100 syn match liloEqLabelComment "#.*$" contained nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
|
101 syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
|
|
102 syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
|
|
103 syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
|
104
|
|
105 " Equal sign followed by ...
|
|
106 syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
|
|
107 syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty
|
|
108 syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
|
|
109 syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
|
|
110 syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
|
|
111 syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
|
|
112 syn match liloEqLabel "=" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
|
|
113 syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
|
|
114 syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
|
|
115 syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
|
|
116
|
|
117 " Comment followed by ...
|
|
118 syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty
|
|
119 syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty
|
|
120 syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty
|
|
121 syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
|
|
122 syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
|
|
123 syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
|
|
124 syn match liloLabelComment "#.*$" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
|
|
125 syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
|
|
126 syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
|
|
127 syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
|
|
128
|
|
129 " Define the default highlighting
|
|
130 if version >= 508 || !exists("did_lilo_syntax_inits")
|
|
131 if version < 508
|
|
132 let did_lilo_syntax_inits = 1
|
|
133 command -nargs=+ HiLink hi link <args>
|
|
134 else
|
|
135 command -nargs=+ HiLink hi def link <args>
|
|
136 endif
|
|
137
|
|
138 HiLink liloEqPath liloEquals
|
|
139 HiLink liloEqWord liloEquals
|
|
140 HiLink liloEqVga liloEquals
|
|
141 HiLink liloEqDecNumber liloEquals
|
|
142 HiLink liloEqHexNumber liloEquals
|
|
143 HiLink liloEqNumber liloEquals
|
|
144 HiLink liloEqString liloEquals
|
|
145 HiLink liloEqLabel liloEquals
|
|
146 HiLink liloEqAnything liloEquals
|
|
147 HiLink liloEquals Special
|
|
148
|
|
149 HiLink liloError Error
|
|
150
|
|
151 HiLink liloEqPathComment liloComment
|
|
152 HiLink liloEqVgaComment liloComment
|
|
153 HiLink liloEqDecNumberComment liloComment
|
|
154 HiLink liloEqHexNumberComment liloComment
|
|
155 HiLink liloEqStringComment liloComment
|
|
156 HiLink liloEqLabelComment liloComment
|
|
157 HiLink liloEqAnythingComment liloComment
|
|
158 HiLink liloPathComment liloComment
|
|
159 HiLink liloVgaComment liloComment
|
|
160 HiLink liloDecNumberComment liloComment
|
|
161 HiLink liloHexNumberComment liloComment
|
|
162 HiLink liloNumberComment liloComment
|
|
163 HiLink liloStringComment liloComment
|
|
164 HiLink liloLabelComment liloComment
|
|
165 HiLink liloAnythingComment liloComment
|
|
166 HiLink liloComment Comment
|
|
167
|
|
168 HiLink liloDiskOpt liloOption
|
|
169 HiLink liloKernelOpt liloOption
|
|
170 HiLink liloImageOpt liloOption
|
|
171 HiLink liloOption Keyword
|
|
172
|
|
173 HiLink liloDecNumber liloNumber
|
|
174 HiLink liloHexNumber liloNumber
|
|
175 HiLink liloDecNumberP liloNumber
|
|
176 HiLink liloNumber Number
|
|
177 HiLink liloString String
|
|
178 HiLink liloPath Constant
|
|
179
|
|
180 HiLink liloSpecial Special
|
|
181 HiLink liloLabel Title
|
|
182 HiLink liloDecNumberList Special
|
|
183 HiLink liloDecNumberPList Special
|
|
184 HiLink liloAnything Normal
|
|
185 HiLink liloEnviron Identifier
|
|
186 HiLink liloVgaKeyword Identifier
|
|
187 HiLink liloImage Type
|
|
188 HiLink liloChRules Preproc
|
|
189 HiLink liloDisk Preproc
|
|
190
|
|
191 delcommand HiLink
|
|
192 endif
|
|
193
|
|
194 let b:current_syntax = "lilo"
|