7
|
1 " Vim syntax file
|
|
2 " Language: LDAP LDIF
|
|
3 " Maintainer: Zak Johnson <zakj@nox.cx>
|
|
4 " Last Change: 2003-12-30
|
|
5
|
|
6 if version < 600
|
|
7 syntax clear
|
|
8 elseif exists("b:current_syntax")
|
|
9 finish
|
|
10 endif
|
|
11
|
|
12 syn sync minlines=10 linebreaks=1
|
|
13
|
|
14 syn match ldifAttribute /^[^ #][^:]*/ contains=ldifOption display
|
|
15 syn match ldifOption /;[^:]\+/ contained contains=ldifPunctuation display
|
|
16 syn match ldifPunctuation /;/ contained display
|
|
17
|
|
18 syn region ldifStringValue matchgroup=ldifPunctuation start=/: / end=/\_$/ skip=/\n /
|
|
19 syn region ldifBase64Value matchgroup=ldifPunctuation start=/:: / end=/\_$/ skip=/\n /
|
|
20 syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip=/\n /
|
|
21
|
|
22 syn region ldifComment start=/^#/ end=/\_$/ skip=/\n /
|
|
23
|
|
24 if version >= 508 || !exists("did_ldif_syn_inits")
|
|
25 if version < 508
|
|
26 let did_ldif_syn_inits = 1
|
|
27 command -nargs=+ HiLink hi link <args>
|
|
28 else
|
|
29 command -nargs=+ HiLink hi def link <args>
|
|
30 endif
|
|
31
|
|
32 HiLink ldifAttribute Type
|
|
33 HiLink ldifOption Identifier
|
|
34 HiLink ldifPunctuation Normal
|
|
35 HiLink ldifStringValue String
|
|
36 HiLink ldifBase64Value Special
|
|
37 HiLink ldifFileValue Special
|
|
38 HiLink ldifComment Comment
|
|
39
|
|
40 delcommand HiLink
|
|
41 endif
|
|
42
|
|
43 let b:current_syntax = "ldif"
|