RubyMine 2017.2 Help

Creating and Registering File Types


You can create custom file types to enable parsing these files in the editor by defining highlighting schemes for keywords, comments, numbers, etc. To enable RubyMine decide how to treat a file, you need to associate each file type with relevant extensions.

Creating a file type

To create a new file type

  1. Open the Settings/Preferences dialog by choosing File | Settings for Windows and Linux or RubyMine | Preferences for macOS. Then select Editor | File Types. Find more on page Accessing Settings.
  2. On the File Types page that opens, click /help/img/idea/2017.2/add.png.
  3. In the New File Type dialog box that opens, specify the name of the new type and optionally provide a description.
  4. In the Syntax Highlighting section, specify the characters for line and block comments, hex prefixes, and number postfixes.
  5. In the Keywords section, specify sets of keywords using the tabs from 1 to 4. To do so, select the desired tab, click /help/img/idea/2017.2/add.png (Alt+Insert), and enter the keyword name in the Add New Keyword dialog box that opens.

Registering a file type

To associate a file type with extensions

  1. Open the File Types settings page.
  2. From the Recognized File Types list, select the desired type.
  3. In the Registered Patterns area, complete the list of patterns that define the file extensions to indicate that the corresponding files belong to the selected type. Do one of the following:
    • To register a new pattern, click /help/img/idea/2017.2/add.png (Alt+Insert) and enter the desired extension pattern in the Add Wildcard dialog box that opens.
    • To update a pattern, select it in the list, click the Edit button /help/img/idea/2017.2/edit1.png and make the necessary changes in the Edit Wildcard dialog box that opens.
    • To remove a pattern from the list, select it and click /help/img/idea/2017.2/delete.png (Alt+Delete).
Last modified: 26 October 2017

See Also