[TxMt] punctuation.whitespace.function-call.leading.c

Michael Sheets mummer at whitefalls.org
Tue Feb 12 06:58:41 UTC 2008


On Feb 11, 2008, at 7:43 AM, Thomas Aylott - subtleGradient wrote:

>> Well for Javascript this isn't a downside, since it doesn't have  
>> any line-based scopes. But most grammars match entire lines at some  
>> point, adding tab scopes to each of those would get very messy  
>> quite fast. Depending how many tabs you allow that's 5+ captures,  
>> double it if you have a different scope for spaces over tabs like  
>> your current version does for each rule.
>
> There are a few places where I've had to capture the leading space,  
> but you just have to include the #leading-space thing and you're  
> good to go. Obviously wouldn't work if that space was taken in a  
> different way though.

Most of the line-based scopes capture "^\s*foo" as the begin, I guess  
you could a look-ahead to get into the patterns immediately but then  
your into making it more complicated which was my point. ;)

> I'd also like the option of activating the coloring based on caret  
> position instead of having to mouse over the gutter like in Xcode.

You can do this in XCode, View → Folding → Focus follows selection.  
Took me forever to figure out how to take that screenshot. ;)


More information about the textmate mailing list