[asterisk-commits] contrib/editors: Fix vim syntax highlighting of comments in ... (asterisk[13])
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Thu May  7 14:55:39 CDT 2015
    
    
  
Matt Jordan has submitted this change and it was merged.
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(-)
Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  George Joseph: Looks good to me, but someone else must approve
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: merged
Gerrit-Change-Id: Id17dfaeda8ed4be572e8107a0c010066584aaee7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
    
    
More information about the asterisk-commits
mailing list