7
|
1 " Vim syntax file
|
11062
|
2 " Language: eterm(1) configuration file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-21
|
7
|
5
|
375
|
6 if exists("b:current_syntax")
|
7
|
7 finish
|
|
8 endif
|
|
9
|
375
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn keyword etermTodo contained TODO FIXME XXX NOTE
|
|
14
|
389
|
15 syn region etermComment display oneline start='^#' end='$'
|
375
|
16 \ contains=etermTodo,@Spell
|
|
17
|
389
|
18 syn match etermMagic display '^<Eterm-[0-9.]\+>$'
|
7
|
19
|
375
|
20 syn match etermNumber contained display '\<\(\d\+\|0x\x\{1,2}\)\>'
|
|
21
|
|
22 syn region etermString contained display oneline start=+"+
|
|
23 \ skip=+\\"+ end=+"+
|
|
24
|
|
25 syn keyword etermBoolean contained on off true false yes no
|
|
26
|
|
27 syn keyword etermPreProc contained appname exec get put random version
|
|
28 \ include preproc
|
7
|
29
|
375
|
30 syn keyword etermFunctions contained copy exit kill nop paste save
|
|
31 \ scroll search spawn
|
|
32
|
|
33 syn cluster etermGeneral contains=etermComment,etermFunction,
|
|
34 \ etermPreProc
|
7
|
35
|
375
|
36 syn keyword etermKeyMod contained ctrl shift lock mod1 mod2 mod3 mod4
|
|
37 \ mod5 alt meta anymod
|
|
38 syn keyword etermKeyMod contained button1 button2 button3 button4
|
|
39 \ button5
|
|
40
|
|
41 syn keyword etermColorOptions contained video nextgroup=etermVideoOptions
|
|
42 \ skipwhite
|
|
43
|
|
44 syn keyword etermVideoType contained normal reverse
|
|
45
|
|
46 syn keyword etermColorOptions contained foreground background cursor
|
|
47 \ cursor_text pointer
|
|
48 \ nextgroup=etermColorType skipwhite
|
7
|
49
|
375
|
50 syn keyword etermColorType contained bd ul
|
|
51 syn match etermColorType contained display '\<\%(\d\|1[0-5]\)'
|
|
52
|
|
53 syn keyword etermColorOptions contained color
|
|
54 \ nextgroup=etermColorNumber skipwhite
|
7
|
55
|
375
|
56 syn keyword etermColorNumber contained bd ul nextgroup=etermColorSpec
|
|
57 \ skipwhite
|
|
58 syn match etermColorNumber contained display '\<\%(\d\|1[0-5]\)'
|
|
59 \ nextgroup=etermColorSpec skipwhite
|
|
60
|
|
61 syn match etermColorSpec contained display '\S\+'
|
|
62
|
|
63 syn region etermColorContext fold transparent matchgroup=etermContext
|
839
|
64 \ start='^\s*begin\s\+color\>'
|
375
|
65 \ end='^\s*end\>'
|
|
66 \ contains=@etermGeneral,etermColorOptions
|
|
67
|
|
68 syn keyword etermAttrOptions contained geometry nextgroup=etermGeometry
|
|
69 \ skipwhite
|
7
|
70
|
375
|
71 syn match etermGeometry contained display '\d\+x\d++\d\++\d\+'
|
|
72
|
|
73 syn keyword etermAttrOptions contained scrollbar_type
|
|
74 \ nextgroup=etermScrollbarType skipwhite
|
|
75
|
|
76 syn keyword etermScrollbarType contained motif xterm next
|
|
77
|
|
78 syn keyword etermAttrOptions contained font nextgroup=etermFontType
|
|
79 \ skipwhite
|
7
|
80
|
375
|
81 syn keyword etermFontType contained bold nextgroup=etermFont skipwhite
|
|
82 syn match etermFontType contained display '[0-5]' nextgroup=etermFont
|
|
83 \ skipwhite
|
|
84
|
|
85 syn match etermFont contained display '\S\+'
|
|
86
|
|
87 syn keyword etermFontType contained default nextgroup=etermNumber
|
|
88 \ skipwhite
|
|
89
|
|
90 syn keyword etermFontType contained proportional nextgroup=etermBoolean
|
|
91 \ skipwhite
|
|
92
|
|
93 syn keyword etermFontType contained fx nextgroup=etermString skipwhite
|
7
|
94
|
375
|
95 syn keyword etermAttrOptions contained title name iconname
|
|
96 \ nextgroup=etermString skipwhite
|
|
97
|
|
98 syn keyword etermAttrOptions contained scrollbar_width desktop
|
|
99 \ nextgroup=etermNumber skipwhite
|
|
100
|
|
101 syn region etermAttrContext fold transparent matchgroup=etermContext
|
839
|
102 \ start='^\s*begin\s\+attributes\>'
|
375
|
103 \ end='^\s*end\>'
|
|
104 \ contains=@etermGeneral,etermAttrOptions
|
|
105
|
|
106 syn keyword etermIClassOptions contained icon path nextgroup=etermString
|
|
107 \ skipwhite
|
|
108 syn keyword etermIClassOptions contained cache nextgroup=etermNumber
|
|
109 \ skipwhite
|
|
110 syn keyword etermIClassOptions contained anim nextgroup=etermNumber
|
|
111 \ skipwhite
|
7
|
112
|
375
|
113 syn region etermIClassContext fold transparent matchgroup=etermContext
|
839
|
114 \ start='^\s*begin\s\+imageclasses\>'
|
375
|
115 \ end='^\s*end\>'
|
|
116 \ contains=@etermGeneral,etermImageContext,
|
|
117 \ etermIClassOptions
|
|
118
|
|
119 syn keyword etermImageOptions contained type nextgroup=etermImageType
|
|
120 \ skipwhite
|
7
|
121
|
375
|
122 syn keyword etermImageTypes contained background trough anchor up_arrow
|
|
123 \ left_arrow right_arrow menu menuitem
|
|
124 \ submenu button buttonbar down_arrow
|
|
125
|
|
126 syn keyword etermImageOptions contained mode nextgroup=etermImageModes
|
|
127 \ skipwhite
|
|
128
|
|
129 syn keyword etermImageModes contained image trans viewport auto solid
|
|
130 \ nextgroup=etermImageModesAllow skipwhite
|
|
131 syn keyword etermImageModesAllow contained allow nextgroup=etermImageModesR
|
|
132 \ skipwhite
|
|
133 syn keyword etermImageModesR contained image trans viewport auto solid
|
|
134
|
|
135 syn keyword etermImageOptions contained state nextgroup=etermImageState
|
|
136 \ skipwhite
|
7
|
137
|
375
|
138 syn keyword etermImageState contained normal selected clicked disabled
|
|
139
|
|
140 syn keyword etermImageOptions contained color nextgroup=etermImageColorFG
|
|
141 \ skipwhite
|
|
142
|
|
143 syn keyword etermImageColorFG contained '\S\+' nextgroup=etermImageColorBG
|
|
144 \ skipwhite
|
|
145
|
|
146 syn keyword etermImageColorBG contained '\S\+'
|
7
|
147
|
375
|
148 syn keyword etermImageOptions contained file nextgroup=etermString
|
|
149 \ skipwhite
|
|
150
|
|
151 syn keyword etermImageOptions contained geom nextgroup=etermImageGeom
|
|
152 \ skipwhite
|
|
153
|
|
154 syn match etermImageGeom contained display
|
|
155 \ '\s\+\%(\d\+x\d\++\d\++\d\+\)\=:\%(\%(tie\|scale\|hscale\|vscale\|propscale\)d\=\)\='
|
|
156
|
|
157 syn keyword etermImageOptions contained cmod colormod
|
|
158 \ nextgroup=etermImageCmod skipwhite
|
7
|
159
|
375
|
160 syn keyword etermImageCmod contained image red green blue
|
|
161 \ nextgroup=etermImageBrightness skipwhite
|
|
162
|
|
163 syn match etermImageBrightness contained display '\<\(\d\+\|0x\x\{1,2}\)\>'
|
|
164 \ nextgroup=etermImageContrast skipwhite
|
|
165
|
|
166 syn match etermImageContrast contained display '\<\(\d\+\|0x\x\{1,2}\)\>'
|
|
167 \ nextgroup=etermImageGamma skipwhite
|
7
|
168
|
375
|
169 syn match etermImageGamma contained display '\<\(\d\+\|0x\x\{1,2}\)\>'
|
|
170 \ nextgroup=etermImageGamma skipwhite
|
|
171
|
389
|
172 syn region etermImageOptions contained display oneline
|
|
173 \ matchgroup=etermImageOptions
|
375
|
174 \ start='border\|bevel\%(\s\+\%(up\|down\)\)\|padding'
|
|
175 \ end='$' contains=etermNumber
|
|
176
|
|
177 syn region etermImageContext contained fold transparent
|
|
178 \ matchgroup=etermContext
|
839
|
179 \ start='^\s*begin\s\+image\>'
|
375
|
180 \ end='^\s*end\>'
|
|
181 \ contains=@etermGeneral,etermImageOptions
|
7
|
182
|
375
|
183 syn keyword etermMenuItemOptions contained action
|
|
184 \ nextgroup=etermMenuItemAction skipwhite
|
|
185
|
|
186 syn keyword etermMenuItemAction contained string echo submenu script
|
|
187 \ nextgroup=etermString skipwhite
|
|
188
|
|
189 syn keyword etermMenuItemAction contained separator
|
|
190
|
|
191 syn keyword etermMenuItemOptions contained text rtext nextgroup=etermString
|
|
192 \ skipwhite
|
|
193
|
|
194 syn region etermMenuItemContext contained fold transparent
|
|
195 \ matchgroup=etermContext
|
839
|
196 \ start='^\s*begin\s\+menuitem\>'
|
375
|
197 \ end='^\s*end\>'
|
|
198 \ contains=@etermGeneral,etermMenuItemOptions
|
|
199
|
|
200 syn keyword etermMenuOptions contained title nextgroup=etermString
|
|
201 \ skipwhite
|
|
202
|
|
203 syn keyword etermMenuOptions contained font_name nextgroup=etermFont
|
|
204 \ skipwhite
|
|
205
|
|
206 syn match etermMenuOptions contained display '\<sep\>\|-'
|
|
207
|
|
208 syn region etermMenuContext fold transparent matchgroup=etermContext
|
839
|
209 \ start='^\s*begin\s\+menu\>'
|
375
|
210 \ end='^\s*end\>'
|
|
211 \ contains=@etermGeneral,etermMenuOptions,
|
|
212 \ etermMenuItemContext
|
|
213
|
|
214 syn keyword etermBind contained bind nextgroup=etermBindMods
|
|
215 \ skipwhite
|
|
216
|
|
217 syn keyword etermBindMods contained ctrl shift lock mod1 mod2 mod3 mod4
|
|
218 \ mod5 alt meta anymod
|
|
219 \ nextgroup=etermBindMods skipwhite
|
|
220
|
|
221 syn keyword etermBindTo contained to nextgroup=etermBindType
|
|
222 \ skipwhite
|
7
|
223
|
375
|
224 syn keyword etermBindType contained string echo menu script
|
|
225 \ nextgroup=etermBindParam skipwhite
|
|
226
|
|
227 syn match etermBindParam contained display '\S\+'
|
7
|
228
|
375
|
229 syn region etermActionsContext fold transparent matchgroup=etermContext
|
839
|
230 \ start='^\s*begin\s\+actions\>'
|
375
|
231 \ end='^\s*end\>'
|
|
232 \ contains=@etermGeneral,etermActionsOptions
|
7
|
233
|
375
|
234 syn keyword etermButtonOptions contained font nextgroup=etermFont skipwhite
|
|
235 syn keyword etermButtonOptions contained visible nextgroup=etermBoolean
|
|
236 \ skipwhite
|
|
237 syn keyword etermButtonOptions contained dock nextgroup=etermDockOption
|
|
238 \ skipwhite
|
7
|
239
|
375
|
240 syn keyword etermDockOption contained top bottom no
|
|
241
|
|
242 syn keyword etermButton contained button nextgroup=etermButtonText
|
|
243 \ skipwhite
|
7
|
244
|
375
|
245 syn region etermButtonText contained display oneline start=+"+
|
|
246 \ skip=+\\"+ end=+"+
|
|
247 \ nextgroup=etermButtonIcon skipwhite
|
7
|
248
|
375
|
249 syn keyword etermButtonIcon contained icon nextgroup=etermButtonIconFile
|
|
250 \ skipwhite
|
|
251
|
|
252 syn keyword etermButtonIconFile contained '\S\+' nextgroup=etermButtonAction
|
|
253 \ skipwhite
|
7
|
254
|
375
|
255 syn keyword etermButtonAction contained action nextgroup=etermBindType
|
|
256 \ skipwhite
|
7
|
257
|
375
|
258 syn region etermButtonContext fold transparent matchgroup=etermContext
|
839
|
259 \ start='^\s*begin\s\+button_bar\>'
|
375
|
260 \ end='^\s*end\>'
|
|
261 \ contains=@etermGeneral,etermButtonOptions
|
|
262
|
|
263 syn keyword etermMultiOptions contained encoding nextgroup=etermEncoding
|
|
264 \ skipwhite
|
|
265
|
|
266 syn keyword etermEncoding eucj sjis euckr big5 gb
|
|
267 syn match etermEncoding display 'iso-10646'
|
7
|
268
|
375
|
269 syn keyword etermMultiOptions contained font nextgroup=etermFontType
|
|
270 \ skipwhite
|
|
271
|
|
272 syn region etermMultiContext fold transparent matchgroup=etermContext
|
839
|
273 \ start='^\s*begin\s\+multichar\>'
|
|
274 \ end='^\s*end\>'
|
375
|
275 \ contains=@etermGeneral,etermMultiOptions
|
7
|
276
|
375
|
277 syn keyword etermXimOptions contained input_method
|
|
278 \ nextgroup=etermInputMethod skipwhite
|
|
279
|
|
280 syn match etermInputMethod contained display '\S+'
|
7
|
281
|
375
|
282 syn keyword etermXimOptions contained preedit_type
|
|
283 \ nextgroup=etermPreeditType skipwhite
|
|
284
|
|
285 syn keyword etermPreeditType contained OverTheSpot OffTheSpot Root
|
7
|
286
|
375
|
287 syn region etermXimContext fold transparent matchgroup=etermContext
|
839
|
288 \ start='^\s*begin\s\+xim\>'
|
|
289 \ end='^\s*end\>'
|
375
|
290 \ contains=@etermGeneral,etermXimOptions
|
7
|
291
|
375
|
292 syn keyword etermTogOptions contained map_alert visual_bell login_shell
|
|
293 \ scrollbar utmp_logging meta8 iconic
|
|
294 \ no_input home_on_output home_on_input
|
|
295 \ scrollbar_floating scrollbar_right
|
|
296 \ scrollbar_popup borderless double_buffer
|
|
297 \ no_cursor pause xterm_select select_line
|
|
298 \ select_trailing_spaces report_as_keysyms
|
|
299 \ itrans immotile_trans buttonbar
|
|
300 \ resize_gravity nextgroup=etermBoolean
|
|
301 \ skipwhite
|
7
|
302
|
375
|
303 syn region etermTogContext fold transparent matchgroup=etermContext
|
839
|
304 \ start='^\s*begin\s\+toggles\>'
|
375
|
305 \ end='^\s*end\>'
|
|
306 \ contains=@etermGeneral,etermTogOptions
|
|
307
|
|
308 syn keyword etermKeyboardOptions contained smallfont_key bigfont_key keysym
|
|
309 \ nextgroup=etermKeysym skipwhite
|
7
|
310
|
375
|
311 syn keyword etermKeysym contained '\S\+' nextgroup=etermString
|
|
312 \ skipwhite
|
|
313
|
|
314 syn keyword etermKeyboardOptions contained meta_mod alt_mod numlock_mod
|
|
315 \ nextgroup=etermNumber skipwhite
|
|
316
|
|
317 syn keyword etermKeyboardOptions contained greek app_keypad app_cursor
|
|
318 \ nextgroup=etermBoolean skipwhite
|
7
|
319
|
375
|
320 syn region etermKeyboardContext fold transparent matchgroup=etermContext
|
839
|
321 \ start='^\s*begin\s\+keyboard\>'
|
375
|
322 \ end='^\s*end\>'
|
|
323 \ contains=@etermGeneral,etermKeyboardOptions
|
|
324
|
|
325 syn keyword etermMiscOptions contained print_pipe cut_chars finished_title
|
|
326 \ finished_text term_name exec
|
|
327 \ nextgroup=etermString skipwhite
|
|
328
|
|
329 syn keyword etermMiscOptions contained save_lines min_anchor_size
|
|
330 \ border_width line_space
|
7
|
331
|
375
|
332 syn region etermMiscContext fold transparent matchgroup=etermContext
|
839
|
333 \ start='^\s*begin\s\+misc\>'
|
375
|
334 \ end='^\s*end\>'
|
|
335 \ contains=@etermGeneral,etermMiscOptions
|
7
|
336
|
375
|
337 syn keyword etermEScreenOptions contained url nextgroup=etermURL skipwhite
|
|
338
|
|
339 syn match etermURL contained display
|
|
340 \ '\<\%(screen\|twin\)://\%([^@:/]\+\%(@[^:/]\+\%(:[^/]\+\)\=\)\=\)\=/\S\+'
|
|
341
|
|
342 syn keyword etermEScreenOptions contained firewall
|
7
|
343
|
375
|
344 syn keyword etermEScreenOptions contained delay nextgroup=etermNumber
|
|
345 \ skipwhite
|
|
346
|
|
347 syn keyword etermEScreenOptions contained bbar_font nextgroup=etermFont
|
|
348 \ skipwhite
|
7
|
349
|
375
|
350 syn keyword etermEScreenOptions contained bbar_dock nextgroup=etermDockOption
|
|
351 \ skipwhite
|
|
352
|
|
353 syn region etermEScreenContext fold transparent matchgroup=etermContext
|
839
|
354 \ start='^\s*begin\s\+escreen\>'
|
375
|
355 \ end='^\s*end\>'
|
|
356 \ contains=@etermGeneral,etermEScreenOptions
|
7
|
357
|
|
358 if exists("eterm_minlines")
|
|
359 let b:eterm_minlines = eterm_minlines
|
|
360 else
|
375
|
361 let b:eterm_minlines = 50
|
7
|
362 endif
|
|
363 exec "syn sync minlines=" . b:eterm_minlines
|
|
364
|
375
|
365 hi def link etermTodo Todo
|
|
366 hi def link etermComment Comment
|
|
367 hi def link etermMagic PreProc
|
|
368 hi def link etermNumber Number
|
|
369 hi def link etermString String
|
|
370 hi def link etermBoolean Boolean
|
|
371 hi def link etermPreProc PreProc
|
|
372 hi def link etermFunctions Function
|
|
373 hi def link etermKeyMod Constant
|
|
374 hi def link etermOption Keyword
|
|
375 hi def link etermColorOptions etermOption
|
|
376 hi def link etermColor String
|
|
377 hi def link etermVideoType Type
|
|
378 hi def link etermColorType Type
|
|
379 hi def link etermColorNumber Number
|
|
380 hi def link etermColorSpec etermColor
|
|
381 hi def link etermContext Keyword
|
|
382 hi def link etermAttrOptions etermOption
|
|
383 hi def link etermGeometry String
|
|
384 hi def link etermScrollbarType Type
|
|
385 hi def link etermFontType Type
|
|
386 hi def link etermIClassOptions etermOption
|
|
387 hi def link etermImageOptions etermOption
|
|
388 hi def link etermImageTypes Type
|
|
389 hi def link etermImageModes Type
|
|
390 hi def link etermImageModesAllow Keyword
|
|
391 hi def link etermImageModesR Type
|
|
392 hi def link etermImageState Keyword
|
|
393 hi def link etermImageColorFG etermColor
|
|
394 hi def link etermImageColorBG etermColor
|
|
395 hi def link etermImageGeom String
|
|
396 hi def link etermImageCmod etermOption
|
|
397 hi def link etermImageBrightness Number
|
|
398 hi def link etermImageContrast Number
|
|
399 hi def link etermImageGamma Number
|
|
400 hi def link etermMenuItemOptions etermOption
|
|
401 hi def link etermMenuItemAction Keyword
|
|
402 hi def link etermMenuOptions etermOption
|
|
403 hi def link etermBind Keyword
|
|
404 hi def link etermBindMods Identifier
|
|
405 hi def link etermBindTo Keyword
|
|
406 hi def link etermBindType Type
|
|
407 hi def link etermBindParam String
|
|
408 hi def link etermButtonOptions etermOption
|
|
409 hi def link etermDockOption etermOption
|
|
410 hi def link etermButtonText String
|
|
411 hi def link etermButtonIcon String
|
|
412 hi def link etermButtonIconFile String
|
|
413 hi def link etermButtonAction Keyword
|
|
414 hi def link etermMultiOptions etermOption
|
|
415 hi def link etermEncoding Identifier
|
|
416 hi def link etermXimOptions etermOption
|
|
417 hi def link etermInputMethod Identifier
|
|
418 hi def link etermPreeditType Type
|
|
419 hi def link etermTogOptions etermOption
|
|
420 hi def link etermKeyboardOptions etermOption
|
|
421 hi def link etermKeysym Constant
|
|
422 hi def link etermMiscOptions etermOption
|
|
423 hi def link etermEScreenOptions etermOption
|
|
424 hi def link etermURL Identifier
|
7
|
425
|
|
426 let b:current_syntax = "eterm"
|
|
427
|
375
|
428 let &cpo = s:cpo_save
|
|
429 unlet s:cpo_save
|