[TxMt] The Growing Importance of Themes

Michael Sheets mummer at whitefalls.org
Tue Feb 13 09:46:43 UTC 2007


On Feb 12, 2007, at 10:44 AM, subtleGradient / Thomas Aylott wrote:

> A major goal of all the scoping standardizationstuff we do in the  
> syntaxes is to make it really easy so make a single theme that can  
> be used for any language.
> Unfortunately, the reality is that languages are really complex and  
> it takes work to make a theme look good in more than a few  
> languages. And then more work to keep that theme looking good as  
> the languages syntaxes are updated and improved.

I've got to disagree here, I think now that we have standardized  
scopes it should definitely be possible. Perhaps you can make a  
'perfect' theme for a language sure, but I think this is the wrong  
approach. The whole concept in TextMate has been to make this generic  
whenever possible to allow reuse. The language grammars are a good  
example of this. Sure there are a few things you can't do quite right  
in some languages, but in the long run we're better off with a  
generic format than lots of special rules thought up for specific  
languages.

There are exceptions to this, I think some groups of languages take  
special handling. Markup languages can need special rules for  
instance, and I think regular expressions as a whole can use a lot of  
special cases. But I don't think any language is by itself unique  
enough to need it's own rules for the most part. My intent is to make  
Twilight much better than it is now while lessening the special rules  
it has, I don't think I'll have many problems doing so. (Of course  
we'll see when I get further along. ;)

> The advantage of doing a version of an existing deep theme is that  
> you get a new style without having to do all the coding of the  
> random edge cases. It looks pretty without losing any theme-based  
> functionality.

I agree here, re-using a theme is massively helpful. It's the main  
reason a light version of Twilight doesn't exist, I don't want to  
keep them in sync until I'm happy with Twilight.

> Have you ever user ShapeShifter? There are all these OS themes that  
> you can use to change the look of the chrome on all the windows and  
> dock and whatever else on your system. There's also a new tool you  
> can use to make a tweaked version of an existing theme. You can  
> apply core image tweaks to all of the images in the theme and save  
> out a tweaked version of a theme.

I think there are three kinds of theme editors…

1. Minor editors: The person who edits just the few things they don't  
like, or adds a rule or two.
2. Theme recyclers: The person that takes another theme and leaves  
the structure wholly the same, changing only the colors/weight/etc.
3. From scratch.

For the minor editors I think some way similar to the bundle editor  
would be nice, so they don't lose other updates to the theme as they  
add/change the few things.

For the theme recyclers I could foresee some help, because keeping a  
theme in sync once you've branched it off is near impossible. I'd be  
nice if there was a way to have a master 'structure' file of some  
sort and any changes make to it would apply to the 'child themes'  
below, so we could keep the versions in sync. The problem I see with  
this is how to really make it all work and worst of all it's ui.

Ideally I think most people don't understand enough about the way  
various scopes interact to make a theme structure that works well  
except for the languages they use. So I think good templates are  
going to be important. Being able to make a theme from a template and  
then it receive structural changes later on would be quite sweet.




More information about the textmate mailing list