Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " This is a GENERATED FILE. Please always refer to source file at the URI below. |
| 3 | " Language: SysV-compatible init process control file `inittab' |
| 4 | " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> |
| 5 | " Last Change: 2002-09-13 |
| 6 | " URL: http://physics.muni.cz/~yeti/download/syntax/inittab.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 | syn case match |
| 18 | |
| 19 | " Base constructs |
| 20 | syn match inittabError "[^:]\+:"me=e-1 contained |
| 21 | syn match inittabError "[^:]\+$" contained |
| 22 | syn match inittabComment "^[#:].*$" contains=inittabFixme |
| 23 | syn match inittabComment "#.*$" contained contains=inittabFixme |
| 24 | syn keyword inittabFixme FIXME TODO XXX NOT |
| 25 | |
| 26 | " Shell |
| 27 | syn region inittabShString start=+"+ end=+"+ skip=+\\\\\|\\\"+ contained |
| 28 | syn region inittabShString start=+'+ end=+'+ contained |
| 29 | syn match inittabShOption "\s[-+][[:alnum:]]\+"ms=s+1 contained |
| 30 | syn match inittabShOption "\s--[:alnum:][-[:alnum:]]*"ms=s+1 contained |
| 31 | syn match inittabShCommand "/\S\+" contained |
| 32 | syn cluster inittabSh add=inittabShOption,inittabShString,inittabShCommand |
| 33 | |
| 34 | " Keywords |
| 35 | syn keyword inittabActionName respawn wait once boot bootwait off ondemand sysinit powerwait powerfail powerokwait powerfailnow ctrlaltdel kbrequest initdefault contained |
| 36 | |
| 37 | " Line parser |
| 38 | syn match inittabId "^[[:alnum:]~]\{1,4}" nextgroup=inittabColonRunLevels,inittabError |
| 39 | syn match inittabColonRunLevels ":" contained nextgroup=inittabRunLevels,inittabColonAction,inittabError |
| 40 | syn match inittabRunLevels "[0-6A-Ca-cSs]\+" contained nextgroup=inittabColonAction,inittabError |
| 41 | syn match inittabColonAction ":" contained nextgroup=inittabAction,inittabError |
| 42 | syn match inittabAction "\w\+" contained nextgroup=inittabColonProcess,inittabError contains=inittabActionName |
| 43 | syn match inittabColonProcess ":" contained nextgroup=inittabProcessPlus,inittabProcess,inittabError |
| 44 | syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError |
| 45 | syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment |
| 46 | |
| 47 | " Define the default highlighting |
| 48 | if version >= 508 || !exists("did_inittab_syntax_inits") |
| 49 | if version < 508 |
| 50 | let did_inittab_syntax_inits = 1 |
| 51 | command -nargs=+ HiLink hi link <args> |
| 52 | else |
| 53 | command -nargs=+ HiLink hi def link <args> |
| 54 | endif |
| 55 | |
| 56 | HiLink inittabComment Comment |
| 57 | HiLink inittabFixme Todo |
| 58 | HiLink inittabActionName Type |
| 59 | HiLink inittabError Error |
| 60 | HiLink inittabId Identifier |
| 61 | HiLink inittabRunLevels Special |
| 62 | |
| 63 | HiLink inittabColonProcess inittabColon |
| 64 | HiLink inittabColonAction inittabColon |
| 65 | HiLink inittabColonRunLevels inittabColon |
| 66 | HiLink inittabColon PreProc |
| 67 | |
| 68 | HiLink inittabShString String |
| 69 | HiLink inittabShOption Special |
| 70 | HiLink inittabShCommand Statement |
| 71 | |
| 72 | delcommand HiLink |
| 73 | endif |
| 74 | |
| 75 | let b:current_syntax = "inittab" |