summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/compiler/cucumber.vim29
-rw-r--r--runtime/ftplugin/cucumber.vim4
-rw-r--r--runtime/syntax/haml.vim18
-rw-r--r--runtime/syntax/sass.vim13
4 files changed, 46 insertions, 18 deletions
diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim
new file mode 100644
index 0000000000..c020be6e3b
--- /dev/null
+++ b/runtime/compiler/cucumber.vim
@@ -0,0 +1,29 @@
+" Vim compiler file
+" Compiler: Cucumber
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" 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 <args>
+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 63cfbcf336..a29d46a039 100644
--- a/runtime/ftplugin/cucumber.vim
+++ b/runtime/ftplugin/cucumber.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Cucumber
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
-" 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 !~ '\\\@<!#{'
ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
else
return 0
diff --git a/runtime/syntax/haml.vim b/runtime/syntax/haml.vim
index f49eaca986..bf7a073633 100644
--- a/runtime/syntax/haml.vim
+++ b/runtime/syntax/haml.vim
@@ -2,7 +2,7 @@
" Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" 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 "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
syn region hamlErbInterpolation matchgroup=hamlInterpolationDelimiter start="<%[=-]\=" end="-\=%>" 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 "\<action_view?\|\<block_is_haml?\|\<is_haml?\|\.\@<!\<flatten" contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
-syn keyword hamlHelper capture_haml escape_once find_and_preserve haml_concat haml_indent haml_tag html_attrs html_esape init_haml_helpers list_of non_haml precede preserve succeed surround tab_down tab_up page_class contained containedin=@hamlEmbeddedRuby,@hamlRubyTop,rubyInterpolation
+syn match hamlHelper "\<action_view?\|\<block_is_haml?\|\<is_haml?\|\.\@<!\<flatten" contained containedin=@hamlEmbeddedRuby,@hamlRubyTop
+syn keyword hamlHelper capture_haml escape_once find_and_preserve haml_concat haml_indent haml_tag html_attrs html_esape init_haml_helpers list_of non_haml precede preserve succeed surround tab_down tab_up page_class contained containedin=@hamlEmbeddedRuby,@hamlRubyTop
syn cluster hamlHtmlTop contains=@htmlTop,htmlBold,htmlItalic,htmlUnderline
-syn region hamlPlainFilter matchgroup=hamlFilter start="^\z(\s*\):\%(plain\|preserve\|redcloth\|textile\|markdown\|maruku\)\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlHtmlTop,rubyInterpolation
-syn region hamlEscapedFilter matchgroup=hamlFilter start="^\z(\s*\):\%(escaped\|cdata\)\s*$" end="^\%(\z1 \| *$\)\@!" contains=rubyInterpolation
+syn region hamlPlainFilter matchgroup=hamlFilter start="^\z(\s*\):\%(plain\|preserve\|redcloth\|textile\|markdown\|maruku\)\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlHtmlTop,hamlInterpolation
+syn region hamlEscapedFilter matchgroup=hamlFilter start="^\z(\s*\):\%(escaped\|cdata\)\s*$" end="^\%(\z1 \| *$\)\@!" contains=hamlInterpolation
syn region hamlErbFilter matchgroup=hamlFilter start="^\z(\s*\):erb\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlHtmlTop,hamlErbInterpolation
syn region hamlRubyFilter matchgroup=hamlFilter start="^\z(\s*\):ruby\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlRubyTop
-syn region hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlJavaScript,rubyInterpolation keepend
-syn region hamlCSSFilter matchgroup=hamlFilter start="^\z(\s*\):css\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,rubyInterpolation keepend
+syn region hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlJavaScript,hamlInterpolation keepend
+syn region hamlCSSFilter matchgroup=hamlFilter start="^\z(\s*\):css\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,hamlInterpolation keepend
syn region hamlSassFilter matchgroup=hamlFilter start="^\z(\s*\):sass\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop
syn region hamlJavascriptBlock start="^\z(\s*\)%script" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend
diff --git a/runtime/syntax/sass.vim b/runtime/syntax/sass.vim
index 879ff87e85..aa5f5e95b0 100644
--- a/runtime/syntax/sass.vim
+++ b/runtime/syntax/sass.vim
@@ -2,7 +2,7 @@
" Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" 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