From e252bdf2bcff4b6645dd152a3ee822bcb506c145 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 20 Jun 2008 11:19:48 -0400 Subject: [PATCH] Highlight ruby inside == #{} --- syntax/haml.vim | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/syntax/haml.vim b/syntax/haml.vim index 5370ee2..4936bc4 100644 --- a/syntax/haml.vim +++ b/syntax/haml.vim @@ -40,7 +40,8 @@ syn region hamlDocType start="^\s*!!!" end="$" syn region hamlRuby matchgroup=hamlRubyOutputChar start="[=~]" end="$" contained contains=@hamlRubyTop keepend syn region hamlRuby matchgroup=hamlRubyChar start="-" end="$" contained contains=@hamlRubyTop keepend syn match hamlPlainChar "\\" contained -syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="==" end="$" keepend contained contains=rubyInterpolation +syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="==" end="$" keepend contained contains=hamlInterpolation +syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contained contains=@hamlRubyTop syn match hamlHelper "\[^]]*]" contained containedin=hamlHtmlComment -hi def link hamlSelfCloser Special -hi def link hamlDespacer Special -hi def link hamlClassChar Special -hi def link hamlIdChar Special -hi def link hamlTag Special -hi def link hamlClass Type -hi def link hamlId Identifier -hi def link hamlPlainChar Special -hi def link hamlInterpolatableChar hamlRubyChar -hi def link hamlRubyOutputChar hamlRubyChar -hi def link hamlRubyChar Special -hi def link hamlDocType PreProc -hi def link hamlFilter PreProc -hi def link hamlAttributesDelimiter Delimiter -hi def link hamlObjectDelimiter Delimiter -hi def link hamlHelper Function -hi def link hamlHtmlComment hamlComment -hi def link hamlComment Comment -hi def link hamlIEConditional SpecialComment -hi def link hamlError Error +hi def link hamlSelfCloser Special +hi def link hamlDespacer Special +hi def link hamlClassChar Special +hi def link hamlIdChar Special +hi def link hamlTag Special +hi def link hamlClass Type +hi def link hamlId Identifier +hi def link hamlPlainChar Special +hi def link hamlInterpolatableChar hamlRubyChar +hi def link hamlRubyOutputChar hamlRubyChar +hi def link hamlRubyChar Special +hi def link hamlInterpolationDelimiter Delimiter +hi def link hamlDocType PreProc +hi def link hamlFilter PreProc +hi def link hamlAttributesDelimiter Delimiter +hi def link hamlObjectDelimiter Delimiter +hi def link hamlHelper Function +hi def link hamlHtmlComment hamlComment +hi def link hamlComment Comment +hi def link hamlIEConditional SpecialComment +hi def link hamlError Error let b:current_syntax = "haml"