annotate runtime/syntax/pcap.vim @ 1420:b63fe7400eb3 v7.1.135

updated for version 7.1-135
author vimboss
date Wed, 03 Oct 2007 12:31:33 +0000
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Config file: printcap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> (defunct)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Modified by Bram
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 "define keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 set isk=@,46-57,_,-,#,=,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 setlocal isk=@,46-57,_,-,#,=,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "first all the bad guys
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match pcapBad '^.\+$' "define any line as bad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match pcapBadword ':' contained "define any single : as bad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match pcapBadword '\\' contained "define any single \ as bad
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 "then the good boys
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Boolean keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Numeric Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " String Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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*'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " allow continuation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match pcapEnd ':\\$' contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match pcapComment "#.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if version >= 508 || !exists("did_pcap_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 let did_pcap_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink pcapBad WarningMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink pcapBadword WarningMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink pcapComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 let b:current_syntax = "pcap"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " vim: ts=8