1" Vim syntax file 2" Language: Linux modutils modules.conf File 3" Maintainer: Nikolai Weibull <[email protected]> 4" URL: http://www.pcppopper.org/vim/syntax/pcp/modconf/ 5" Latest Revision: 2004-05-22 6" arch-tag: b7981bdb-daa3-41d1-94b5-a3d60b627916 7 8if version < 600 9 syntax clear 10elseif exists("b:current_syntax") 11 finish 12endif 13 14" comments 15syn region modconfComment start="#" skip="\\$" end="$" contains=modconfTodo 16 17" todo 18syn keyword modconfTodo FIXME TODO XXX NOTE 19 20" keywords and similar 21syn match modconfBegin "^" skipwhite nextgroup=modconfCommand,modconfComment 22 23syn match modconfCommand "\(add\s\+\)\=(above\|below\|probe\|probeall\}" 24syn region modconfCommand transparent matchgroup=modconfCommand start="\(add\s\+\)\=options" skip="\\$" end="$" contains=modconfModOpt 25syn keyword modconfCommand define remove keep install insmod_opt else endif 26syn keyword modconfCommand nextgroup=modconfPath skipwhite alias depfile generic_stringfile pcimapfile include isapnpmapfile usbmapfile parportmapfile ieee1394mapfile pnpbiosmapfile persistdir prune 27syn match modconfCommand "path\(\[\w\+\]\)\=" nextgroup=modconfPath skipwhite 28syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(if\|elseif\)" skip="\\$" end="$" contains=modconfOp 29syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(post\|pre\)-\(install\|remove\)" skip="\\$" end="$" 30 31 32" expressions and similay 33syn match modconfOp contained "\s-[fnk]\>" 34syn region modconfPath contained start="\(=\@=\)\=/" skip="\\$" end="\\\@!\_s" 35syn match modconfModOpt contained "\<\w\+=\@=" 36 37if exists("modconf_minlines") 38 let b:modconf_minlines = modconf_minlines 39else 40 let b:modconf_minlines = 50 41endif 42exec "syn sync minlines=" . b:modconf_minlines 43 44" Define the default highlighting. 45" For version 5.7 and earlier: only when not done already 46" For version 5.8 and later: only when an item doesn't have highlighting yet 47if version >= 508 || !exists("did_modconf_syn_inits") 48 if version < 508 49 let did_modconf_syn_inits = 1 50 command -nargs=+ HiLink hi link <args> 51 else 52 command -nargs=+ HiLink hi def link <args> 53 endif 54 55 HiLink modconfComment Comment 56 HiLink modconfTodo Todo 57 HiLink modconfCommand Keyword 58 HiLink modconfPath String 59 HiLink modconfOp Identifier 60 HiLink modconfModOpt Identifier 61 delcommand HiLink 62endif 63 64let b:current_syntax = "modconf" 65 66" vim: set sts=2 sw=2: 67