Created
August 22, 2011 08:08
-
-
Save vol4ok/1161902 to your computer and use it in GitHub Desktop.
CoffeeBeans tag syntax highlight for textmate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ scopeName = 'text.html.ruby'; | |
fileTypes = ( 'rhtml', 'erb', 'html.erb' ); | |
foldingStartMarker = '(?x) | |
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> | |
|<!--(?!.*-->) | |
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) | |
)'; | |
foldingStopMarker = '(?x) | |
(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> | |
|^\s*--> | |
|(^|\s)\} | |
)'; | |
patterns = ( | |
{ begin = '<%[=-]?\s*(coffee_script_tag)\s*(do)\s*%>'; | |
end = '<%\s*(end)\s*-?%>'; | |
beginCaptures = { | |
1 = { name = 'entity.name.tag.coffee'; }; | |
2 = { name = 'keyword.control.start-block.ruby'; }; | |
}; | |
endCaptures = { 1 = { name = 'keyword.control.start-block.ruby'; }; }; | |
patterns = ( { include = 'source.coffee'; } ); | |
}, | |
{ name = 'comment.block.erb'; | |
begin = '<%+#'; | |
end = '%>'; | |
captures = { 0 = { name = 'punctuation.definition.comment.erb'; }; }; | |
}, | |
{ name = 'source.ruby.rails.embedded.html'; | |
begin = '<%+(?!>)[-=]?'; | |
end = '-?%>'; | |
captures = { 0 = { name = 'punctuation.section.embedded.ruby'; }; }; | |
patterns = ( | |
{ name = 'comment.line.number-sign.ruby'; | |
match = '(#).*?(?=-?%>)'; | |
captures = { 1 = { name = 'punctuation.definition.comment.ruby'; }; }; | |
}, | |
{ include = 'source.ruby.rails'; }, | |
); | |
}, | |
{ include = 'text.html.basic'; }, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment