[TextMate] Separation of style & syntax (was: TextMate ActionScript Bundle)

Allan Odgaard allan at macromates.com
Mon Oct 11 07:07:54 UTC 2004


On 11. Oct 2004, at 8:36, Rob Bevan wrote:

> [...] I'd much prefer it if TextMate adopted the Xcode way of doing 
> this: the syntax file defines the language (primitives, built-in 
> classes, built-in methods, user functions, preprocessor directives, 
> Numbers and operators: whatever) and the user gets to pick how they 
> want those displayed [...]

Yes, as I thought I made clear on the ML, there will be separate style 
sheets in a later version.

Though I don't think it is as simple as Xcode and just a few "global" 
names, since TM has a rather free style to define syntax highlight, 
like in the HTML syntax file where a stand-alone & gets a red 
background, or the way that HTML uses color for markup when on its own, 
but grey-tones when there is embedded scripting (and colors are than 
reserved for scripts) -- plus when embedding stuff, the names would 
clash (i.e. a string in HTML, and the embedded JavaScript, Ruby, PHP or 
whatever, would be identical).

But the system I have in mind is similar to normal CSS, so it should 
allow both catch-all rules and pin-pointing individual elements (and 
put no restrain on which elements a syntax file can define).

Also, if I didn't mention this earlier, with the breakup of syntax and 
style, the former will also be used to enable/disable stuff like spell 
checking, foldings, smart-typing etc. for comments, strings, tags in 
HTML, etc., mark filenames so that they can be "followed" in the editor 
(#include, require(), <a href="...">, etc.), mark function prototypes 
or sections so that they can appear in the highly requested function 
popup a.s.o. -- and full recursion will also be supported (which may 
also then make it possible to do a (clickable) bread crumb display of 
context in the status bar).

I will also re-visit the folding marker-system -- so this is really a 
major overhaul of the current system!

I'll probably dedicate a portion of the wiki to collect requests for 
this system when the time is right -- currently I have a lot of other 
things that needs to be "fixed" with TextMate before I can spend 
resources on this new syntax system.


Kind regards Allan




More information about the textmate mailing list