Skip to end of metadata
Go to start of metadata

TextMate, a text editor for Mac, offers syntax highlighting bundles that have already become a well-known tool for sharing preferred highlighting schemes for most of the programming languages and file types in use nowadays. RubyMine lets you import your favorite bundles and thus expands the space of languages you may use with syntax highlighting support.

0. Prerequisites

Make sure that:

  • You have already downloaded bundles you want to use. TextMate has a GitHub organization in which bundles for many languages can be found. You can also use Subversion.
  • TextMate bundles support plugin is enabled. This plugin comes bundled with RubyMine, and is enabled by default. To verify that the plugin is enabled, go to Settings - IDE Settings - Plugins and make sure that the corresponding checkbox is selected:

1. Importing Bundles

Now you can import the downloaded bundles into RubyMine. In order to do that go to Settings - IDE Settings - TextMate Bundles and press +. Then locate the desired bundle on your hard disk:

After that RubyMine will list the TextMate bundle that was loaded. Use the checkbox to enable or disable the bundle. You can also configure the color schemes to be used with this bundle:

2. Checking File Types

Most TextMate bundles come with a set of file extensions they can handle. For example, the shellscript bundle registers common extensions such as .sh, .bash and so on. To see the list of file extensions supported go to Settings - IDE Settings - File types, locate Files supported via TextMate Bundles in the Recognized File Types area and check the list in the Registered Patterns area:

If you want to add another file extension which maps to the TextMate bundle, open shellscript.tmbundle-master/Syntaxes/Shell-Unix-Bash.tmLanguage file in some text editor, find <key>fileTypes</key> section and add a file type, for example <string>zsh</string>, under <array>. Restart RubyMine, verify that *.zsh is now listed in the Registered Patterns area.

3. Testing the Bundle

Once a TextMate bundle is added, RubyMine will provide syntax highlighting for the file types registered with the bundle. Here's a sample shell script which uses the shell script TextMate bundle:

  • No labels