Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/pcap.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Config file: printcap | |
3 " Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> (defunct) | |
4 " Modified by Bram | |
5 " Last Change: 2003 May 11 | |
6 | |
7 " For version 5.x: Clear all syntax items | |
8 " For version 6.x: Quit when a syntax file was already loaded | |
9 if version < 600 | |
10 syntax clear | |
11 elseif exists("b:current_syntax") | |
12 finish | |
13 endif | |
14 | |
15 "define keywords | |
16 if version < 600 | |
17 set isk=@,46-57,_,-,#,=,192-255 | |
18 else | |
19 setlocal isk=@,46-57,_,-,#,=,192-255 | |
20 endif | |
21 | |
22 "first all the bad guys | |
23 syn match pcapBad '^.\+$' "define any line as bad | |
24 syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad | |
25 syn match pcapBadword ':' contained "define any single : as bad | |
26 syn match pcapBadword '\\' contained "define any single \ as bad | |
27 "then the good boys | |
28 " Boolean keywords | |
29 syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' | |
30 " Numeric Keywords | |
31 syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' | |
32 " String Keywords | |
33 syn match pcapKeyword contained ':\(af\|cf\|df\|ff\|gf\|if\|lf\|lo\|lp\|nd\|nf\|of\|rf\|rg\|rm\|rp\|sd\|st\|tf\|tr\|vf\)=\k*' | |
34 " allow continuation | |
35 syn match pcapEnd ':\\$' contained | |
36 " | |
37 syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword | |
38 syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd | |
39 syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' | |
40 syn match pcapComment "#.*$" | |
41 | |
42 syn sync minlines=50 | |
43 | |
44 | |
45 " Define the default highlighting. | |
46 " For version 5.7 and earlier: only when not done already | |
47 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
48 if version >= 508 || !exists("did_pcap_syntax_inits") | |
49 if version < 508 | |
50 let did_pcap_syntax_inits = 1 | |
51 command -nargs=+ HiLink hi link <args> | |
52 else | |
53 command -nargs=+ HiLink hi def link <args> | |
54 endif | |
55 | |
56 HiLink pcapBad WarningMsg | |
57 HiLink pcapBadword WarningMsg | |
58 HiLink pcapComment Comment | |
59 | |
60 delcommand HiLink | |
61 endif | |
62 | |
63 let b:current_syntax = "pcap" | |
64 | |
65 " vim: ts=8 |