TextMate
TextMate is a general-purpose GUI text editor for macOS.
For a number of languages that are not supported in IntelliJ IDEA, for example, Swift, C++, and Perl, the IDE still provides syntax highlighting to improve your coding experience if you occasionally need to examine such code.
Syntax highlighting for these languages is based on TextMate grammars, and IntelliJ IDEA is shipped with a collection of grammar files for different languages. All the available bundles are listed on the page of the Settings dialog (Ctrl+Alt+S) .
Enable the TextMate Bundles plugin
This functionality relies on the TextMate Bundles plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features are not available, make sure that you did not disable the plugin.
Press Ctrl+Alt+S to open settings and then select
.Open the Installed tab, find the TextMate Bundles plugin, and select the checkbox next to the plugin name.
Import TextMate bundles
You can also download and use custom TextMate bundles for other languages. IntelliJ IDEA provides compatibility with several types of bundles, originally designed for different editors:
TextMate bundles are the original bundle types for TextMate editor. They are packaged in a directory with a .tmBundle extension.
Sublime Text packages come with .tmLanguage and .tmPreferences files inside a directory. Since the original TextMate bundles also contain the same files, they are often used interchangeably.
Visual Studio Code extensions with a package.json file present in the directory.
Suppose you want IntelliJ IDEA to highlight syntax of the OCaml files.
Download the OCaml TextMate Bundle. It is now on your disk.
Press Ctrl+Alt+S to open settings and then select
.Click
and locate the OCaml bundle on your disk. It appears in the list of recognized bundles.
Test the imported bundles
Once a TextMate bundle is added, IntelliJ IDEA provides syntax highlighting for the file types supported by this bundle. Here is a sample OCaml code fragment that uses the TextMate bundle added earlier:
![Add TextMate bundles Add TextMate bundles](https://resources.jetbrains.com/help/img/idea/2024.2/ij_textmate_bundle_test.png)