PhpStorm 2019.1 Help

Tutorial: Using TextMate Bundles

Projects can contain file types unknown to PhpStorm. While PhpStorm comes with the built-in support for many programming and scripting languages, you might want to have syntax highlighting for the project-specific languages. For example, a project can contain a shell script, or Perl; a configuration file can exist in a project for the infrastructure automation purposes. If you want to have syntax highlighting for these cases, use the powerful PhpStorm's integration with the text editor TextMate.

This tutorial aims to walk you step by step through configuring PhpStorm to use the TextMate Bundles, and editing files with the registered extensions.

Learning TextMate is out of scope of this tutorial. For information about TextMate, refer to the product documentation.


Make sure that:

  • You have already downloaded bundles you want to use. You can, for example, find the bundles you want to install on GitHub or Subversion.

  • You are working with PhpStorm 2016.1 (where TextMate Bundles are supported) or later.

  • Before you start working with TextMate Bundles, make sure that the TextMate bundle support plugin is enabled. The plugin is bundled with PhpStorm and is activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Managing plugins.

    py textmatebundles plugin

Importing bundles

Suppose you want PhpStorm to highlight syntax of the Shell Script files. For this purpose, you have already downloaded the Shell Script TextMate Bundle. It now resides on your hard disk, and you only have to import this bundle into PhpStorm.

In the Settings/Preferences dialog (Ctrl+Alt+S), go to Editor, then click TextMate Bundles. In the TextMate Bundles area, click icons general add svg and locate the desired bundle on your hard disk:

py textmatebundles import

Click OK to apply changes. The Shell Script bundle appears in the list of recognized bundles:

py textmatebundles import result

Notice the color scheme mapping section in the lower part of the TextMate Bundles page. By default, the PhpStorm's Default color scheme maps to the Mac Classic. To use a different color scheme for the bundle, click the Mac Classic cell in the mappings table and select the desired scheme from the list of available ones.

py textmatebundles color

Extension conflicts

Suppose you've imported a bundle that runs into a conflict with the existing file types. The conflict is immediately reported:

py textmatebundles import existing

Clicking the Show details link opens the dialog box that gives you the chance to unregister the required extensions from the native file types:

py textmatebundles import extension conflicts


Once a TextMate bundle is added, PhpStorm provides syntax highlighting for the file types registered with the bundle. Here's a sample script that uses the Shell Script TextMate bundle we've cloned earlier:

py textmatebundles highlight
Last modified: 8 July 2019

See Also

Getting Started: