diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-29 22:40:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-29 22:40:58 +0000 |
commit | 42eeac3552c5a5ea10f24373f76b93633b6c8604 (patch) | |
tree | 902f3158470a3e9c53850708cf982c85c6338796 /runtime/syntax/modconf.vim | |
parent | 24bbcfe8fe62ea43b1cea86243be4fdc8794140b (diff) | |
download | vim-git-42eeac3552c5a5ea10f24373f76b93633b6c8604.tar.gz |
updated for version 7.0097v7.0097
Diffstat (limited to 'runtime/syntax/modconf.vim')
-rw-r--r-- | runtime/syntax/modconf.vim | 78 |
1 files changed, 28 insertions, 50 deletions
diff --git a/runtime/syntax/modconf.vim b/runtime/syntax/modconf.vim index 569e13449..82cb98054 100644 --- a/runtime/syntax/modconf.vim +++ b/runtime/syntax/modconf.vim @@ -1,66 +1,44 @@ " Vim syntax file -" Language: Linux modutils modules.conf File -" Maintainer: Nikolai Weibull <source@pcppopper.org> -" URL: http://www.pcppopper.org/vim/syntax/pcp/modconf/ -" Latest Revision: 2004-05-22 -" arch-tag: b7981bdb-daa3-41d1-94b5-a3d60b627916 +" Language: modules.conf(5) configuration file +" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se> +" Latest Revision: 2005-06-29 -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif -" comments -syn region modconfComment start="#" skip="\\$" end="$" contains=modconfTodo +setlocal iskeyword=@,48-57,- -" todo -syn keyword modconfTodo FIXME TODO XXX NOTE +let s:cpo_save = &cpo +set cpo&vim -" keywords and similar -syn match modconfBegin "^" skipwhite nextgroup=modconfCommand,modconfComment +syn keyword modconfTodo FIXME TODO XXX NOTE -syn match modconfCommand "\(add\s\+\)\=(above\|below\|probe\|probeall\}" -syn region modconfCommand transparent matchgroup=modconfCommand start="\(add\s\+\)\=options" skip="\\$" end="$" contains=modconfModOpt -syn keyword modconfCommand define remove keep install insmod_opt else endif -syn keyword modconfCommand nextgroup=modconfPath skipwhite alias depfile generic_stringfile pcimapfile include isapnpmapfile usbmapfile parportmapfile ieee1394mapfile pnpbiosmapfile persistdir prune -syn match modconfCommand "path\(\[\w\+\]\)\=" nextgroup=modconfPath skipwhite -syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(if\|elseif\)" skip="\\$" end="$" contains=modconfOp -syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(post\|pre\)-\(install\|remove\)" skip="\\$" end="$" +syn region modconfComment start='#' skip='\\$' end='$' + \ contains=modconfTodo,@Spell +syn keyword modconfConditional if else elseif endif -" expressions and similay -syn match modconfOp contained "\s-[fnk]\>" -syn region modconfPath contained start="\(=\@=\)\=/" skip="\\$" end="\\\@!\_s" -syn match modconfModOpt contained "\<\w\+=\@=" +syn keyword modconfPreProc alias define include keep prune + \ post-install post-remove pre-install + \ pre-remove persistdir -if exists("modconf_minlines") - let b:modconf_minlines = modconf_minlines -else - let b:modconf_minlines = 50 -endif -exec "syn sync minlines=" . b:modconf_minlines +syn keyword modconfKeyword add above below install options probe probeall + \ remove -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_modconf_syn_inits") - if version < 508 - let did_modconf_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +syn keyword modconfIdentifier depfile insmod_opt path generic_stringfile + \ pcimapfile isapnpmapfile usbmapfile + \ parportmapfile ieee1394mapfile pnpbiosmapfile +syn match modconfIdentifier 'path\[[^]]\+\]' - HiLink modconfComment Comment - HiLink modconfTodo Todo - HiLink modconfCommand Keyword - HiLink modconfPath String - HiLink modconfOp Identifier - HiLink modconfModOpt Identifier - delcommand HiLink -endif +hi def link modconfTodo Todo +hi def link modconfComment Comment +hi def link modconfConditional Conditional +hi def link modconfPreProc PreProc +hi def link modconfKeyword Keyword +hi def link modconfIdentifier Identifier let b:current_syntax = "modconf" -" vim: set sts=2 sw=2: +let &cpo = s:cpo_save +unlet s:cpo_save |