Mercurial > vim
comparison runtime/syntax/modconf.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | f14cbd913415 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim syntax file | |
2 " Language: Linux modutils modules.conf File | |
3 " Maintainer: Nikolai Weibull <source@pcppopper.org> | |
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 | |
8 if version < 600 | |
9 syntax clear | |
10 elseif exists("b:current_syntax") | |
11 finish | |
12 endif | |
13 | |
14 " comments | |
15 syn region modconfComment start="#" skip="\\$" end="$" contains=modconfTodo | |
16 | |
17 " todo | |
18 syn keyword modconfTodo FIXME TODO XXX NOTE | |
19 | |
20 " keywords and similar | |
21 syn match modconfBegin "^" skipwhite nextgroup=modconfCommand,modconfComment | |
22 | |
23 syn match modconfCommand "\(add\s\+\)\=(above\|below\|probe\|probeall\}" | |
24 syn region modconfCommand transparent matchgroup=modconfCommand start="\(add\s\+\)\=options" skip="\\$" end="$" contains=modconfModOpt | |
25 syn keyword modconfCommand define remove keep install insmod_opt else endif | |
26 syn keyword modconfCommand nextgroup=modconfPath skipwhite alias depfile generic_stringfile pcimapfile include isapnpmapfile usbmapfile parportmapfile ieee1394mapfile pnpbiosmapfile persistdir prune | |
27 syn match modconfCommand "path\(\[\w\+\]\)\=" nextgroup=modconfPath skipwhite | |
28 syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(if\|elseif\)" skip="\\$" end="$" contains=modconfOp | |
29 syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(post\|pre\)-\(install\|remove\)" skip="\\$" end="$" | |
30 | |
31 | |
32 " expressions and similay | |
33 syn match modconfOp contained "\s-[fnk]\>" | |
34 syn region modconfPath contained start="\(=\@=\)\=/" skip="\\$" end="\\\@!\_s" | |
35 syn match modconfModOpt contained "\<\w\+=\@=" | |
36 | |
37 if exists("modconf_minlines") | |
38 let b:modconf_minlines = modconf_minlines | |
39 else | |
40 let b:modconf_minlines = 50 | |
41 endif | |
42 exec "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 | |
47 if 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 | |
62 endif | |
63 | |
64 let b:current_syntax = "modconf" | |
65 | |
66 " vim: set sts=2 sw=2: |