diff options
author | ctrlaltca <> | 2012-07-24 17:28:14 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-24 17:28:14 +0000 |
commit | 59ef1ca568d8e20a726e343556113c117ce5022c (patch) | |
tree | eaeeb5b386281a3c82afe2fe6d237bc03646a7f5 /editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage | |
parent | 255db529c49ae00f5e8defb14c77461582edfd39 (diff) |
updated plugin for textmate editor (works on "sublime text editor 2", too):
- updated prado syntax to the php's and html's current versions
- added missing webcontrols (activecontrols still missing)
Diffstat (limited to 'editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage')
-rw-r--r-- | editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage | 389 |
1 files changed, 354 insertions, 35 deletions
diff --git a/editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage b/editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage index ca67d3af..d11654ea 100644 --- a/editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage +++ b/editors/Textmate/Prado.tmbundle/Syntaxes/Prado Template.tmLanguage @@ -9,16 +9,26 @@ <string>tpl</string> <string>page</string> </array> + <key>firstLineMatch</key> + <string><!(?i:DOCTYPE)|<(?i:html)|<\?(?i:php)</string> <key>foldingStartMarker</key> <string>(?x) - (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b - |<!--(?!.*-->) + (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?> + |<!--(?!.*--\s*>) + |^<!--\ \#tminclude\ (?>.*?-->)$ + |<\?(?:php)?.*\b(if|for(each)?|while)\b.+: + |\{\{?(if|foreach|capture|literal|foreach|php|section|strip) + |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) |<(?i:(com|prop):[a-zA-z0-9.]+)(.*(?<!\/)>) )</string> <key>foldingStopMarker</key> <string>(?x) - (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> - |^\s*--> + (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)> + |^(?!.*?<!--).*?--\s*> + |^<!--\ end\ tminclude\ -->$ + |<\?(?:php)?.*\bend(if|for(each)?|while)\b + |\{\{?/(if|foreach|capture|literal|foreach|php|section|strip) + |^[^{]*\} |</(?i:(com|prop):[a-zA-z0-9.]+)> )</string> <key>keyEquivalent</key> @@ -156,29 +166,49 @@ </dict> <dict> <key>begin</key> - <string><([a-zA-Z0-9:]+)(?=[^>]*></\1>)</string> + <string>(<)([a-zA-Z0-9:]++)(?=[^>]*></\2>)</string> <key>beginCaptures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.html</string> </dict> </dict> <key>end</key> - <string>>(<)/(\1)></string> + <string>(>)(<)(/)(\2)(>)</string> <key>endCaptures</key> <dict> <key>1</key> <dict> <key>name</key> - <string>meta.scope.between-tag-pair.html</string> + <string>punctuation.definition.tag.end.html</string> </dict> <key>2</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>4</key> + <dict> + <key>name</key> <string>entity.name.tag.html</string> </dict> + <key>5</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.end.html</string> + </dict> </dict> <key>name</key> <string>meta.tag.any.html</string> @@ -192,17 +222,22 @@ </dict> <dict> <key>begin</key> - <string><\?(xml)</string> + <string>(<\?)(xml)</string> <key>captures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.xml.html</string> </dict> </dict> <key>end</key> - <string>\?></string> + <string>(\?>)</string> <key>name</key> <string>meta.tag.preprocessor.xml.html</string> <key>patterns</key> @@ -224,8 +259,16 @@ <dict> <key>begin</key> <string><!--</string> + <key>captures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.comment.html</string> + </dict> + </dict> <key>end</key> - <string>--\s*!?></string> + <string>--\s*></string> <key>name</key> <string>comment.block.html</string> <key>patterns</key> @@ -236,11 +279,23 @@ <key>name</key> <string>invalid.illegal.bad-comments-or-CDATA.html</string> </dict> + <dict> + <key>include</key> + <string>#embedded-code</string> + </dict> </array> </dict> <dict> <key>begin</key> <string><!</string> + <key>captures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + </dict> <key>end</key> <string>></string> <key>name</key> @@ -249,7 +304,7 @@ <array> <dict> <key>begin</key> - <string>(DOCTYPE)</string> + <string>(?i:DOCTYPE)</string> <key>captures</key> <dict> <key>1</key> @@ -290,21 +345,31 @@ </dict> <dict> <key>include</key> - <string>#php</string> + <string>#embedded-code</string> </dict> <dict> <key>begin</key> - <string>(?:^\s+)?<((?i:style))\b(?![^>]*/>)</string> + <string>(?:^\s+)?(<)((?i:style))\b(?![^>]*/>)</string> <key>captures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.style.html</string> </dict> + <key>3</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> </dict> <key>end</key> - <string></((?i:style))>(?:\s*\n)?</string> + <string>(</)((?i:style))(>)(?:\s*\n)?</string> <key>name</key> <string>source.css.embedded.html</string> <key>patterns</key> @@ -315,7 +380,15 @@ </dict> <dict> <key>begin</key> - <string>></string> + <string>(>)</string> + <key>beginCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + </dict> <key>end</key> <string>(?=</(?i:style))</string> <key>patterns</key> @@ -334,17 +407,30 @@ </dict> <dict> <key>begin</key> - <string>(?:^\s+)?<((?i:script))\b(?![^>]*/>)</string> - <key>captures</key> + <string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)</string> + <key>beginCaptures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.script.html</string> </dict> </dict> <key>end</key> - <string>(?<=</(script|SCRIPT))>(?:\s*\n)?</string> + <string>(?<=</(script|SCRIPT))(>)(?:\s*\n)?</string> + <key>endCaptures</key> + <dict> + <key>2</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + </dict> <key>name</key> <string>source.js.embedded.html</string> <key>patterns</key> @@ -355,20 +441,49 @@ </dict> <dict> <key>begin</key> - <string>(?<!</(?:script|SCRIPT))></string> + <string>(?<!</(?:script|SCRIPT))(>)</string> + <key>captures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>entity.name.tag.script.html</string> + </dict> + </dict> <key>end</key> - <string></((?i:script))</string> + <string>(</)((?i:script))</string> <key>patterns</key> <array> <dict> + <key>captures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.comment.js</string> + </dict> + </dict> <key>match</key> - <string>//.*?((?=</script)|$\n?)</string> + <string>(//).*?((?=</script)|$\n?)</string> <key>name</key> <string>comment.line.double-slash.js</string> </dict> <dict> <key>begin</key> <string>/\*</string> + <key>captures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.comment.js</string> + </dict> + </dict> <key>end</key> <string>\*/|(?=</script)</string> <key>name</key> @@ -376,6 +491,10 @@ </dict> <dict> <key>include</key> + <string>#php</string> + </dict> + <dict> + <key>include</key> <string>source.js</string> </dict> </array> @@ -384,17 +503,30 @@ </dict> <dict> <key>begin</key> - <string></?((?i:body|head|html)\b)</string> + <string>(</?)((?i:body|head|html)\b)</string> <key>captures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.structure.any.html</string> </dict> </dict> <key>end</key> - <string>></string> + <string>(>)</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.end.html</string> + </dict> + </dict> <key>name</key> <string>meta.tag.structure.any.html</string> <key>patterns</key> @@ -407,17 +539,30 @@ </dict> <dict> <key>begin</key> - <string></?((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)</string> - <key>captures</key> + <string>(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)</string> + <key>beginCaptures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.block.any.html</string> </dict> </dict> <key>end</key> - <string>></string> + <string>(>)</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.end.html</string> + </dict> + </dict> <key>name</key> <string>meta.tag.block.any.html</string> <key>patterns</key> @@ -430,17 +575,30 @@ </dict> <dict> <key>begin</key> - <string></?((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|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)</string> - <key>captures</key> + <string>(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|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)</string> + <key>beginCaptures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.inline.any.html</string> </dict> </dict> <key>end</key> - <string>></string> + <string>((?: ?/)?>)</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.end.html</string> + </dict> + </dict> <key>name</key> <string>meta.tag.inline.any.html</string> <key>patterns</key> @@ -453,17 +611,30 @@ </dict> <dict> <key>begin</key> - <string></?([a-zA-Z0-9:]+)</string> - <key>captures</key> + <string>(</?)([a-zA-Z0-9:]+)</string> + <key>beginCaptures</key> <dict> <key>1</key> <dict> <key>name</key> + <string>punctuation.definition.tag.begin.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> <string>entity.name.tag.other.html</string> </dict> </dict> <key>end</key> - <string>></string> + <string>(>)</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.tag.end.html</string> + </dict> + </dict> <key>name</key> <string>meta.tag.other.html</string> <key>patterns</key> @@ -486,7 +657,7 @@ </dict> <dict> <key>match</key> - <string><(?=\W)|></string> + <string><</string> <key>name</key> <string>invalid.illegal.bad-angle-bracket.html</string> </dict> @@ -508,8 +679,21 @@ <key>patterns</key> <array> <dict> + <key>captures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.entity.html</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>punctuation.definition.entity.html</string> + </dict> + </dict> <key>match</key> - <string>&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);</string> + <string>(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)</string> <key>name</key> <string>constant.character.entity.html</string> </dict> @@ -596,8 +780,24 @@ <dict> <key>begin</key> <string>"</string> + <key>beginCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.begin.html</string> + </dict> + </dict> <key>end</key> <string>"</string> + <key>endCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.end.html</string> + </dict> + </dict> <key>name</key> <string>string.quoted.double.html</string> <key>patterns</key> @@ -616,8 +816,24 @@ <dict> <key>begin</key> <string>'</string> + <key>beginCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.begin.html</string> + </dict> + </dict> <key>end</key> <string>'</string> + <key>endCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.end.html</string> + </dict> + </dict> <key>name</key> <string>string.quoted.single.html</string> <key>patterns</key> @@ -637,7 +853,106 @@ <key>match</key> <string>\b([a-zA-Z\-:]+)</string> <key>name</key> - <string>meta.other.attribute-name.html</string> + <string>entity.other.attribute-name.html</string> + </dict> + <key>tag-id-attribute</key> + <dict> + <key>begin</key> + <string>\b(id)\b\s*(=)</string> + <key>captures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>entity.other.attribute-name.id.html</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>punctuation.separator.key-value.html</string> + </dict> + </dict> + <key>end</key> + <string>(?<='|")</string> + <key>name</key> + <string>meta.attribute-with-value.id.html</string> + <key>patterns</key> + <array> + <dict> + <key>begin</key> + <string>"</string> + <key>beginCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.begin.html</string> + </dict> + </dict> + <key>contentName</key> + <string>meta.toc-list.id.html</string> + <key>end</key> + <string>"</string> + <key>endCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.end.html</string> + </dict> + </dict> + <key>name</key> + <string>string.quoted.double.html</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>#embedded-code</string> + </dict> + <dict> + <key>include</key> + <string>#entities</string> + </dict> + </array> + </dict> + <dict> + <key>begin</key> + <string>'</string> + <key>beginCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.begin.html</string> + </dict> + </dict> + <key>contentName</key> + <string>meta.toc-list.id.html</string> + <key>end</key> + <string>'</string> + <key>endCaptures</key> + <dict> + <key>0</key> + <dict> + <key>name</key> + <string>punctuation.definition.string.end.html</string> + </dict> + </dict> + <key>name</key> + <string>string.quoted.single.html</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>#embedded-code</string> + </dict> + <dict> + <key>include</key> + <string>#entities</string> + </dict> + </array> + </dict> + </array> </dict> <key>tag-stuff</key> <dict> @@ -645,6 +960,10 @@ <array> <dict> <key>include</key> + <string>#tag-id-attribute</string> + </dict> + <dict> + <key>include</key> <string>#tag-generic-attribute</string> </dict> <dict> |