389
|
1 " Vim syntax file
|
|
2 " Language: dictd(8) configuration file
|
839
|
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2006-04-19
|
389
|
5
|
|
6 if exists("b:current_syntax")
|
|
7 finish
|
|
8 endif
|
|
9
|
|
10 let s:cpo_save = &cpo
|
|
11 set cpo&vim
|
|
12
|
|
13 syn keyword dictdconfTodo contained TODO FIXME XXX NOTE
|
|
14
|
|
15 syn region dictdconfComment display oneline start='#' end='$'
|
|
16 \ contains=dictdconfTodo,dictdconfSpecialC,
|
|
17 \ @Spell
|
|
18
|
|
19 syn keyword dictdconfSpecialC LASTLINE
|
|
20
|
|
21 syn match dictdconfBegin display '^'
|
|
22 \ nextgroup=dictdconfKeyword,dictdconfComment
|
|
23 \ skipwhite
|
|
24
|
|
25 syn keyword dictdconfKeyword contained access
|
|
26 \ nextgroup=dictdconfAccessG skipwhite
|
|
27
|
|
28 syn region dictdconfAccessG contained transparent
|
|
29 \ matchgroup=dictdconfDelimiter start='{'
|
|
30 \ matchgroup=dictdconfDelimiter end='}'
|
|
31 \ contains=dictdconfAccess,dictdconfComment
|
|
32
|
|
33 syn keyword dictdconfAccess contained allow deny authonly user
|
|
34 \ nextgroup=dictdconfString skipwhite
|
|
35
|
|
36 syn keyword dictdconfKeyword contained database
|
|
37 \ nextgroup=dictdconfDatabase skipwhite
|
|
38
|
|
39 syn match dictdconfDatabase contained display
|
|
40 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
41 \ nextgroup=dictdconfSpecG skipwhite
|
|
42 syn region dictdconfDatabase contained display oneline
|
|
43 \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+
|
|
44 \ nextgroup=dictdconfSpecG skipwhite
|
|
45
|
|
46 syn region dictdconfSpecG contained transparent
|
|
47 \ matchgroup=dictdconfDelimiter start='{'
|
|
48 \ matchgroup=dictdconfDelimiter end='}'
|
|
49 \ contains=dictdconfSpec,dictdconfAccess,
|
|
50 \ dictdconfComment
|
|
51
|
|
52 syn keyword dictdconfSpec contained data index index_suffix index_word
|
|
53 \ filter prefilter postfilter name info
|
|
54 \ disable_strat
|
|
55 \ nextgroup=dictdconfString skipwhite
|
|
56
|
|
57 syn keyword dictdconfSpec contained invisible
|
|
58
|
|
59 syn keyword dictdconfKeyword contained database_virtual
|
|
60 \ nextgroup=dictdconfVDatabase skipwhite
|
|
61
|
|
62 syn match dictdconfVDatabase contained display
|
|
63 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
64 \ nextgroup=dictdconfVSpecG skipwhite
|
|
65 syn region dictdconfVDatabase contained display oneline
|
|
66 \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+
|
|
67 \ nextgroup=dictdconfVSpecG skipwhite
|
|
68
|
|
69 syn region dictdconfVSpecG contained transparent
|
|
70 \ matchgroup=dictdconfDelimiter start='{'
|
|
71 \ matchgroup=dictdconfDelimiter end='}'
|
|
72 \ contains=dictdconfVSpec,dictdconfAccess,
|
|
73 \ dictdconfComment
|
|
74
|
|
75 syn keyword dictdconfVSpec contained name info database_list disable_strat
|
|
76 \ nextgroup=dictdconfString skipwhite
|
|
77
|
|
78 syn keyword dictdconfVSpec contained invisible
|
|
79
|
|
80 syn keyword dictdconfKeyword contained database_plugin
|
|
81 \ nextgroup=dictdconfPDatabase skipwhite
|
|
82
|
|
83 syn match dictdconfPDatabase contained display
|
|
84 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
85 \ nextgroup=dictdconfPSpecG skipwhite
|
|
86 syn region dictdconfPDatabase contained display oneline
|
|
87 \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+
|
|
88 \ nextgroup=dictdconfPSpecG skipwhite
|
|
89
|
|
90 syn region dictdconfPSpecG contained transparent
|
|
91 \ matchgroup=dictdconfDelimiter start='{'
|
|
92 \ matchgroup=dictdconfDelimiter end='}'
|
|
93 \ contains=dictdconfPSpec,dictdconfAccess,
|
|
94 \ dictdconfComment
|
|
95
|
|
96 syn keyword dictdconfPSpec contained name info plugin data disable_strat
|
|
97 \ nextgroup=dictdconfString skipwhite
|
|
98
|
|
99 syn keyword dictdconfPSpec contained invisible
|
|
100
|
|
101 syn keyword dictdconfKeyword contained database_exit
|
|
102
|
|
103 syn keyword dictdconfKeyword contained site
|
|
104 \ nextgroup=dictdconfString skipwhite
|
|
105
|
|
106 syn keyword dictdconfKeyword contained user
|
|
107 \ nextgroup=dictdconfUsername skipwhite
|
|
108
|
|
109 syn match dictdconfUsername contained display
|
|
110 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
111 \ nextgroup=dictdconfSecret skipwhite
|
|
112 syn region dictdconfUsername contained display oneline
|
|
113 \ start=+"+ skip=+""+ end=+"+
|
|
114 \ nextgroup=dictdconfSecret skipwhite
|
|
115
|
|
116 syn match dictdconfSecret contained display
|
|
117 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
118 syn region dictdconfSecret contained display oneline
|
|
119 \ start=+"+ skip=+""+ end=+"+
|
|
120
|
|
121 syn match dictdconfString contained display
|
|
122 \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
|
|
123 syn region dictdconfString contained display oneline
|
|
124 \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+
|
|
125
|
|
126 hi def link dictdconfTodo Todo
|
|
127 hi def link dictdconfComment Comment
|
|
128 hi def link dictdconfSpecialC Special
|
|
129 hi def link dictdconfKeyword Keyword
|
|
130 hi def link dictdconfIdentifier Identifier
|
|
131 hi def link dictdconfAccess dictdconfIdentifier
|
|
132 hi def link dictdconfDatabase dictdconfString
|
|
133 hi def link dictdconfSpec dictdconfIdentifier
|
|
134 hi def link dictdconfVDatabase dictdconfDatabase
|
|
135 hi def link dictdconfVSpec dictdconfSpec
|
|
136 hi def link dictdconfPDatabase dictdconfDatabase
|
|
137 hi def link dictdconfPSpec dictdconfSpec
|
|
138 hi def link dictdconfUsername dictdconfString
|
|
139 hi def link dictdconfSecret Special
|
|
140 hi def link dictdconfString String
|
|
141 hi def link dictdconfDelimiter Delimiter
|
|
142
|
|
143 let b:current_syntax = "dictdconf"
|
|
144
|
|
145 let &cpo = s:cpo_save
|
|
146 unlet s:cpo_save
|