diff options
author | Marc Fournier <marc.fournier@camptocamp.com> | 2010-08-25 22:11:16 +0200 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-08-29 07:22:11 +1000 |
commit | 690465ef34344acda39469f71f6fb4a9e022ff7b (patch) | |
tree | e686a20f0b0d88d21b55ae4c9f587f3a078ab2df /ext | |
parent | 078e4fd07ff1b375f03a01fa1f4eb456555b5e46 (diff) | |
download | puppet-690465ef34344acda39469f71f6fb4a9e022ff7b.tar.gz puppet-690465ef34344acda39469f71f6fb4a9e022ff7b.tar.xz puppet-690465ef34344acda39469f71f6fb4a9e022ff7b.zip |
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.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/vim/syntax/puppet.vim | 6 |
1 files changed, 3 insertions, 3 deletions
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 |