I just created this:

{       scopeName = 'text.dryml';
        fileTypes = ( 'dryml' );
        foldingStartMarker = '(?x)
                
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|
script|ul|ol|li|form|dl|wrap|repeat|if|else|unless|view|section-group|
section|aside|header|footer|page|def)\b.*?>
                |<!--(?!.*--\s*>)
                |^<!--\ \#tminclude\ (?>.*?-->)$
                |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
                )';
        foldingStopMarker = '(?x)
                (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|
style|script|ul|ol|li|form|dl|wrap|repeat|if|else|unless|view|section-
group|section|aside|header|footer|page|def)>
                |^(?!.*?<!--).*?--\s*>
                |^<!--\ end\ tminclude\ -->$
                |^[^{]*\}
                )';
        patterns = (
                {       name = 'meta.tag.any.dryml';
                        begin = '(<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)';
                        end = '(>(<)/)(\2)(>)';
                        beginCaptures = {
                                1 = { name = 'punctuation.definition.tag.html'; 
};
                                2 = { name = 'entity.name.tag.html'; };
                        };
                        endCaptures = {
                                1 = { name = 'punctuation.definition.tag.html'; 
};
                                2 = { name = 
'meta.scope.between-tag-pair.html'; };
                                3 = { name = 'entity.name.tag.html'; };
                                4 = { name = 'punctuation.definition.tag.html'; 
};
                        };
                        patterns = ( { include = '#tag-stuff'; } );
                },
                {       name = 'meta.tag.preprocessor.xml.html';
                        begin = '(<\?)(xml)';
                        end = '(\?>)';
                        captures = {
                                1 = { name = 'punctuation.definition.tag.html'; 
};
                                2 = { name = 'entity.name.tag.xml.html'; };
                        };
                        patterns = (
                                {       include = '#tag-generic-attribute'; },
                                {       include = '#string-double-quoted'; },
                                {       include = '#string-single-quoted'; },
                        );
                },
                {       name = 'comment.block.html';
                        begin = '<!--';
                        end = '--\s*>';
                        captures = { 0 = { name =
'punctuation.definition.comment.html'; }; };
                        patterns = (
                                {       name = 
'invalid.illegal.bad-comments-or-CDATA.html';
                                        match = '--';
                                },
                                {       include = '#embedded-code'; },
                        );
                },
                {       name = 'meta.tag.block.any.html';
                        begin = 
'(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|frame|
frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|
center|dir|hr|menu|pre)\b)';
                        end = '(>)';
                        beginCaptures = {
                                1 = { name = 
'punctuation.definition.tag.begin.html'; };
                                2 = { name = 'entity.name.tag.block.any.html'; 
};
                        };
                        endCaptures = { 1 = { name =
'punctuation.definition.tag.end.html'; }; };
                        patterns = ( { include = '#tag-stuff'; } );
                },
                {       name = 'meta.tag.block.any.dryml';
                        begin = 
'(</?)((?i:def|table|form|wrap|repeat|with|if|else|unless|
view|section-group|section|aside|header|footer|page|field-list|view|
error-messages|select-many|card|collection|navigation|account-nav|
flash-messages|table-plus|sortable-collection|preview-with-more|login-
page|forgot-password-page|forgot-password-email-sent-page|account-
disabled-page|account-page)\b)';
                        end = '(>)';
                        beginCaptures = {
                                1 = { name = 
'punctuation.definition.tag.begin.html'; };
                                2 = { name = 'entity.name.tag.block.any.html'; 
};
                        };
                        endCaptures = { 1 = { name =
'punctuation.definition.tag.end.html'; }; };
                        patterns = ( { include = '#tag-stuff'; } );
                },
                {       name = 'meta.tag.inline.any.dryml';
                        begin = 
'(</?)((?i:call-tag|partial|do|dev-user-changer|nil-view|
image|spinner|hobo-rapid-javascripts|name|type-name|collection-name|a|
count|theme-stylesheet|You|Your|A-or-An|a-or-a|comma-list|collection-
view|links-for-collection|has-many-editor|belongs-to-editor|select-one-
editor|string-select-editor|boolean-checkbox-editor|integer-select-
editor|editor|or-cancel|submit|remote-method-button|update-button|
delete-button|create-button|select-one|name-one|select-input|after-
submit|select-menu|check-many|hidden-id-field|input-many|input-all|
input|collection-input|search-card|empty-collection-message|record-
flags|transition-buton|nav-item|page-nav|page-scripts|permission-
denied-page|not-found-page|doctype|html|if-ie|stylesheet|javascript|
flash-message|ajax-progress|live-search|filter-menu|with-fields|with-
field-names|simple-page)\b)';
                        end = '((?: ?/)?>)';
                        beginCaptures = {
                                1 = { name = 
'punctuation.definition.tag.begin.html'; };
                                2 = { name = 'entity.name.tag.inline.any.html'; 
};
                        };
                        endCaptures = { 1 = { name =
'punctuation.definition.tag.end.html'; }; };
                        patterns = ( { include = '#tag-stuff'; } );
                },

                {       name = 'meta.tag.inline.any.html';
                        begin = 
'(</?)((?i:abbr|acronym|area|b|base|basefont|bdo|big|br|
button|caption|cite|code|col|colgroup|del|dfn|em|font|head|i|img|ins|
isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|
param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|
table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)';
                        end = '((?: ?/)?>)';
                        beginCaptures = {
                                1 = { name = 
'punctuation.definition.tag.begin.html'; };
                                2 = { name = 'entity.name.tag.inline.any.html'; 
};
                        };
                        endCaptures = { 1 = { name =
'punctuation.definition.tag.end.html'; }; };
                        patterns = ( { include = '#tag-stuff'; } );
                },
                {       name = 'meta.tag.other.html';
                        begin = '(</?)([a-zA-Z0-9:]+)';
                        end = '(>)';
                        beginCaptures = {
                                1 = { name = 
'punctuation.definition.tag.begin.html'; };
                                2 = { name = 'entity.name.tag.other.html'; };
                        };
                        endCaptures = { 1 = { name =
'punctuation.definition.tag.end.html'; }; };
                        patterns = ( { include = '#tag-stuff'; } );
                },
                {       include = '#entities'; },
                {       name = 'invalid.illegal.incomplete.html';
                        match = '<>';
                },
                {       name = 'invalid.illegal.bad-angle-bracket.html';
                        match = '<';
                },
        );
        repository = {
                embedded-code = {
                        patterns = (
                                {       include = '#ruby'; },
                                {       include = '#php'; },
                                {       include = '#smarty'; },
                                {       include = '#python'; },
                        );
                };
                entities = {
                        patterns = (
                                {       name = 'constant.character.entity.html';
                                        match = 
'(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)';
                                        captures = {
                                                1 = { name = 
'punctuation.definition.entity.html'; };
                                                3 = { name = 
'punctuation.definition.entity.html'; };
                                        };
                                },
                                {       name = 
'invalid.illegal.bad-ampersand.html';
                                        match = '&';
                                },
                        );
                };
                ruby = {
                        patterns = (
                                {       name = 'comment.block.erb';
                                        begin = '<%+#';
                                        end = '%>';
                                        captures = { 0 = { name =
'punctuation.definition.comment.erb'; }; };
                                },
                                {       name = 'source.ruby.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'; },
                                        );
                                },
                                {       name = 
'source.ruby.nitro.embedded.html';
                                        begin = '<\?r(?!>)=?';
                                        end = '-?\?>';
                                        captures = { 0 = { name =
'punctuation.section.embedded.ruby.nitro'; }; };
                                        patterns = (
                                                {       name = 
'comment.line.number-sign.ruby.nitro';
                                                        match = 
'(#).*?(?=-?\?>)';
                                                        captures = { 1 = { name 
=
'punctuation.definition.comment.ruby.nitro'; }; };
                                                },
                                                {       include = 
'source.ruby'; },
                                        );
                                },
                        );
                };
                string-double-quoted = {
                        name = 'string.quoted.double.html';
                        begin = '"';
                        end = '"';
                        beginCaptures = { 0 = { name =
'punctuation.definition.string.begin.html'; }; };
                        endCaptures = { 0 = { name =
'punctuation.definition.string.end.html'; }; };
                        patterns = (
                                {       include = '#embedded-code'; },
                                {       include = '#entities'; },
                        );
                };
                string-single-quoted = {
                        name = 'string.quoted.single.html';
                        begin = "'";
                        end = "'";
                        beginCaptures = { 0 = { name =
'punctuation.definition.string.begin.html'; }; };
                        endCaptures = { 0 = { name =
'punctuation.definition.string.end.html'; }; };
                        patterns = (
                                {       include = '#embedded-code'; },
                                {       include = '#entities'; },
                        );
                };
                tag-generic-attribute = {
                        name = 'entity.other.attribute-name.html';
                        match = '\b([a-zA-Z\-:]+)';
                };
                tag-id-attribute = {
                        name = 'meta.attribute-with-value.id.html';
                        begin = '\b(id)\b\s*(=)';
                        end = '(?<=''|")';
                        captures = {
                                1 = { name = 
'entity.other.attribute-name.id.html'; };
                                2 = { name = 
'punctuation.separator.key-value.html'; };
                        };
                        patterns = (
                                {       name = 'string.quoted.double.html';
                                        contentName = 'meta.toc-list.id.html';
                                        begin = '"';
                                        end = '"';
                                        beginCaptures = { 0 = { name =
'punctuation.definition.string.begin.html'; }; };
                                        endCaptures = { 0 = { name =
'punctuation.definition.string.end.html'; }; };
                                        patterns = (
                                                {       include = 
'#embedded-code'; },
                                                {       include = '#entities'; 
},
                                        );
                                },
                                {       name = 'string.quoted.single.html';
                                        contentName = 'meta.toc-list.id.html';
                                        begin = "'";
                                        end = "'";
                                        beginCaptures = { 0 = { name =
'punctuation.definition.string.begin.html'; }; };
                                        endCaptures = { 0 = { name =
'punctuation.definition.string.end.html'; }; };
                                        patterns = (
                                                {       include = 
'#embedded-code'; },
                                                {       include = '#entities'; 
},
                                        );
                                },
                        );
                };
                tag-stuff = {
                        patterns = (
                                {       include = '#tag-id-attribute'; },
                                {       include = '#tag-generic-attribute'; },
                                {       include = '#string-double-quoted'; },
                                {       include = '#string-single-quoted'; },
                                {       include = '#embedded-code'; },
                        );
                };
        };
}

--

Seems to work ok, but anyone please fix any bugs...
It should be easy to build on this with some commands and snippets to
speed development (content assist etc.)
Anyone?

On Aug 22, 10:28 pm, Owen <[email protected]> wrote:
> I think NicWilliamsstarted one, but my memory is hazy about this....
>
> On Aug 22, 2:51 pm, Kristian <[email protected]> wrote:
>
> > Anyone out there knows of a DRYML plugin for textmate or any other IDE/
> > editor that can do some highlighting or content assist on DRYML?
>
> > If not, I will try to roll my own...
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to