From b3c363c547dd7bf8cb54c103c20f688b9944b7da Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 7 Dec 2009 20:47:58 -0500 Subject: vim: puppetDefArguments is contained by puppetDefine The argument list for a definition must be contained, otherwise it matches too much text. For example: define test($arg) { $foo = regsubst("$name", '(.*)', '\1') # The parentheses within the above regsubst are matched as part # of puppetDefArguments and the highlighting after is incorrect. } Marking puppetDefArguments as contained by puppetDefine fixes this. Signed-off-by: Todd Zullinger --- ext/vim/syntax/puppet.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim index eb62b64b8..e86138a4c 100644 --- a/ext/vim/syntax/puppet.vim +++ b/ext/vim/syntax/puppet.vim @@ -19,7 +19,7 @@ endif " match class/definition/node declarations syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe syn keyword puppetDefType class define node inherits contained -syn region puppetDefArguments start="(" end=")" contains=puppetArgument +syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument syn match puppetArgument "\w\+" contained syn match puppetArgument "\$\w\+" contained syn match puppetArgument "'[^']+'" contained -- cgit