diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:44:24 +0000 |
commit | 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 (patch) | |
tree | 3537e168b860f2742f6029d70501b5ed7d15d345 /runtime/syntax/inittab.vim | |
parent | Initial commit. (diff) | |
download | vim-upstream.tar.xz vim-upstream.zip |
Adding upstream version 2:8.1.0875.upstream/2%8.1.0875upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/inittab.vim')
-rw-r--r-- | runtime/syntax/inittab.vim | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/runtime/syntax/inittab.vim b/runtime/syntax/inittab.vim new file mode 100644 index 0000000..82bf660 --- /dev/null +++ b/runtime/syntax/inittab.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: SysV-compatible init process control file `inittab' +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-09-13 +" URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim + +" Setup +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" Base constructs +syn match inittabError "[^:]\+:"me=e-1 contained +syn match inittabError "[^:]\+$" contained +syn match inittabComment "^[#:].*$" contains=inittabFixme +syn match inittabComment "#.*$" contained contains=inittabFixme +syn keyword inittabFixme FIXME TODO XXX NOT + +" Shell +syn region inittabShString start=+"+ end=+"+ skip=+\\\\\|\\\"+ contained +syn region inittabShString start=+'+ end=+'+ contained +syn match inittabShOption "\s[-+][[:alnum:]]\+"ms=s+1 contained +syn match inittabShOption "\s--[:alnum:][-[:alnum:]]*"ms=s+1 contained +syn match inittabShCommand "/\S\+" contained +syn cluster inittabSh add=inittabShOption,inittabShString,inittabShCommand + +" Keywords +syn keyword inittabActionName respawn wait once boot bootwait off ondemand sysinit powerwait powerfail powerokwait powerfailnow ctrlaltdel kbrequest initdefault contained + +" Line parser +syn match inittabId "^[[:alnum:]~]\{1,4}" nextgroup=inittabColonRunLevels,inittabError +syn match inittabColonRunLevels ":" contained nextgroup=inittabRunLevels,inittabColonAction,inittabError +syn match inittabRunLevels "[0-6A-Ca-cSs]\+" contained nextgroup=inittabColonAction,inittabError +syn match inittabColonAction ":" contained nextgroup=inittabAction,inittabError +syn match inittabAction "\w\+" contained nextgroup=inittabColonProcess,inittabError contains=inittabActionName +syn match inittabColonProcess ":" contained nextgroup=inittabProcessPlus,inittabProcess,inittabError +syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError +syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment + +" Define the default highlighting + +hi def link inittabComment Comment +hi def link inittabFixme Todo +hi def link inittabActionName Type +hi def link inittabError Error +hi def link inittabId Identifier +hi def link inittabRunLevels Special + +hi def link inittabColonProcess inittabColon +hi def link inittabColonAction inittabColon +hi def link inittabColonRunLevels inittabColon +hi def link inittabColon PreProc + +hi def link inittabShString String +hi def link inittabShOption Special +hi def link inittabShCommand Statement + + +let b:current_syntax = "inittab" |