2 " Language: Asterisk voicemail config file
3 " Maintainer: Tilghman Lesher (Corydon76)
4 " Last Change: 2006 Mar 21
9 elseif exists("b:current_syntax")
17 syn keyword asteriskvmTodo TODO contained
18 syn match asteriskvmComment ";.*" contains=asteriskvmTodo
19 syn match asteriskvmContext "\[.\{-}\]"
22 syn match asteriskvmZone "^[[:alnum:]]\+\s*=>\?\s*[[:alnum:]/_]\+|.*$" contains=zoneName,zoneDef
23 syn match zoneName "=\zs[[:alnum:]/_]\+\ze" contained
24 syn match zoneDef "|\zs.*\ze$" contained
26 syn match asteriskvmSetting "\<\(format\|serveremail\|minmessage\|maxmessage\|maxgreet\|skipms\|maxsilence\|silencethreshold\|maxlogins\)="
27 syn match asteriskvmSetting "\<\(externnotify\|externpass\|directoryintro\|charset\|adsi\(fdn\|sec\|ver\)\|\(pager\)\?fromstring\|email\(subject\|body\|cmd\)\|tz\|cidinternalcontexts\|saydurationm\|dialout\|callback\)="
28 syn match asteriskvmSettingBool "\<\(attach\|pbxskip\|usedirectory\|saycid\|sayduration\|sendvoicemail\|review\|operator\|envelope\|delete\|nextaftercmd\|forcename\|forcegreeting\)=\(yes\|no\|1\|0\|true\|false\|t\|f\)"
30 " Individual mailbox definitions
31 syn match asteriskvmMailbox "^[[:digit:]]\+\s*=>\?\s*[[:digit:]]\+\(,[^,]*\(,[^,]*\(,[^,]*\(,[^,]*\)\?\)\?\)\?\)\?" contains=mailboxEmail,asteriskvmSetting,asteriskvmSettingBool,comma
32 syn match mailboxEmail ",\zs[^@=,]*@[[:alnum:]\-\.]\+\.[[:alpha:]]\{2,10}\ze" contains=comma
33 syn match comma "[,|]" contained
35 " Define the default highlighting.
36 " For version 5.7 and earlier: only when not done already
37 " For version 5.8 and later: only when an item doesn't have highlighting yet
38 :if version >= 508 || !exists("did_conf_syntax_inits")
40 let did_conf_syntax_inits = 1
41 command -nargs=+ HiLink hi link <args>
43 command -nargs=+ HiLink hi def link <args>
46 HiLink asteriskvmComment Comment
47 HiLink asteriskvmContext Identifier
48 HiLink asteriskvmZone Type
49 HiLink zoneName String
51 HiLink asteriskvmSetting Type
52 HiLink asteriskvmSettingBool Type
54 HiLink asteriskvmMailbox Statement
55 HiLink mailboxEmail String
59 let b:current_syntax = "asteriskvm"