2 " Config file: printcap
3 " Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> (defunct)
5 " Last Change: 2003 May 11
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
17 set isk=@,46-57,_,-,#,=,192-255
19 setlocal isk=@,46-57,_,-,#,=,192-255
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
29 syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)'
31 syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+'
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*'
35 syn match pcapEnd ':\\$' contained
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 "#.*$"
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")
50 let did_pcap_syntax_inits = 1
51 command -nargs=+ HiLink hi link <args>
53 command -nargs=+ HiLink hi def link <args>
56 HiLink pcapBad WarningMsg
57 HiLink pcapBadword WarningMsg
58 HiLink pcapComment Comment
63 let b:current_syntax = "pcap"