[SVN] New Embedded Scopes + punc.whitespace
Thomas Aylott (subtleGradient)
oblivious at subtlegradient.com
Fri May 25 16:45:52 UTC 2007
On May 25, 2007, at 3:13 AM, Michael Sheets wrote:
> Been working on standardizing the embedded scopes for a while now
> as well as adding a long needed whitespace scope. Need some
> feedback on both:
>
> punctuation.whitespace: For use when you need to extend a scope to
> the beginning or end of a line without extending the actual scope
> to it. For instance a series of indented comments, the space before
> # on each line shouldn't be a comment but that means you can't
> target a command at the whole set of them. By specifying a
> whitespace rule you can use both to do so without messing up the
> scoping. Also useful for when you have embedded blocks (say for
> instance <script> tags, we currently extend the source.js to the
> edge, which of course isn't correct but styles better). This
> wouldn't be for every situation, only those where it makes sense
> and be helpful.
>
> Embedded scopes: I've drawn up a list of examples that outline each
> type of embedded scope I could think of. Will require some theme
> changes but should make everything work more consistently.
>
> <http://temp.whitefalls.org/embedded/inclusive_single_tag.png>
> <http://temp.whitefalls.org/embedded/lines.png>
> <http://temp.whitefalls.org/embedded/heredoc.png>
> <http://temp.whitefalls.org/embedded/enclosed_in_tags.png>
> <http://temp.whitefalls.org/embedded/enclosed_in_tags_v2.png>
> <http://temp.whitefalls.org/embedded/template_language.png>
> <http://temp.whitefalls.org/embedded/mixed_cases.png>
>
> Also added a new meta.tag.template.* sub-scope in some of the above
> examples. It's used in template languages where the tags themselves
> do something other than simply embed another language. For instance
> it's not for PHP or erb, but would be for Mason and Movable Type.
> (See above examples)
>
> Hopefully it's not all that confusing, was the best way I could
> think of to visualize it all.
Looks great.
I'm already using whitespace scopes in a number of my languages for
theaming up the different tab levels visually.
http://flickr.com/photos/thomas_aylott/404629540/in/
set-72157594577992345/
http://flickr.com/photos/thomas_aylott/211990629/in/
set-72157594577992345/
One thing that I'd like to see done is scoping a single line ERB
block and a multi-line ERB block as such, so you can style them
differently.
Also scoping the different types of embedded tags differently <% %>, <
%= %>, etc…
I'm already doing that in my personal Rails HTML syntax.
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20070525/6c6e8d58/attachment.html>
More information about the textmate-dev
mailing list