[TxMt] Problem with scope selector in Rails bundle

Santosh Mani santoshm at rocketmail.com
Fri Sep 11 04:54:10 UTC 2009


Hello,

I am using Textmate 1.5.9. When I visit a .erb file or a .html.erb file the scope selector identifies the source as being source.ruby.rails rather than the text.html.ruby which I believe is the correct scope. As a consequence a lot of my snippets are unavailable.

Thanks for any suggestions you might have.

Cheers,
Santosh

------

The following is the definition of the language:

{    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 = (
        {    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'; },
    );
}



      



More information about the textmate mailing list