codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Upstart job files3" Maintainer: Michael Biebl <biebl@debian.org>4" James Hunt <james.hunt@ubuntu.com>5" Last Change: 2012 Jan 166" License: The Vim license7" Version: 0.48" Remark: Syntax highlighting for Upstart (init(8)) job files.9"10" It is inspired by the initng syntax file and includes sh.vim to do the11" highlighting of script blocks.12 13" quit when a syntax file was already loaded14if exists("b:current_syntax")15 finish16endif17 18let is_bash = 119syn include @Shell syntax/sh.vim20 21syn case match22 23" avoid need to use 'match' for most events24setlocal iskeyword+=-25 26syn match upstartComment /#.*$/ contains=upstartTodo27syn keyword upstartTodo TODO FIXME contained28 29syn region upstartString start=/"/ end=/"/ skip=/\\"/30 31syn region upstartScript matchgroup=upstartStatement start="script" end="end script" contains=@upstartShellCluster32 33syn cluster upstartShellCluster contains=@Shell34 35" one argument36syn keyword upstartStatement description author version instance expect37syn keyword upstartStatement pid kill normal console env exit export38syn keyword upstartStatement umask nice oom chroot chdir exec39 40" two arguments41syn keyword upstartStatement limit42 43" one or more arguments (events)44syn keyword upstartStatement emits45 46syn keyword upstartStatement on start stop47 48" flag, no parameter49syn keyword upstartStatement respawn service instance manual debug task50 51" prefix for exec or script 52syn keyword upstartOption pre-start post-start pre-stop post-stop53 54" option for kill55syn keyword upstartOption timeout56" option for oom57syn keyword upstartOption never58" options for console59syn keyword upstartOption output owner60" options for expect61syn keyword upstartOption fork daemon62" options for limit63syn keyword upstartOption unlimited64 65" 'options' for start/stop on66syn keyword upstartOption and or67 68" Upstart itself and associated utilities69syn keyword upstartEvent runlevel70syn keyword upstartEvent started71syn keyword upstartEvent starting72syn keyword upstartEvent startup73syn keyword upstartEvent stopped74syn keyword upstartEvent stopping75syn keyword upstartEvent control-alt-delete76syn keyword upstartEvent keyboard-request77syn keyword upstartEvent power-status-changed78 79" D-Bus80syn keyword upstartEvent dbus-activation81 82" Display Manager (ie gdm)83syn keyword upstartEvent desktop-session-start84syn keyword upstartEvent login-session-start85 86" mountall87syn keyword upstartEvent all-swaps88syn keyword upstartEvent filesystem89syn keyword upstartEvent mounted90syn keyword upstartEvent mounting91syn keyword upstartEvent local-filesystems92syn keyword upstartEvent remote-filesystems93syn keyword upstartEvent virtual-filesystems94 95" SysV umountnfs.sh96syn keyword upstartEvent mounted-remote-filesystems97 98" upstart-udev-bridge and ifup/down99syn match upstartEvent /\<\i\{-1,}-device-\(added\|removed\|up\|down\)/100 101" upstart-socket-bridge102syn keyword upstartEvent socket103 104hi def link upstartComment Comment105hi def link upstartTodo Todo106hi def link upstartString String107hi def link upstartStatement Statement108hi def link upstartOption Type109hi def link upstartEvent Define110 111let b:current_syntax = "upstart"112 