| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
if version < 600 |
| 8 |
syntax clear |
| 9 |
elseif exists("b:current_syntax") |
| 10 |
finish |
| 11 |
endif |
| 12 |
|
| 13 |
syn sync clear |
| 14 |
syn sync fromstart |
| 15 |
|
| 16 |
|
| 17 |
syn keyword asteriskvmTodo TODO contained |
| 18 |
syn match asteriskvmComment ";.*" contains=asteriskvmTodo |
| 19 |
syn match asteriskvmContext "\[.\{-}\]" |
| 20 |
|
| 21 |
|
| 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 |
| 25 |
|
| 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\)" |
| 29 |
|
| 30 |
|
| 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 |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
:if version >= 508 || !exists("did_conf_syntax_inits") |
| 39 |
if version < 508 |
| 40 |
let did_conf_syntax_inits = 1 |
| 41 |
command -nargs=+ HiLink hi link <args> |
| 42 |
else |
| 43 |
command -nargs=+ HiLink hi def link <args> |
| 44 |
endif |
| 45 |
|
| 46 |
HiLink asteriskvmComment Comment |
| 47 |
HiLink asteriskvmContext Identifier |
| 48 |
HiLink asteriskvmZone Type |
| 49 |
HiLink zoneName String |
| 50 |
HiLink zoneDef String |
| 51 |
HiLink asteriskvmSetting Type |
| 52 |
HiLink asteriskvmSettingBool Type |
| 53 |
|
| 54 |
HiLink asteriskvmMailbox Statement |
| 55 |
HiLink mailboxEmail String |
| 56 |
delcommand HiLink |
| 57 |
endif |
| 58 |
|
| 59 |
let b:current_syntax = "asteriskvm" |
| 60 |
|
| 61 |
|
| 62 |
|