[SVN] New Embedded Scopes + punc.whitespace

Michael Sheets mummer at whitefalls.org
Fri May 25 07:13:09 UTC 2007


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.



More information about the textmate-dev mailing list