From 690465ef34344acda39469f71f6fb4a9e022ff7b Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 25 Aug 2010 22:11:16 +0200 Subject: Fix #4615 - vim highlighting fails on slashes and colons. When a regexp is used in a selector, vim shouldn't choke if more than one slash is found on the same line. This patch also adds support for colons in attribute names. --- ext/vim/syntax/puppet.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/vim/syntax') diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim index 0025e2d1c..96052104d 100644 --- a/ext/vim/syntax/puppet.vim +++ b/ext/vim/syntax/puppet.vim @@ -57,14 +57,14 @@ syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fai " rvalues syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString -syn match puppetVariable "$\w\+" -syn match puppetVariable "${\w\+}" +syn match puppetVariable "$[a-zA-Z0-9_:]\+" +syn match puppetVariable "${[a-zA-Z0-9_:]\+}" " match anything between simple/double quotes. " don't match variables if preceded by a backslash. syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+ syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable -syn match puppetString "/.*/" +syn match puppetString "/[^/]*/" syn match puppetNotVariable "\\$\w\+" contained syn match puppetNotVariable "\\${\w\+}" contained -- cgit