[Asterisk-code-review] contrib/editors: Fix vim syntax highlighting of comments in ... (asterisk[13])
Ivan Poddubny
asteriskteam at digium.com
Thu May 7 14:40:35 CDT 2015
Ivan Poddubny has uploaded a new change for review.
https://gerrit.asterisk.org/396
Change subject: contrib/editors: Fix vim syntax highlighting of comments in config files
......................................................................
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
---
M contrib/editors/asterisk.vim
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/96/396/1
diff --git a/contrib/editors/asterisk.vim b/contrib/editors/asterisk.vim
index a96a836..dd53a70 100644
--- a/contrib/editors/asterisk.vim
+++ b/contrib/editors/asterisk.vim
@@ -14,7 +14,8 @@
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 @@
endif
HiLink asteriskComment Comment
+ HiLink asteriskBlockComment Comment
HiLink asteriskExten String
HiLink asteriskContext Preproc
HiLink asteriskPattern Type
--
To view, visit https://gerrit.asterisk.org/396
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id17dfaeda8ed4be572e8107a0c010066584aaee7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
More information about the asterisk-code-review
mailing list