annotate runtime/syntax/pf.vim @ 2448:628147a4b3b2 vim73

Fix: on MS-Windows the "open with..." menu starts Vim without a file.
author Bram Moolenaar <bram@vim.org>
date Sat, 31 Jul 2010 20:53:54 +0200
parents 3fc0f57ecb91
children 2d1383658bb4
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 " pf syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: OpenBSD packet filter configuration (pf.conf)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Camiel Dobbelaar <cd@sentia.nl>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003 May 27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 setlocal foldmethod=syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn cluster pfNotLS contains=pfComment,pfTodo,pfVarAssign
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword pfCmd altq anchor antispoof binat nat pass
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword pfCmd queue rdr scrub table set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword pfService auth bgp domain finger ftp http https ident
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword pfService imap irc isakmp kerberos mail nameserver nfs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword pfService tftp www
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword pfTodo TODO XXX contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword pfWildAddr all any
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match pfCmd /block\s/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match pfComment /#.*$/ contains=pfTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match pfCont /\\$/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match pfErrClose /}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match pfNetmask /\/\d\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " 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
49 if version >= 508 || !exists("did_c_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 let did_c_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink pfCmd Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink pfComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink pfCont Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink pfErrClose Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink pfIPv4 Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink pfIPv6 Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink pfNetmask Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink pfNum Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink pfService Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink pfTable Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink pfTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink pfVar Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink pfVarAssign Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink pfWildAddr Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 let b:current_syntax = "pf"