From 6af737fdb4a3594bc4ab8c0e04536af24768437a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 9 Aug 2010 20:13:35 +0200 Subject: [PATCH] Runtime file updates. (Tim Pope) --- runtime/compiler/cucumber.vim | 29 +++++++++++++++++++++++++++++ runtime/ftplugin/cucumber.vim | 4 ++-- runtime/syntax/haml.vim | 18 +++++++++--------- runtime/syntax/sass.vim | 13 ++++++------- 4 files changed, 46 insertions(+), 18 deletions(-) create mode 100644 runtime/compiler/cucumber.vim diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim new file mode 100644 index 000000000..c020be6e3 --- /dev/null +++ b/runtime/compiler/cucumber.vim @@ -0,0 +1,29 @@ +" Vim compiler file +" Compiler: Cucumber +" Maintainer: Tim Pope +" Last Change: 2010 Aug 09 + +if exists("current_compiler") + finish +endif +let current_compiler = "cucumber" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=cucumber + +CompilerSet errorformat= + \%W%m\ (Cucumber::Undefined), + \%E%m\ (%.%#), + \%Z%f:%l, + \%Z%f:%l:%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2: diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim index 63cfbcf33..a29d46a03 100644 --- a/runtime/ftplugin/cucumber.vim +++ b/runtime/ftplugin/cucumber.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope -" Last Change: 2010 May 21 +" Last Change: 2010 Aug 09 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -80,7 +80,7 @@ function! s:stepmatch(receiver,target) endif catch endtry - if has("ruby") + if has("ruby") && pattern !~ '\\\@ " Filenames: *.haml -" Last Change: 2010 Jul 26 +" Last Change: 2010 Aug 09 if exists("b:current_syntax") finish @@ -21,7 +21,7 @@ syn include @hamlRubyTop syntax/ruby.vim syn case match -syn region rubyCurlyBlock start="{" end="}" contains=@hamlRubyTop contained containedin=rubyInterpolation +syn region rubyCurlyBlock start="{" end="}" contains=@hamlRubyTop contained syn cluster hamlRubyTop add=rubyCurlyBlock syn cluster hamlComponent contains=hamlAttributes,hamlAttributesHash,hamlClassChar,hamlIdChar,hamlObject,hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable @@ -47,7 +47,7 @@ syn region hamlRuby matchgroup=hamlRubyChar start="-" skip=", syn match hamlPlainChar "\\" contained syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="!\===\|!=\@!" end="$" keepend contained contains=hamlInterpolation,hamlInterpolationEscape,@hamlHtmlTop syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="&==\|&=\@!" end="$" keepend contained contains=hamlInterpolation,hamlInterpolationEscape -syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contains=@hamlRubyTop +syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD syn match hamlInterpolationEscape "\\\@" contained contains=@hamlRubyTop @@ -55,16 +55,16 @@ syn region hamlAttributeString start=+\%(=\s*\)\@<='+ skip=+\%(\\\\\)*\\'+ end= syn region hamlAttributeString start=+\%(=\s*\)\@<="+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=hamlInterpolation,hamlInterpolationEscape syn match hamlAttributeVariable "\%(=\s*\)\@<=\%(@@\=\|\$\)\=\w\+" contained -syn match hamlHelper "\ " Filenames: *.sass -" Last Change: 2010 Jul 28 +" Last Change: 2010 Aug 9 if exists("b:current_syntax") finish @@ -20,7 +20,7 @@ syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+:" contains=css.*Prop skipwhite nextgroup=sassCssAttribute contained containedin=sassDefinition syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute -syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction +syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation syn match sassDefault "!default\>" contained syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+" syn match sassVariable "$[[:alnum:]_-]\+" @@ -34,15 +34,14 @@ syn match sassFunction "\<\%(unquote\|quote\)\>(\@=" contained syn match sassFunction "\<\%(percentage\|round\|ceil\|floor\|abs\)\>(\@=" contained syn match sassFunction "\<\%(type-of\|unit\|unitless\|comparable\)\>(\@=" contained -syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,sassCssAttribute,sassProperty +syn region sassInterpolation matchgroup=sassInterpolationDelimiter start="#{" end="}" contains=@sassCssAttributes,sassVariable,sassFunction containedin=cssStringQ,cssStringQQ,sassProperty syn match sassMixinName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute syn match sassMixin "^=" nextgroup=sassMixinName -syn match sassMixin "^\s*\zs@mixin" nextgroup=sassMixinName skipwhite +syn match sassMixin "\%([{};]\s*\|^\s*\)\@<=@mixin" nextgroup=sassMixinName skipwhite syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName -syn match sassMixing "^\s\+\zs@include" nextgroup=sassMixinName skipwhite -syn match sassMixing "\%([{};]\s*\|^\)\@<=@include" nextgroup=sassMixinName skipwhite contained containedin=sassDefinition -syn match sassExtend "^\s\+\zs@extend" +syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite +syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend" syn match sassEscape "^\s*\zs\\" syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId -- 2.50.1