# TextMate bundles

For a number of languages that are not supported in CLion, for example, PHP, Ruby, and Java, the IDE still provides syntax highlighting to improve your coding experience if you occasionally need to examine such code. For more information about describing languages using the TextMate grammar, refer to the [TextMate official website](https://macromates.com/manual/en/language_grammars).

Syntax highlighting for these languages is based on TextMate grammars, and CLion is shipped with a collection of grammar files for different languages. All the available bundles are listed on the `Editor | TextMate Bundles` page   of the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))).

![TextMate bundles settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_textmate_settings.png)

If more profound support for a chosen language is provided through the IDE itself or a plugin (like [Rust](https://plugins.jetbrains.com/plugin/8182-rust)), it’s prioritized over a TextMate Bundle.

You can also download and [use custom TextMate bundles](#importing-bundles) for other languages.

When a TextMate bundle for a particular language is enabled, CLion provides syntax highlighting for the file types registered with the bundle. For example, in case of Ruby:

![Ruby syntax highlighting](https://resources.jetbrains.com/help/img/idea/2026.2/cl_textmate_ruby.png)

## Using a custom TextMate bundle

Suppose you want CLion to highlight syntax of the OCaml files. For this purpose, you have already downloaded the [OCaml TextMate Bundle](https://github.com/textmate/ocaml.tmbundle). It now resides on your hard disk, and you only have to import this bundle into CLion.

Procedure:

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), select Editor | TextMate Bundles.

2. Click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) and locate the desired bundle on your disk:

![Select the downloaded bundle](https://resources.jetbrains.com/help/img/idea/2026.2/ac_textmatebundles_import.png)

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

![New TextMate bundle](https://resources.jetbrains.com/help/img/idea/2026.2/ac_textmatebundles_import_result.png)

4. Once a TextMate bundle is added, syntax highlighting is available for the file types registered with the bundle. Here's a sample OCaml code fragment that uses the TextMate bundle we have added:

![Code highlighting](https://resources.jetbrains.com/help/img/idea/2026.2/ac_textmatebundles_highlight.png)

## See also

