diff options
author | Todd Zullinger <tmz@pobox.com> | 2010-01-08 23:42:26 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-01-30 11:02:02 +1100 |
commit | b7b7a1c3ca9a2208b7d26964e1fa3ceb4e95f693 (patch) | |
tree | 58965974bda2eb93548f1e0bf49582c34819703a /ext | |
parent | b3c363c547dd7bf8cb54c103c20f688b9944b7da (diff) | |
download | puppet-b7b7a1c3ca9a2208b7d26964e1fa3ceb4e95f693.tar.gz puppet-b7b7a1c3ca9a2208b7d26964e1fa3ceb4e95f693.tar.xz puppet-b7b7a1c3ca9a2208b7d26964e1fa3ceb4e95f693.zip |
vim: Improve function matching when functions contain ')'
This fixes #3017 (VIM syntax highlight for regsubst fails) by converting
puppetFunction from a simple keyword to a region.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/vim/syntax/puppet.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim index e86138a4c..80cd91c6c 100644 --- a/ext/vim/syntax/puppet.vim +++ b/ext/vim/syntax/puppet.vim @@ -51,8 +51,10 @@ syn match puppetParamDigits "[0-9]\+" " match 'template' in 'content => template("...")' syn match puppetParam "\w\+\s*[=+]>\s*\w\+\s*(" contains=puppetFunction,puppetParamName -syn keyword puppetFunction debug info notice warning err alert emerg crit -syn keyword puppetFunction sprintf template fail tagged include generate search file tag versioncmp fqdn_rand realize split defined regsubst sha1 inline_template contained +" statements +syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fail\|include\|info\|notice\|realize\|require\|search\|tag\|warning\)\s*(" end=")" contained contains=puppetString +" 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\+}" |