Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

vim: match regexp language features

Signed-off-by: Marc Fournier <>
  • Loading branch information...
commit 502e5206465359f94508f6f6a00a8b73e9132cac 1 parent 78c1f1a
@mfournier mfournier authored jamtur01 committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 syntax/puppet.vim
5 syntax/puppet.vim
@@ -17,7 +17,7 @@ elseif exists("b:current_syntax")
" match class/definition/node declarations
-syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments
+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 match puppetArgument "\w\+" contained
@@ -25,6 +25,7 @@ syn match puppetArgument "\$\w\+" contained
syn match puppetArgument "'[^']+'" contained
syn match puppetArgument '"[^"]+"' contained
syn match puppetDefName "\w\+" contained
+syn match puppetNodeRe "/.*/" contained
" match 'foo' in 'class foo { ...'
" match 'foo::bar' in 'class foo::bar { ...'
@@ -60,6 +61,7 @@ syn match puppetVariable "${\w\+}"
" 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 puppetNotVariable "\\$\w\+" contained
syn match puppetNotVariable "\\${\w\+}" contained
@@ -97,6 +99,7 @@ if version >= 508 || !exists("did_puppet_syn_inits")
HiLink puppetControl Statement
HiLink puppetDefType Define
HiLink puppetDefName Type
+ HiLink puppetNodeRe Type
HiLink puppetTypeName Statement
HiLink puppetTypeDefault Type
HiLink puppetParamName Identifier

0 comments on commit 502e520

Please sign in to comment.
Something went wrong with that request. Please try again.