[TxMt] Re: Custom web preview themes in TM2

Allan Odgaard mailinglist at textmate.org
Sun Jan 8 03:42:47 UTC 2012


On 08/01/2012, at 08.36, Jonathan Ragan-Kelley wrote:

> Is it possible to extend the existing web preview themes in TM2? All
> variants of Avian/Themes/WebPreview, Avian/Support/web-themes, etc.
> which I have been trying don't seem to have any effect on the choices
> available to style the HTML output pane.

You need to put your custom styles in a bundle (under the Support folder, e.g. Support/web-themes) and then add a setting (in the bundle) a la:

    {   shellVariables = (
            {   name = 'TM_THEME_PATH';
                value = '$TM_THEME_PATH:$TM_BUNDLE_SUPPORT/web-themes';
            },
        );
    }

Then they will automatically be found. The default Themes bundle works like this as well (and includes the 4 or so default web themes).

This approach allows easy sharing of web themes as it uses the normal bundle system (so we could add your theme to the default source, or users could add a source for web themes, although presently TM2 doesn’t expose a UI for adding new sources for the bundles shown in Preferences → Bundles).



More information about the textmate mailing list