diff options
author | Ivan Poddubny <ivan.poddubny@gmail.com> | 2015-05-04 19:43:20 +0000 |
---|---|---|
committer | Ivan Poddubny <ivan.poddubny@gmail.com> | 2015-05-07 19:37:42 +0000 |
commit | b885f719bf93187a8f7e052e135c8e2d3fcfd7dd (patch) | |
tree | f3e9c27e876afd05c6ab469bcc77468028c7fe91 | |
parent | 6bb80e76573c72ba906a390269d49633975f3a42 (diff) |
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
-rw-r--r-- | contrib/editors/asterisk.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/editors/asterisk.vim b/contrib/editors/asterisk.vim index a96a836ad..dd53a7002 100644 --- a/contrib/editors/asterisk.vim +++ b/contrib/editors/asterisk.vim @@ -14,7 +14,8 @@ syn sync clear syn sync fromstart 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 asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?" @@ -67,6 +68,7 @@ if version >= 508 || !exists("did_conf_syntax_inits") endif HiLink asteriskComment Comment + HiLink asteriskBlockComment Comment HiLink asteriskExten String HiLink asteriskContext Preproc HiLink asteriskPattern Type |