Mercurial > vim
annotate runtime/syntax/dnsmasq.vim @ 5547:270c62fe685a v7.4.122
updated for version 7.4.122
Problem: Win32: When 'encoding' is set to "utf-8" and the active codepage
is cp932 then ":grep" and other commands don't work for multi-byte
characters.
Solution: (Yasuhiro Matsumoto)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 11 Dec 2013 17:58:35 +0100 |
parents | 9521463d4fc1 |
children | 306caa30d83b |
rev | line source |
---|---|
3557 | 1 " Vim syntax file |
2 " Maintainer: Thilo Six | |
5425 | 3 " Contact: vim-foo@xk2c-foo.de |
4 " :3s+-foo++g | |
3557 | 5 " Description: highlight dnsmasq configuration files |
6 " File: runtime/syntax/dnsmasq.vim | |
5425 | 7 " Version: 2.67 |
8 " Last Change: 2013 Nov 03 | |
3224 | 9 " Modeline: vim: ts=8:sw=2:sts=2: |
10 " | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
11 " License: VIM License |
3557 | 12 " Vim is Charityware, see ":help Uganda" |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
13 " |
2833 | 14 " Options: You might want to add this to your vimrc: |
15 " | |
16 " if &background == "dark" | |
17 " let dnsmasq_backrgound_light = 0 | |
18 " else | |
19 " let dnsmasq_backrgound_light = 1 | |
20 " endif | |
2788 | 21 " |
22 | |
23 " For version 5.x: Clear all syntax items | |
5425 | 24 if v:version < 600 |
2788 | 25 syntax clear |
3224 | 26 elseif exists("b:current_syntax") || &compatible |
2788 | 27 finish |
28 endif | |
29 | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
30 let s:cpo_save = &cpo |
3224 | 31 set cpo&vim |
32 | |
2788 | 33 if !exists("b:dnsmasq_backrgound_light") |
5425 | 34 if exists("dnsmasq_backrgound_light") |
35 let b:dnsmasq_backrgound_light = dnsmasq_backrgound_light | |
36 else | |
37 let b:dnsmasq_backrgound_light = 0 | |
38 endif | |
2788 | 39 endif |
40 | |
41 | |
42 " case on | |
43 syn case match | |
44 | |
45 syn match DnsmasqValues "=.*"hs=s+1 contains=DnsmasqComment,DnsmasqSpecial | |
2833 | 46 syn match DnsmasqSpecial display '=\|@\|,\|!\|:' nextgroup=DnsmasqValues |
47 syn match DnsmasqSpecial "#" | |
2788 | 48 |
3557 | 49 syn match DnsmasqIPv4 "\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>" nextgroup=DnsmasqSubnet2,DnsmasqRange |
50 syn match DnsmasqSubnet "\<255.\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{2\}\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>" | |
51 syn match DnsmasqSubnet2 contained "\/\([0-4]\?[0-9]\)\>" | |
2833 | 52 syn match DnsmasqRange contained "-" |
53 syn match DnsmasqMac "\<\(\x\x\?:\)\{5}\x\x\?" | |
2788 | 54 |
2833 | 55 syn match DnsmasqTime "\<\(\d\{1,3}\)[hm]\>" |
2788 | 56 |
57 " String | |
3557 | 58 syn match DnsmasqString "\".*\"" contains=@Spell |
59 syn match DnsmasqString "'.*'" contains=@Spell | |
2788 | 60 |
61 " Comments | |
2965 | 62 syn keyword DnsmasqTodo FIXME TODO XXX NOTE contained |
3557 | 63 syn match DnsmasqComment "\(^\|\s\+\)#.*$" contains=@Spell,DnsmasqTodo |
2788 | 64 |
3224 | 65 " highlight trailing spaces |
66 syn match DnsmasqTrailSpace "[ \t]\+$" | |
67 syn match DnsmasqTrailSpace "[ \t]\+$" containedin=ALL | |
68 | |
2833 | 69 syn match DnsmasqKeywordSpecial "\<set\>:"me=e-1 |
70 syn match DnsmasqKeywordSpecial "\<tag\>:"me=e-1 | |
71 syn match DnsmasqKeywordSpecial ",\<static\>"hs=s+1 contains=DnsmasqSpecial | |
72 syn match DnsmasqKeywordSpecial ",\<infinite\>"hs=s+1 contains=DnsmasqSpecial | |
73 syn match DnsmasqKeywordSpecial "\<encap\>:"me=e-1 | |
3224 | 74 syn match DnsmasqKeywordSpecial "\<interface\>:"me=e-1 |
75 syn match DnsmasqKeywordSpecial "\<vi-encap\>:"me=e-1 | |
2833 | 76 syn match DnsmasqKeywordSpecial "\<net\>:"me=e-1 |
77 syn match DnsmasqKeywordSpecial "\<vendor\>:"me=e-1 | |
3224 | 78 syn match DnsmasqKeywordSpecial "\<opt\>:"me=e-1 |
2833 | 79 syn match DnsmasqKeywordSpecial "\<option\>:"me=e-1 |
80 syn match DnsmasqKeywordSpecial ",\<ignore\>"hs=s+1 contains=DnsmasqSpecial | |
81 syn match DnsmasqKeywordSpecial "\<id\>:"me=e-1 | |
82 | |
2788 | 83 syn match DnsmasqKeyword "^\s*add-mac\>" |
5425 | 84 syn match DnsmasqKeyword "^\s*add-subnet\>" |
2833 | 85 syn match DnsmasqKeyword "^\s*addn-hosts\>" |
86 syn match DnsmasqKeyword "^\s*address\>" | |
87 syn match DnsmasqKeyword "^\s*alias\>" | |
2788 | 88 syn match DnsmasqKeyword "^\s*all-servers\>" |
5425 | 89 syn match DnsmasqKeyword "^\s*auth-zone\>" |
90 syn match DnsmasqKeyword "^\s*bind-dynamic\>" | |
2788 | 91 syn match DnsmasqKeyword "^\s*bind-interfaces\>" |
2833 | 92 syn match DnsmasqKeyword "^\s*bogus-nxdomain\>" |
2788 | 93 syn match DnsmasqKeyword "^\s*bogus-priv\>" |
3224 | 94 syn match DnsmasqKeyword "^\s*bootp-dynamic\>" |
95 syn match DnsmasqKeyword "^\s*bridge-interface\>" | |
2833 | 96 syn match DnsmasqKeyword "^\s*cache-size\>" |
2788 | 97 syn match DnsmasqKeyword "^\s*clear-on-reload\>" |
2833 | 98 syn match DnsmasqKeyword "^\s*cname\>" |
99 syn match DnsmasqKeyword "^\s*conf-dir\>" | |
100 syn match DnsmasqKeyword "^\s*conf-file\>" | |
3224 | 101 syn match DnsmasqKeyword "^\s*conntrack\>" |
102 syn match DnsmasqKeyword "^\s*dhcp-alternate-port\>" | |
2788 | 103 syn match DnsmasqKeyword "^\s*dhcp-authoritative\>" |
2833 | 104 syn match DnsmasqKeyword "^\s*dhcp-boot\>" |
3224 | 105 syn match DnsmasqKeyword "^\s*dhcp-broadcast\>" |
106 syn match DnsmasqKeyword "^\s*dhcp-circuitid\>" | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
107 syn match DnsmasqKeyword "^\s*dhcp-client-update\>" |
3557 | 108 syn match DnsmasqKeyword "^\s*dhcp-duid\>" |
2788 | 109 syn match DnsmasqKeyword "^\s*dhcp-fqdn\>" |
3224 | 110 syn match DnsmasqKeyword "^\s*dhcp-generate-names\>" |
2833 | 111 syn match DnsmasqKeyword "^\s*dhcp-host\>" |
3224 | 112 syn match DnsmasqKeyword "^\s*dhcp-hostsfile\>" |
2833 | 113 syn match DnsmasqKeyword "^\s*dhcp-ignore\>" |
3224 | 114 syn match DnsmasqKeyword "^\s*dhcp-ignore-names\>" |
2833 | 115 syn match DnsmasqKeyword "^\s*dhcp-lease-max\>" |
116 syn match DnsmasqKeyword "^\s*dhcp-leasefile\>" | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
117 syn match DnsmasqKeyword "^\s*dhcp-luascript\>" |
2833 | 118 syn match DnsmasqKeyword "^\s*dhcp-mac\>" |
119 syn match DnsmasqKeyword "^\s*dhcp-match\>" | |
2788 | 120 syn match DnsmasqKeyword "^\s*dhcp-no-override\>" |
3224 | 121 syn match DnsmasqKeyword "^\s*dhcp-option\>" |
2833 | 122 syn match DnsmasqKeyword "^\s*dhcp-option-force\>" |
3224 | 123 syn match DnsmasqKeyword "^\s*dhcp-optsfile\>" |
124 syn match DnsmasqKeyword "^\s*dhcp-proxy\>" | |
2833 | 125 syn match DnsmasqKeyword "^\s*dhcp-range\>" |
5425 | 126 syn match DnsmasqKeyword "^\s*dhcp-relay\>" |
3224 | 127 syn match DnsmasqKeyword "^\s*dhcp-remoteid\>" |
2833 | 128 syn match DnsmasqKeyword "^\s*dhcp-script\>" |
2788 | 129 syn match DnsmasqKeyword "^\s*dhcp-scriptuser\>" |
3224 | 130 syn match DnsmasqKeyword "^\s*dhcp-sequential-ip\>" |
131 syn match DnsmasqKeyword "^\s*dhcp-subscrid\>" | |
2833 | 132 syn match DnsmasqKeyword "^\s*dhcp-userclass\>" |
133 syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>" | |
5425 | 134 syn match DnsmasqKeyword "^\s*dns-rr\>" |
3224 | 135 syn match DnsmasqKeyword "^\s*dns-forward-max\>" |
136 syn match DnsmasqKeyword "^\s*domain\>" | |
2788 | 137 syn match DnsmasqKeyword "^\s*domain-needed\>" |
3224 | 138 syn match DnsmasqKeyword "^\s*edns-packet-max\>" |
2788 | 139 syn match DnsmasqKeyword "^\s*enable-dbus\>" |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
140 syn match DnsmasqKeyword "^\s*enable-ra\>" |
2788 | 141 syn match DnsmasqKeyword "^\s*enable-tftp\>" |
2833 | 142 syn match DnsmasqKeyword "^\s*except-interface\>" |
2788 | 143 syn match DnsmasqKeyword "^\s*expand-hosts\>" |
144 syn match DnsmasqKeyword "^\s*filterwin2k\>" | |
2833 | 145 syn match DnsmasqKeyword "^\s*group\>" |
3557 | 146 syn match DnsmasqKeyword "^\s*host-record\>" |
2833 | 147 syn match DnsmasqKeyword "^\s*interface\>" |
3224 | 148 syn match DnsmasqKeyword "^\s*interface-name\>" |
5425 | 149 syn match DnsmasqKeyword "^\s*ipset\>" |
2788 | 150 syn match DnsmasqKeyword "^\s*keep-in-foreground\>" |
151 syn match DnsmasqKeyword "^\s*leasefile-ro\>" | |
2833 | 152 syn match DnsmasqKeyword "^\s*listen-address\>" |
3224 | 153 syn match DnsmasqKeyword "^\s*local\>" |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
154 syn match DnsmasqKeyword "^\s*localmx\>" |
2833 | 155 syn match DnsmasqKeyword "^\s*local-ttl\>" |
2788 | 156 syn match DnsmasqKeyword "^\s*localise-queries\>" |
3224 | 157 syn match DnsmasqKeyword "^\s*log-async\>" |
2788 | 158 syn match DnsmasqKeyword "^\s*log-dhcp\>" |
3224 | 159 syn match DnsmasqKeyword "^\s*log-facility\>" |
2788 | 160 syn match DnsmasqKeyword "^\s*log-queries\>" |
3224 | 161 syn match DnsmasqKeyword "^\s*max-ttl\>" |
5425 | 162 syn match DnsmasqKeyword "^\s*max-cache-ttl\>" |
3224 | 163 syn match DnsmasqKeyword "^\s*min-port\>" |
2833 | 164 syn match DnsmasqKeyword "^\s*mx-host\>" |
165 syn match DnsmasqKeyword "^\s*mx-target\>" | |
3224 | 166 syn match DnsmasqKeyword "^\s*naptr-record\>" |
167 syn match DnsmasqKeyword "^\s*neg-ttl\>" | |
2788 | 168 syn match DnsmasqKeyword "^\s*no-daemon\>" |
2833 | 169 syn match DnsmasqKeyword "^\s*no-dhcp-interface\>" |
2788 | 170 syn match DnsmasqKeyword "^\s*no-hosts\>" |
171 syn match DnsmasqKeyword "^\s*no-negcache\>" | |
172 syn match DnsmasqKeyword "^\s*no-ping\>" | |
173 syn match DnsmasqKeyword "^\s*no-poll\>" | |
174 syn match DnsmasqKeyword "^\s*no-resolv\>" | |
3224 | 175 syn match DnsmasqKeyword "^\s*pid-file\>" |
176 syn match DnsmasqKeyword "^\s*port\>" | |
2788 | 177 syn match DnsmasqKeyword "^\s*proxy-dnssec\>" |
2833 | 178 syn match DnsmasqKeyword "^\s*ptr-record\>" |
179 syn match DnsmasqKeyword "^\s*pxe-prompt\>" | |
180 syn match DnsmasqKeyword "^\s*pxe-service\>" | |
3224 | 181 syn match DnsmasqKeyword "^\s*query-port\>" |
5425 | 182 syn match DnsmasqKeyword "^\s*quiet-ra\>" |
183 syn match DnsmasqKeyword "^\s*quiet-dhcp\>" | |
184 syn match DnsmasqKeyword "^\s*quiet-dhcp6\>" | |
185 syn match DnsmasqKeyword "^\s*ra-param\>" | |
2788 | 186 syn match DnsmasqKeyword "^\s*read-ethers\>" |
3224 | 187 syn match DnsmasqKeyword "^\s*rebind-domain-ok\>" |
2788 | 188 syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>" |
2833 | 189 syn match DnsmasqKeyword "^\s*resolv-file\>" |
2788 | 190 syn match DnsmasqKeyword "^\s*selfmx\>" |
2833 | 191 syn match DnsmasqKeyword "^\s*server\>" |
192 syn match DnsmasqKeyword "^\s*srv-host\>" | |
2788 | 193 syn match DnsmasqKeyword "^\s*stop-dns-rebind\>" |
194 syn match DnsmasqKeyword "^\s*strict-order\>" | |
5425 | 195 syn match DnsmasqKeyword "^\s*synth-domain\>" |
3224 | 196 syn match DnsmasqKeyword "^\s*tag-if\>" |
197 syn match DnsmasqKeyword "^\s*test\>" | |
198 syn match DnsmasqKeyword "^\s*tftp-max\>" | |
3557 | 199 syn match DnsmasqKeyword "^\s*tftp-lowercase\>" |
2788 | 200 syn match DnsmasqKeyword "^\s*tftp-no-blocksize\>" |
3224 | 201 syn match DnsmasqKeyword "^\s*tftp-port-range\>" |
2833 | 202 syn match DnsmasqKeyword "^\s*tftp-root\>" |
2788 | 203 syn match DnsmasqKeyword "^\s*tftp-secure\>" |
204 syn match DnsmasqKeyword "^\s*tftp-unique-root\>" | |
2833 | 205 syn match DnsmasqKeyword "^\s*txt-record\>" |
206 syn match DnsmasqKeyword "^\s*user\>" | |
3224 | 207 syn match DnsmasqKeyword "^\s*version\>" |
2788 | 208 |
209 | |
210 if b:dnsmasq_backrgound_light == 1 | |
2833 | 211 hi def DnsmasqKeyword ctermfg=DarkGreen guifg=DarkGreen |
2788 | 212 else |
213 hi def link DnsmasqKeyword Keyword | |
214 endif | |
2833 | 215 hi def link DnsmasqKeywordSpecial Type |
216 hi def link DnsmasqTodo Todo | |
217 hi def link DnsmasqSpecial Constant | |
218 hi def link DnsmasqIPv4 Identifier | |
219 hi def link DnsmasqSubnet2 DnsmasqSubnet | |
220 hi def link DnsmasqSubnet DnsmasqMac | |
221 hi def link DnsmasqRange DnsmasqMac | |
222 hi def link DnsmasqMac Preproc | |
223 hi def link DnsmasqTime Preproc | |
224 hi def link DnsmasqComment Comment | |
3224 | 225 hi def link DnsmasqTrailSpace DiffDelete |
2833 | 226 hi def link DnsmasqString Constant |
227 hi def link DnsmasqValues Normal | |
228 | |
2788 | 229 let b:current_syntax = "dnsmasq" |
2833 | 230 |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
231 let &cpo = s:cpo_save |
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
3224
diff
changeset
|
232 unlet s:cpo_save |
3224 | 233 |