Merge branch 'hack/autopaste'
[vim-kana.git] / runtime / syntax / ldapconf.vim
blob70ddaab57a5982c87f0fd63807972467ed32240f
1 " Vim syntax file
2 " Language:         ldap.conf(5) configuration file.
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2006-12-11
6 if exists("b:current_syntax")
7   finish
8 endif
10 let s:cpo_save = &cpo
11 set cpo&vim
13 syn keyword ldapconfTodo          contained TODO FIXME XXX NOTE
15 syn region  ldapconfComment       display oneline start='^\s*#' end='$'
16       \                           contains=ldapconfTodo,
17       \                                    @Spell
19 syn match   ldapconfBegin         display '^'
20       \                           nextgroup=ldapconfOption,
21       \                                     ldapconfDeprOption,
22       \                                     ldapconfComment
24 syn case    ignore
26 syn keyword ldapconfOption        contained URI 
27       \                           nextgroup=ldapconfURI
28       \                           skipwhite
30 syn keyword ldapconfOption        contained
31       \                           BASE
32       \                           BINDDN
33       \                           nextgroup=ldapconfDNAttrType
34       \                           skipwhite
36 syn keyword ldapconfDeprOption    contained 
37       \                           HOST
38       \                           nextgroup=ldapconfHost
39       \                           skipwhite
41 syn keyword ldapconfDeprOption    contained
42       \                           PORT
43       \                           nextgroup=ldapconfPort
44       \                           skipwhite
46 syn keyword ldapconfOption        contained
47       \                           REFERRALS
48       \                           nextgroup=ldapconfBoolean
49       \                           skipwhite
51 syn keyword ldapconfOption        contained
52       \                           SIZELIMIT
53       \                           TIMELIMIT
54       \                           nextgroup=ldapconfInteger
55       \                           skipwhite
57 syn keyword ldapconfOption        contained
58       \                           DEREF
59       \                           nextgroup=ldapconfDerefWhen
60       \                           skipwhite
62 syn keyword ldapconfOption        contained
63       \                           SASL_MECH
64       \                           nextgroup=ldapconfSASLMechanism
65       \                           skipwhite
67 syn keyword ldapconfOption        contained
68       \                           SASL_REALM
69       \                           nextgroup=ldapconfSASLRealm
70       \                           skipwhite
72 syn keyword ldapconfOption        contained
73       \                           SASL_AUTHCID
74       \                           SASL_AUTHZID
75       \                           nextgroup=ldapconfSASLAuthID
76       \                           skipwhite
78 syn keyword ldapconfOption        contained
79       \                           SASL_SECPROPS
80       \                           nextgroup=ldapconfSASLSecProps
81       \                           skipwhite
83 syn keyword ldapconfOption        contained
84       \                           TLS_CACERT
85       \                           TLS_CERT
86       \                           TLS_KEY
87       \                           TLS_RANDFILE
88       \                           nextgroup=ldapconfFilename
89       \                           skipwhite
91 syn keyword ldapconfOption        contained
92       \                           TLS_CACERTDIR
93       \                           nextgroup=ldapconfPath
94       \                           skipwhite
96 syn keyword ldapconfOption        contained
97       \                           TLS_CIPHER_SUITE
98       \                           nextgroup=@ldapconfTLSCipher
99       \                           skipwhite
101 syn keyword ldapconfOption        contained
102       \                           TLS_REQCERT
103       \                           nextgroup=ldapconfTLSCertCheck
104       \                           skipwhite
106 syn keyword ldapconfOption        contained
107       \                           TLS_CRLCHECK
108       \                           nextgroup=ldapconfTLSCRLCheck
109       \                           skipwhite
111 syn case    match
113 syn match   ldapconfURI           contained display
114       \                           'ldaps\=://[^[:space:]:]\+\%(:\d\+\)\='
115       \                           nextgroup=ldapconfURI
116       \                           skipwhite
118 " LDAP Distinguished Names are defined in Section 3 of RFC 2253:
119 " http://www.ietf.org/rfc/rfc2253.txt.
120 syn match   ldapconfDNAttrType    contained display
121       \                           '\a[a-zA-Z0-9-]\+\|\d\+\%(\.\d\+\)*'
122       \                           nextgroup=ldapconfDNAttrTypeEq
124 syn match   ldapconfDNAttrTypeEq  contained display
125       \                           '='
126       \                           nextgroup=ldapconfDNAttrValue
128 syn match   ldapconfDNAttrValue   contained display
129       \                           '\%([^,=+<>#;\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*\|#\%(\x\x\)\+\|"\%([^\\"]\|\\\%([,=+<>#;\\"]\|\x\x\)\)*"'
130       \                           nextgroup=ldapconfDNSeparator
132 syn match   ldapconfDNSeparator   contained display
133       \                           '[+,]'
134       \                           nextgroup=ldapconfDNAttrType
136 syn match   ldapconfHost          contained display
137       \                           '[^[:space:]:]\+\%(:\d\+\)\='
138       \                           nextgroup=ldapconfHost
139       \                           skipwhite
141 syn match   ldapconfPort          contained display
142       \                           '\d\+'
144 syn keyword ldapconfBoolean       contained
145       \                           on
146       \                           true
147       \                           yes
148       \                           off
149       \                           false
150       \                           no
152 syn match   ldapconfInteger       contained display
153       \                           '\d\+'
155 syn keyword ldapconfDerefWhen     contained
156       \                           never
157       \                           searching
158       \                           finding
159       \                           always
161 " Taken from http://www.iana.org/assignments/sasl-mechanisms.
162 syn keyword ldapconfSASLMechanism contained
163       \                           KERBEROS_V4
164       \                           GSSAPI
165       \                           SKEY
166       \                           EXTERNAL
167       \                           ANONYMOUS
168       \                           OTP
169       \                           PLAIN
170       \                           SECURID
171       \                           NTLM
172       \                           NMAS_LOGIN
173       \                           NMAS_AUTHEN
174       \                           KERBEROS_V5
176 syn match   ldapconfSASLMechanism contained display
177       \                           'CRAM-MD5\|GSS-SPNEGO\|DIGEST-MD5\|9798-[UM]-\%(RSA-SHA1-ENC\|\%(EC\)\=DSA-SHA1\)\|NMAS-SAMBA-AUTH'
179 " TODO: I have been unable to find a definition for a SASL realm,
180 " authentication identity, and proxy authorization identity.
181 syn match   ldapconfSASLRealm     contained display
182       \                           '\S\+'
184 syn match   ldapconfSASLAuthID    contained display
185       \                           '\S\+'
187 syn keyword ldapconfSASLSecProps  contained
188       \                           none
189       \                           noplain
190       \                           noactive
191       \                           nodict
192       \                           noanonymous
193       \                           forwardsec
194       \                           passcred
195       \                           nextgroup=ldapconfSASLSecPSep
197 syn keyword ldapconfSASLSecProps  contained
198       \                           minssf
199       \                           maxssf
200       \                           maxbufsize
201       \                           nextgroup=ldapconfSASLSecPEq
203 syn match   ldapconfSASLSecPEq    contained display
204       \                           '='
205       \                           nextgroup=ldapconfSASLSecFactor
207 syn match   ldapconfSASLSecFactor contained display
208       \                           '\d\+'
209       \                           nextgroup=ldapconfSASLSecPSep
211 syn match   ldapconfSASLSecPSep   contained display
212       \                           ','
213       \                           nextgroup=ldapconfSASLSecProps
215 syn match   ldapconfFilename      contained display
216       \                           '.\+'
218 syn match   ldapconfPath          contained display
219       \                           '.\+'
221 " Defined in openssl-ciphers(1).
222 " TODO: Should we include the stuff under CIPHER SUITE NAMES?
223 syn cluster ldapconfTLSCipher     contains=ldapconfTLSCipherOp,
224       \                                    ldapconfTLSCipherName,
225       \                                    ldapconfTLSCipherSort
227 syn match   ldapconfTLSCipherOp   contained display
228       \                           '[+!-]'
229       \                           nextgroup=ldapconfTLSCipherName
231 syn keyword ldapconfTLSCipherName contained
232       \                           DEFAULT
233       \                           COMPLEMENTOFDEFAULT
234       \                           ALL
235       \                           COMPLEMENTOFALL
236       \                           HIGH
237       \                           MEDIUM
238       \                           LOW
239       \                           EXP
240       \                           EXPORT
241       \                           EXPORT40
242       \                           EXPORT56
243       \                           eNULL
244       \                           NULL
245       \                           aNULL
246       \                           kRSA
247       \                           RSA
248       \                           kEDH
249       \                           kDHr
250       \                           kDHd
251       \                           aRSA
252       \                           aDSS
253       \                           DSS
254       \                           aDH
255       \                           kFZA
256       \                           aFZA
257       \                           eFZA
258       \                           FZA
259       \                           TLSv1
260       \                           SSLv3
261       \                           SSLv2
262       \                           DH
263       \                           ADH
264       \                           AES
265       \                           3DES
266       \                           DES
267       \                           RC4
268       \                           RC2
269       \                           IDEA
270       \                           MD5
271       \                           SHA1
272       \                           SHA
273       \                           Camellia
274       \                           nextgroup=ldapconfTLSCipherSep
276 syn match   ldapconfTLSCipherSort contained display
277       \                           '@STRENGTH'
278       \                           nextgroup=ldapconfTLSCipherSep
280 syn match   ldapconfTLSCipherSep  contained display
281       \                           '[:, ]'
282       \                           nextgroup=@ldapconfTLSCipher
284 syn keyword ldapconfTLSCertCheck  contained
285       \                           never
286       \                           allow
287       \                           try
288       \                           demand
289       \                           hard
291 syn keyword ldapconfTLSCRLCheck   contained
292       \                           none
293       \                           peer
294       \                           all
296 hi def link ldapconfTodo          Todo
297 hi def link ldapconfComment       Comment
298 hi def link ldapconfOption        Keyword
299 hi def link ldapconfDeprOption    Error
300 hi def link ldapconfString        String
301 hi def link ldapconfURI           ldapconfString
302 hi def link ldapconfDNAttrType    Identifier
303 hi def link ldapconfOperator      Operator
304 hi def link ldapconfEq            ldapconfOperator
305 hi def link ldapconfDNAttrTypeEq  ldapconfEq
306 hi def link ldapconfValue         ldapconfString
307 hi def link ldapconfDNAttrValue   ldapconfValue
308 hi def link ldapconfSeparator     ldapconfOperator
309 hi def link ldapconfDNSeparator   ldapconfSeparator
310 hi def link ldapconfHost          ldapconfURI
311 hi def link ldapconfNumber        Number
312 hi def link ldapconfPort          ldapconfNumber
313 hi def link ldapconfBoolean       Boolean
314 hi def link ldapconfInteger       ldapconfNumber
315 hi def link ldapconfType          Type
316 hi def link ldapconfDerefWhen     ldapconfType
317 hi def link ldapconfDefine        Define
318 hi def link ldapconfSASLMechanism ldapconfDefine
319 hi def link ldapconfSASLRealm     ldapconfURI
320 hi def link ldapconfSASLAuthID    ldapconfValue
321 hi def link ldapconfSASLSecProps  ldapconfType
322 hi def link ldapconfSASLSecPEq    ldapconfEq
323 hi def link ldapconfSASLSecFactor ldapconfNumber
324 hi def link ldapconfSASLSecPSep   ldapconfSeparator
325 hi def link ldapconfFilename      ldapconfString
326 hi def link ldapconfPath          ldapconfFilename
327 hi def link ldapconfTLSCipherOp   ldapconfOperator
328 hi def link ldapconfTLSCipherName ldapconfDefine
329 hi def link ldapconfSpecial       Special
330 hi def link ldapconfTLSCipherSort ldapconfSpecial
331 hi def link ldapconfTLSCipherSep  ldapconfSeparator
332 hi def link ldapconfTLSCertCheck  ldapconfType
333 hi def link ldapconfTLSCRLCheck   ldapconfType
335 let b:current_syntax = "ldapconf"
337 let &cpo = s:cpo_save
338 unlet s:cpo_save