home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / runtime / dos / syntax / eterm.vim < prev    next >
Encoding:
Text File  |  2010-08-15  |  19.1 KB  |  430 lines

  1. " Vim syntax file
  2. " Language:         eterm(1) configuration file
  3. " Maintainer:       Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision:  2006-04-21
  5.  
  6. if exists("b:current_syntax")
  7.   finish
  8. endif
  9.  
  10. let s:cpo_save = &cpo
  11. set cpo&vim
  12.  
  13. syn keyword etermTodo             contained TODO FIXME XXX NOTE
  14.  
  15. syn region  etermComment          display oneline start='^#' end='$'
  16.                                   \ contains=etermTodo,@Spell
  17.  
  18. syn match   etermMagic            display '^<Eterm-[0-9.]\+>$'
  19.  
  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
  29.  
  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
  35.  
  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
  49.  
  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
  55.  
  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
  64.                                   \ start='^\s*begin\s\+color\>'
  65.                                   \ end='^\s*end\>'
  66.                                   \ contains=@etermGeneral,etermColorOptions
  67.  
  68. syn keyword etermAttrOptions      contained geometry nextgroup=etermGeometry
  69.                                   \ skipwhite
  70.  
  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
  80.  
  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
  94.  
  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
  102.                                   \ start='^\s*begin\s\+attributes\>'
  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
  112.  
  113. syn region  etermIClassContext    fold transparent matchgroup=etermContext
  114.                                   \ start='^\s*begin\s\+imageclasses\>'
  115.                                   \ end='^\s*end\>'
  116.                                   \ contains=@etermGeneral,etermImageContext,
  117.                                   \ etermIClassOptions
  118.  
  119. syn keyword etermImageOptions     contained type nextgroup=etermImageType
  120.                                   \ skipwhite
  121.  
  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
  137.  
  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\+'
  147.  
  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
  159.  
  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
  168.  
  169. syn match   etermImageGamma       contained display '\<\(\d\+\|0x\x\{1,2}\)\>'
  170.                                   \ nextgroup=etermImageGamma skipwhite
  171.  
  172. syn region  etermImageOptions     contained display oneline
  173.                                   \ matchgroup=etermImageOptions
  174.                                   \ start='border\|bevel\%(\s\+\%(up\|down\)\)\|padding'
  175.                                   \ end='$' contains=etermNumber
  176.  
  177. syn region  etermImageContext     contained fold transparent
  178.                                   \ matchgroup=etermContext
  179.                                   \ start='^\s*begin\s\+image\>'
  180.                                   \ end='^\s*end\>'
  181.                                   \ contains=@etermGeneral,etermImageOptions
  182.  
  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
  196.                                   \ start='^\s*begin\s\+menuitem\>'
  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
  209.                                   \ start='^\s*begin\s\+menu\>'
  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
  223.  
  224. syn keyword etermBindType         contained string echo menu script
  225.                                   \ nextgroup=etermBindParam skipwhite
  226.  
  227. syn match   etermBindParam        contained display '\S\+'
  228.  
  229. syn region  etermActionsContext   fold transparent matchgroup=etermContext
  230.                                   \ start='^\s*begin\s\+actions\>'
  231.                                   \ end='^\s*end\>'
  232.                                   \ contains=@etermGeneral,etermActionsOptions
  233.  
  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
  239.  
  240. syn keyword etermDockOption       contained top bottom no
  241.  
  242. syn keyword etermButton           contained button nextgroup=etermButtonText
  243.                                   \ skipwhite
  244.  
  245. syn region  etermButtonText       contained display oneline start=+"+
  246.                                   \ skip=+\\"+ end=+"+
  247.                                   \ nextgroup=etermButtonIcon skipwhite
  248.  
  249. syn keyword etermButtonIcon       contained icon nextgroup=etermButtonIconFile
  250.                                   \ skipwhite
  251.  
  252. syn keyword etermButtonIconFile   contained '\S\+' nextgroup=etermButtonAction
  253.                                   \ skipwhite
  254.  
  255. syn keyword etermButtonAction     contained action nextgroup=etermBindType
  256.                                   \ skipwhite
  257.  
  258. syn region  etermButtonContext    fold transparent matchgroup=etermContext
  259.                                   \ start='^\s*begin\s\+button_bar\>'
  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'
  268.  
  269. syn keyword etermMultiOptions     contained font nextgroup=etermFontType
  270.                                   \ skipwhite
  271.  
  272. syn region  etermMultiContext     fold transparent matchgroup=etermContext
  273.                                   \ start='^\s*begin\s\+multichar\>'
  274.                                   \ end='^\s*end\>'
  275.                                   \ contains=@etermGeneral,etermMultiOptions
  276.  
  277. syn keyword etermXimOptions       contained input_method
  278.                                   \ nextgroup=etermInputMethod skipwhite
  279.  
  280. syn match   etermInputMethod      contained display '\S+'
  281.  
  282. syn keyword etermXimOptions       contained preedit_type
  283.                                   \ nextgroup=etermPreeditType skipwhite
  284.  
  285. syn keyword etermPreeditType      contained OverTheSpot OffTheSpot Root
  286.  
  287. syn region  etermXimContext       fold transparent matchgroup=etermContext
  288.                                   \ start='^\s*begin\s\+xim\>'
  289.                                   \ end='^\s*end\>'
  290.                                   \ contains=@etermGeneral,etermXimOptions
  291.  
  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
  302.  
  303. syn region  etermTogContext       fold transparent matchgroup=etermContext
  304.                                   \ start='^\s*begin\s\+toggles\>'
  305.                                   \ end='^\s*end\>'
  306.                                   \ contains=@etermGeneral,etermTogOptions
  307.  
  308. syn keyword etermKeyboardOptions  contained smallfont_key bigfont_key keysym
  309.                                   \ nextgroup=etermKeysym skipwhite
  310.  
  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
  319.  
  320. syn region  etermKeyboardContext  fold transparent matchgroup=etermContext
  321.                                   \ start='^\s*begin\s\+keyboard\>'
  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
  331.  
  332. syn region  etermMiscContext      fold transparent matchgroup=etermContext
  333.                                   \ start='^\s*begin\s\+misc\>'
  334.                                   \ end='^\s*end\>'
  335.                                   \ contains=@etermGeneral,etermMiscOptions
  336.  
  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
  343.  
  344. syn keyword etermEScreenOptions   contained delay nextgroup=etermNumber
  345.                                   \ skipwhite
  346.  
  347. syn keyword etermEScreenOptions   contained bbar_font nextgroup=etermFont
  348.                                   \ skipwhite
  349.  
  350. syn keyword etermEScreenOptions   contained bbar_dock nextgroup=etermDockOption
  351.                                   \ skipwhite
  352.  
  353. syn region  etermEScreenContext   fold transparent matchgroup=etermContext
  354.                                   \ start='^\s*begin\s\+escreen\>'
  355.                                   \ end='^\s*end\>'
  356.                                   \ contains=@etermGeneral,etermEScreenOptions
  357.  
  358. if exists("eterm_minlines")
  359.   let b:eterm_minlines = eterm_minlines
  360. else
  361.   let b:eterm_minlines = 50
  362. endif
  363. exec "syn sync minlines=" . b:eterm_minlines
  364.  
  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
  425.  
  426. let b:current_syntax = "eterm"
  427.  
  428. let &cpo = s:cpo_save
  429. unlet s:cpo_save
  430.