Skip to content

Commit

Permalink
Merge pull request #45 from sorah/highlight_multiple_attrs_and_ruby_c…
Browse files Browse the repository at this point in the history
…ode_after_attr

Highlight multiple attrs and ruby code after attr
  • Loading branch information
minad committed Jul 1, 2014
2 parents ed70e0d + 9fc2d8d commit 0daaa85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion syntax/slim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*"
syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*\[\s*" end="\s*\]\s*" contained contains=slimAttr nextgroup=slimRuby
syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*(\s*" end="\s*)\s*" contained contains=slimAttr nextgroup=slimRuby

syn match slimAttr "\s*\%(\w\|-\)\+\s*" contained contains=htmlArg nextgroup=slimAttrAssignment
syn match slimAttr /\s*\%(\w\|-\)\+\s*=/me=e-1 contained contains=htmlArg nextgroup=slimAttrAssignment
syn match slimAttrAssignment "\s*=\s*" contained nextgroup=slimWrappedAttrValue,slimAttrString

syn region slimWrappedAttrValue start="[^"']" end="\s\|$" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar
syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="{" end="}" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar
syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="\[" end="\]" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar
syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="(" end=")" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar
Expand Down

0 comments on commit 0daaa85

Please sign in to comment.