contrib/editors: Fix vim syntax highlighting of comments in config files

* Added a lookbehind to one-line comment matcher to skip escaped
   semicolons.
 * Added support for block comments.

Change-Id: Id17dfaeda8ed4be572e8107a0c010066584aaee7
changes/96/396/1
Ivan Poddubny 10 years ago
parent 22c6c12af2
commit 608f0a94ee

@ -14,7 +14,8 @@ syn sync clear
syn sync fromstart syn sync fromstart
syn keyword asteriskTodo TODO contained syn keyword asteriskTodo TODO contained
syn match asteriskComment ";.*" contains=asteriskTodo syn match asteriskComment "\\\@<!;.*" contains=asteriskTodo
syn region asteriskBlockComment start=/\\\@<!;---\@!/ end=/--;/ contains=asteriskBlockComment,asteriskTodo
syn match asteriskContext "\[.\{-}\]" syn match asteriskContext "\[.\{-}\]"
syn match asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern syn match asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?" syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
@ -67,6 +68,7 @@ if version >= 508 || !exists("did_conf_syntax_inits")
endif endif
HiLink asteriskComment Comment HiLink asteriskComment Comment
HiLink asteriskBlockComment Comment
HiLink asteriskExten String HiLink asteriskExten String
HiLink asteriskContext Preproc HiLink asteriskContext Preproc
HiLink asteriskPattern Type HiLink asteriskPattern Type

Loading…
Cancel
Save