Mercurial > vim
annotate runtime/syntax/pcap.vim @ 19154:d5a6e9fb73b6
Added tag v8.2.0136 for changeset 9efea787c3a6523e4714b094ea5415f872689d33
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Jan 2020 21:45:04 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 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 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 "define keywords | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
13 setlocal isk=@,46-57,_,-,#,=,192-255 |
7 | 14 |
15 "first all the bad guys | |
16 syn match pcapBad '^.\+$' "define any line as bad | |
17 syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad | |
18 syn match pcapBadword ':' contained "define any single : as bad | |
19 syn match pcapBadword '\\' contained "define any single \ as bad | |
20 "then the good boys | |
21 " Boolean keywords | |
22 syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' | |
23 " Numeric Keywords | |
24 syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' | |
25 " String Keywords | |
26 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*' | |
27 " allow continuation | |
28 syn match pcapEnd ':\\$' contained | |
29 " | |
30 syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword | |
31 syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd | |
32 syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' | |
33 syn match pcapComment "#.*$" | |
34 | |
35 syn sync minlines=50 | |
36 | |
37 | |
38 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
39 " Only when an item doesn't have highlighting yet |
7 | 40 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
41 hi def link pcapBad WarningMsg |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link pcapBadword WarningMsg |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link pcapComment Comment |
7 | 44 |
45 | |
46 let b:current_syntax = "pcap" | |
47 | |
48 " vim: ts=8 |