PyCharm 2023.3 Help

TextMate Bundles

Projects can contain file types unknown to PyCharm. While PyCharm comes with the built-in support for many programming and scripting languages. If you want to have syntax highlighting for the project-specific languages, use the powerful PyCharm's integration with the text editor TextMate.

All the available bundles are listed on the Editor | TextMate Bundles page In the Settings dialog (Ctrl+Alt+S) .

Learning how to describe languages using the TextMate grammar is out of the scope of this document. For more information about TextMate, refer to product documentation.

Prerequisites

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.

  • Before you start working with TextMate Bundles, make sure that the plugin is enabled. The plugin is bundled with PyCharm and is activated by default. If the plugin is not activated, enable it on the Plugins page of the IDE settingsĀ  Ctrl+Alt+S as described in Install plugins.

    In the Settings dialog (Ctrl+Alt+S) , select Build, Execution, Deployment | Docker, and select Docker for <your operating system> under Connect to Docker daemon with. For example, if you're on macOS, select Docker for Mac. See more detail in Docker settings.

    Prebundled TextMate plugin

Importing bundles

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

  1. In the Settings dialog (Ctrl+Alt+S) , select Editor | TextMate Bundles.

  2. Click the Add button and locate the desired bundle on your disk:

    Select the downloaded bundle
  3. Click OK to apply the changes. The OCaml bundle appears in the list of recognized bundles:

    New TextMate bundle

Testing

Once a TextMate bundle is added, PyCharm provides syntax highlighting for the file types registered with the bundle. Here's a sample OCaml code fragment that uses the TextMate bundle we've added earlier:

Code highlighting
Last modified: 07 March 2024