2 " Language: getmailrc - configuration file for getmail version 4
3 " Maintainer: Nikolai Nespor <nikolai.nespor@utanet.at>
4 " URL: http://www.unet.univie.ac.at/~a9600989/vim/getmailrc.vim
5 " Last Change: 2005 02 22
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
15 " string, ints and comments
16 syn match gmComment /#.*$/
17 syn match gmInt /\<\d\+\>/
18 syn region gmDbQuoteStr start=+"+ skip=+\\"+ end=+"+
19 syn region gmQuoteStr start=+'+ skip=+\\'+ end=+'+
21 " booleans are case insensitive
23 syn keyword gmTrue 1 true yes on
24 syn keyword gmFalse 0 false no off
27 syn match gmParam /^\s*\w\+\s*=/ contains=gmKeywd
28 syn match gmSection /^\s*\[\(retriever\|destination\|options\)\]\s*$/
29 syn match gmFilterSec /^\s*\[filter-\w\+\]\s*$/
31 syn keyword gmType type contained
37 syn match gmRetType /^\s*type\s*=\s*[a-zA-Z3]\+\s*$/ contains=gmRetTypes,gmType
38 syn keyword gmRetTypes BrokenUIDLPOP3Retriver contained
39 syn keyword gmRetTypes SimplePOP3Retriever SimpleIMAPRetriever contained
40 syn keyword gmRetTypes SimplePOP3SSLRetriever SimpleIMAPSSLRetriever contained
41 syn keyword gmRetTypes MultidropPOP3Retriever MultidropPOP3SSLRetriever contained
42 syn keyword gmRetTypes MultidropSPDSRetriever MultidropIMAPRetriever contained
43 syn keyword gmRetTypes MultidropIMAPSSLRetriever contained
45 " common retriever options
46 syn keyword gmKeywd password port server username contained
48 syn keyword gmKeywd use_apop contained
50 syn keyword gmKeywd mailboxes move_on_delete contained
52 syn keyword gmKeywd certfile keyfile contained
54 syn keyword gmKeywd envelope_recipient contained
56 syn keyword gmKeywd timeout contained
62 syn match gmDestType /^\s*type\s*=\s*\(Maildir\|Mboxrd\|MDA_external\|MultiDestination\|MultiGuesser\|MultiSorter\|MDA_qmaillocal\)\s*$/ contains=gmDestTypes,gmType
63 syn keyword gmDestTypes Maildir Mboxrd MDA_external MultiDestination contained
64 syn keyword gmDestTypes MultiGuesser MultiSorter MDA_qmaillocal contained
66 " Maildir, Mboxrd and MDA_external common options
67 syn keyword gmKeywd path contained
69 syn keyword gmKeywd allow_root_commands arguments group contained
70 syn keyword gmKeywd unixfrom user contained
72 syn keyword gmKeywd default locals contained
73 " MDA_qmaillocal plus allow_root_command, group and user from
75 syn keyword gmKeywd conf-break defaultdelivery homedir contained
76 syn keyword gmKeywd localdomain localpart_translate qmaillocal contained
77 syn keyword gmKeywd strip_delivered_to contained
81 syn keyword gmKeywd delete delete_after delivered_to contained
82 syn keyword gmKeywd max_messages_per_session max_message_size contained
83 syn keyword gmKeywd message_log message_log_syslog read_all received contained
84 syn keyword gmKeywd verbose contained
90 syn match gmFilterType /^\s*type\s*=\s*\(Filter_classifier\|Filter_external\|Filter_TMDA\)\s*$/ contains=gmFilterTypes,gmType
91 syn keyword gmFilterTypes Filter_classifier Filter_external Filter_TMDA contained
94 syn keyword gmKeywd allow_root_commands arguments exitcodes_drop contained
95 syn keyword gmKeywd exitcodes_keep group path unixfrom user contained
97 " Define the default highlighting.
98 " For version 5.7 and earlier: only when not done already
99 " For version 5.8 and later: only when an item doesn't have highlighting yet
100 if version >= 508 || !exists("did_getmail_syn_inits")
102 let did_getmail_syn_inits = 1
103 command -nargs=+ HiLink hi link <args>
105 command -nargs=+ HiLink hi def link <args>
107 HiLink gmComment Comment
108 HiLink gmInt Identifier
109 HiLink gmDbQuoteStr String
110 HiLink gmQuoteStr String
112 HiLink gmTrue Identifier
113 HiLink gmFalse Constant
115 HiLink gmParam Normal
116 HiLink gmSection Statement
117 HiLink gmFilterSec Statement
122 HiLink gmRetTypes PreProc
123 HiLink gmDestTypes PreProc
124 HiLink gmFilterTypes PreProc
128 let b:current_syntax = "getmail"