Module: sip-router
Branch: master
Commit: 36b8a21cc8ec1cd89cfdea60a11e83711c0694b5
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=36b8a21…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Aug 29 22:40:19 2014 +0200
utils/misc/vim: syntax highlight rules for // comments
---
utils/misc/vim/syntax/kamailio.vim | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/utils/misc/vim/syntax/kamailio.vim b/utils/misc/vim/syntax/kamailio.vim
index b6a7df5..9ec8f4a 100644
--- a/utils/misc/vim/syntax/kamailio.vim
+++ b/utils/misc/vim/syntax/kamailio.vim
@@ -25,7 +25,7 @@ if exists("b:current_syntax")
finish
endif
-syn match kamailioConfigParamLine '^[^=]\+=.*$'
contains=kamailioCoreParameter,kamailioString,kamailioConfigConstant,kamailioSpecial,kamailioNumber,kamailioCppComment,kamailioHashComment
+syn match kamailioConfigParamLine '^[^=]\+=.*$'
contains=kamailioCoreParameter,kamailioString,kamailioConfigConstant,kamailioSpecial,kamailioNumber,kamailioCppComment,kamailioHashComment,kamailioSlashSlashComment
syn region kamailioConfigModparam start='^\s*modparam\s*(' end=')'
contains=kamailioString,kamailioNumber
syn match kamailioConfigModule '^\s*loadmodule\s*"[^"]\+"'
contains=kamailioString
@@ -37,6 +37,7 @@ syn region kamailioCppComment start='/\*' end='\*/'
contains=kamailioTodo
syn
match kamailioHashDefine '#!define\s\|#!ifdef\s\|#!ifndef\s\|#!endif\|#!else\|#!substdef\|#!substdefs\|#!subst\|#!trydef\|#!trydefine\|#!redef\|#!redefine\|!!define\s\|!!ifdef\s\|!!ifndef\s\|!!endif\|!!else\|!!substdef\|!!substdefs\|!!subst\|!!trydef\|!!trydefine\|!!redef\|!!redefine\|#!KAMAILIO\|#!OPENSER\|#!SER\|#!MAXCOMPAT\|#!ALL\|#!include_file\|#!import_file\|!!include_file\|!!import_file'
" syn match kamailioHashDefine '^\s*#!.+$'
syn match kamailioHashComment '#[^!].*$\|#$' contains=kamailioTodo
+syn match kamailioSlashSlashComment '//.*$\|//#$' contains=kamailioTodo
syn match kamailioStringEscape '\\.' contained
syn match kamailioNumber '[0-9]\+' contained
@@ -59,10 +60,11 @@ syn region kamailioBlock start='{' end='}' contained
contains=kamailioBlock,@kam
syn
match kamailioRouteBlock '\(failure_\|onreply_\|branch_\|event_\|onsend_\|request_\|reply_\)\?route\(\s*\[[^\]]\+\]\)\?'
contained contains=kamailioNumber,kamailioString,kamailioIdentifier
syn region kamailioRrouteBlockFold matchgroup=kamailioRouteBlock
start="\(failure_\|onreply_\|branch_\|event_\|onsend_\|request_\|reply_\)\?route\(\s*\[[^\]]\+\]\)\?\s*\n\?{"
matchgroup=NONE end="}" contains=kamailioBlock,@kamailioCodeElements
-syn cluster kamailioCodeElements
contains=kamailioHashDefine,kamailioCppComment,kamailioHashComment,kamailioNumber,kamailioString,kamailioVariable,kamailioOperator,kamailioStatement,kamailioKeyword,kamailioCoreKeyword,kamailioCoreValue,kamailioCoreFunction,kamailioIdentifier
+syn cluster kamailioCodeElements
contains=kamailioHashDefine,kamailioCppComment,kamailioHashComment,kamailioSlashSlashComment,kamailioNumber,kamailioString,kamailioVariable,kamailioOperator,kamailioStatement,kamailioKeyword,kamailioCoreKeyword,kamailioCoreValue,kamailioCoreFunction,kamailioIdentifier
hi def link kamailioCppComment Comment
hi def link kamailioHashComment Comment
+hi def link kamailioSlashSlashComment Comment
hi def link kamailioHashDefine Special
hi def link kamailioTodo Todo