<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Aug 12, 2006, at 1:34 PM, Gerd Knops wrote:</DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Aug 10, 2006, at 4:27 PM, thomas Aylott wrote:</DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Aug 10, 2006, at 8:08 AM, Luc Heinrich wrote:</DIV> </BLOCKQUOTE><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Now, have you guys seen the XCode 3.0 screenshot showing the new "ribbon scope highlighter" ?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><<A href="http://www.apple.com/macosx/leopard/xcode.html">http://www.apple.com/macosx/leopard/xcode.html</A>></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hows this for starters?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://flickr.com/photos/thomas_aylott/211990629/">http://flickr.com/photos/thomas_aylott/211990629/</A></DIV></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR></DIV></BLOCKQUOTE><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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)?</DIV></BLOCKQUOTE><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR></DIV></BLOCKQUOTE><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN><A href="http://gerd.knops.org/tabHighlightExample.png">http://gerd.knops.org/tabHighlightExample.png</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">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):</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN>{<SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>name = 'meta.leading-tabs';</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>begin = '^(?=(\t| {4}))';</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">       </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>end = '(?=[^\t\s])';</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>patterns = (</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>{<SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>match = '(\t| {4})(\t| {4})?';</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">  </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>captures =</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>{<SPAN class="Apple-tab-span" style="white-space:pre">   </SPAN>1 = { name = 'meta.odd-tab'; };</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>2 = { name = 'meta.even-tab'; };</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>};</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>}</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">       </SPAN><SPAN class="Apple-tab-span" style="white-space:pre">    </SPAN>);</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">      </SPAN>},</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Gerd</DIV></BLOCKQUOTE></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think both methods have their place. That's why i think we need some sort of injection scheme.</DIV><DIV>So we can have either method used in any language without modification by injecting the scopes into it somehow.</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style=""><FONT class="Apple-style-span" size="4"><SPAN class="Apple-style-span" style="font-size: 14px;"><SPAN class="Apple-style-span" style="font-size: 14px; "><SPAN class="Apple-style-span" style="font-size: 14px; ">thomas Aylott—</SPAN></SPAN></SPAN></FONT><B style="font-weight: bold; "><SPAN class="Apple-style-span" style="font-weight: bold; "><SPAN class="Apple-style-span" style="font-weight: bold; ">subtleGradient</SPAN></SPAN></B></DIV></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>