From: Ivan Poddubny Date: Mon, 4 May 2015 19:43:20 +0000 (+0000) Subject: contrib/editors: Fix vim syntax highlighting of comments in config files X-Git-Tag: 11.18.0-rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97101bd481bd237e8df1a12bf85592c0627015d6;p=thirdparty%2Fasterisk.git 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 --- diff --git a/contrib/editors/asterisk.vim b/contrib/editors/asterisk.vim index a96a836adf..dd53a70022 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 "\\\@\?\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