xref: /vim-8.2.3635/runtime/syntax/dictconf.vim (revision 214641f7)
1" Vim syntax file
2" Language:             dict(1) configuration file
3" Previous Maintainer:  Nikolai Weibull <[email protected]>
4" Latest Revision:      2006-04-19
5
6if exists("b:current_syntax")
7  finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn keyword dictconfTodo        contained TODO FIXME XXX NOTE
14
15syn region  dictconfComment     display oneline start='#' end='$'
16                                \ contains=dictconfTodo,@Spell
17
18syn match   dictconfBegin       display '^'
19                                \ nextgroup=dictconfKeyword,dictconfComment
20                                \ skipwhite
21
22syn keyword dictconfKeyword     contained server
23                                \ nextgroup=dictconfServer skipwhite
24
25syn keyword dictconfKeyword     contained pager
26                                \ nextgroup=dictconfPager
27
28syn match   dictconfServer      contained display
29                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
30                                \ nextgroup=dictconfServerOptG skipwhite
31
32syn region  dictconfServer      contained display oneline
33                                \ start=+"+ skip=+""+ end=+"+
34                                \ nextgroup=dictconfServerOptG skipwhite
35
36syn region  dictconfServerOptG  contained transparent
37                                \ matchgroup=dictconfServerOptsD start='{'
38                                \ matchgroup=dictconfServerOptsD end='}'
39                                \ contains=dictconfServerOpts,dictconfComment
40
41syn keyword dictconfServerOpts  contained port
42                                \ nextgroup=dictconfNumber skipwhite
43
44syn keyword dictconfServerOpts  contained user
45                                \ nextgroup=dictconfUsername skipwhite
46
47syn match   dictconfUsername    contained display
48                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
49                                \ nextgroup=dictconfSecret skipwhite
50syn region  dictconfUsername    contained display oneline
51                                \ start=+"+ skip=+""+ end=+"+
52                                \ nextgroup=dictconfSecret skipwhite
53
54syn match   dictconfSecret      contained display
55                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
56syn region  dictconfSecret      contained display oneline
57                                \ start=+"+ skip=+""+ end=+"+
58
59syn match   dictconfNumber      contained '\<\d\+\>'
60
61syn match   dictconfPager       contained display
62                                \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*'
63syn region  dictconfPager       contained display oneline
64                                \ start=+"+ skip=+""+ end=+"+
65
66hi def link dictconfTodo        Todo
67hi def link dictconfComment     Comment
68hi def link dictconfKeyword     Keyword
69hi def link dictconfServer      String
70hi def link dictconfServerOptsD Delimiter
71hi def link dictconfServerOpts  Identifier
72hi def link dictconfUsername    String
73hi def link dictconfSecret      Special
74hi def link dictconfNumber      Number
75hi def link dictconfPager       String
76
77let b:current_syntax = "dictconf"
78
79let &cpo = s:cpo_save
80unlet s:cpo_save
81