[TxMt] XCode 3.0 Ribbon Scope Highlighter
thomas Aylott
thomas.42 at gmail.com
Mon Aug 14 14:36:03 UTC 2006
On Aug 12, 2006, at 1:34 PM, Gerd Knops wrote:
> On Aug 10, 2006, at 4:27 PM, thomas Aylott wrote:
>> On Aug 10, 2006, at 8:08 AM, Luc Heinrich wrote:
>>> Now, have you guys seen the XCode 3.0 screenshot showing the new
>>> "ribbon scope highlighter" ?
>>> <http://www.apple.com/macosx/leopard/xcode.html>
>>>
>> Hows this for starters?
>> http://flickr.com/photos/thomas_aylott/211990629/
>
> Am I the only one who thinks that this is a sledgehammer approach
> to highlighting structure, and that it will interfere with syntax
> highlighting (I make occasional use of background colors)?
>
> Some time ago a different approach to the same goal was discussed
> that involved highlighting leading tabs. It is relatively easy to
> add to all languages, Perl already has it:
>
> http://gerd.knops.org/tabHighlightExample.png
>
> The only downside at this point is that for soft tabs the tab size
> is hardcoded, but I guess Allan could add something to fix that.
>
> In most languages all that is needed is to include this into the
> syntax (replacing the 4 in ' {4}' with the default tab width for
> the language):
>
> { name = 'meta.leading-tabs';
> begin = '^(?=(\t| {4}))';
> end = '(?=[^\t\s])';
> patterns = (
> { match = '(\t| {4})(\t| {4})?';
> captures =
> { 1 = { name = 'meta.odd-tab'; };
> 2 = { name = 'meta.even-tab'; };
> };
> }
> );
> },
>
> Gerd
It's all theme dependent. This is actually based on your idea here. I
just explicitly names each tab and names the group. That way you can
color the leading space on one side one color and the other side
another color.
I think both methods have their place. That's why i think we need
some sort of injection scheme.
So we can have either method used in any language without
modification by injecting the scopes into it somehow.
thomas Aylott—subtleGradient
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060814/9c0f9bae/attachment.html>
More information about the textmate
mailing list