Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Support for inline tags

  • Loading branch information...
commit ec1f8856fe79ab95c74d60b89ec775646ae84ad9 1 parent 7bb64ea
Stefano Verna stefanoverna authored

Showing 1 changed file with 8 additions and 9 deletions. Show diff stats Hide diff stats

  1. +8 9 syntax/slim.vim
17 syntax/slim.vim
@@ -40,23 +40,22 @@ unlet! b:current_syntax
40 40 syn include @slimHtml syntax/scss.vim
41 41 unlet! b:current_syntax
42 42
43   -setlocal iskeyword+=:
44   -
45 43 syn match slimBegin "^\s*\(&[^= ]\)\@!" nextgroup=slimTag,slimClassChar,slimIdChar,slimRuby
46 44
47 45 syn region rubyCurlyBlock start="{" end="}" contains=@slimRubyTop contained
48 46 syn cluster slimRubyTop add=rubyCurlyBlock
49 47
50   -syn cluster slimComponent contains=slimClassChar,slimIdChar,slimWrappedAttrs,slimRuby,slimAttr
  48 +syn cluster slimComponent contains=slimClassChar,slimIdChar,slimWrappedAttrs,slimRuby,slimAttr,slimInlineTagChar
51 49
52 50 syn keyword slimDocType contained html 5 1.1 strict frameset mobile basic transitional
53 51 syn match slimDocTypeKeyword "^\s*\(doctype\)\s\+" nextgroup=slimDocType
54 52
55   -syn match slimTag "\w\+\(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@slimComponent
56   -syn match slimIdChar "#{\@!" contained nextgroup=slimId
57   -syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent
58   -syn match slimClassChar "\." contained nextgroup=slimClass
59   -syn match slimClass "\%(\w\|-\)\+" contained nextgroup=@slimComponent
  53 +syn match slimTag "\w\+" contained contains=htmlTagName nextgroup=@slimComponent
  54 +syn match slimIdChar "#{\@!" contained nextgroup=slimId
  55 +syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent
  56 +syn match slimClassChar "\." contained nextgroup=slimClass
  57 +syn match slimClass "\%(\w\|-\)\+" contained nextgroup=@slimComponent
  58 +syn match slimInlineTagChar "\s*:\s*" contained nextgroup=slimTag,slimClassChar,slimIdChar
60 59
61 60 syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" skip="}\s*\"" end="\s*}\s*" contained contains=slimAttr nextgroup=slimRuby
62 61 syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*\[\s*" end="\s*\]\s*" contained contains=slimAttr nextgroup=slimRuby
@@ -109,9 +108,9 @@ hi def link slimInnerAttrString String
109 108 hi def link slimInterpolationDelimiter Delimiter
110 109 hi def link slimRubyChar Special
111 110 hi def link slimRubyOutputChar Special
112   -hi def link slimTag Special
113 111 hi def link slimText String
114 112 hi def link slimWrappedAttrValueDelimiter Delimiter
115 113 hi def link slimWrappedAttrsDelimiter Delimiter
  114 +hi def link slimInlineTagChar Delimiter
116 115
117 116 let b:current_syntax = "slim"

0 comments on commit ec1f885

Please sign in to comment.
Something went wrong with that request. Please try again.