Adding syntax highlighting for new languages to Eclipse with the Colorer library

1 minute read

Say you have an HRC file containing the syntax and lexical structure of some programming language Eclipse does not support (for example D).

Using the EclipseColorer plugin, you can easily add support for it. For this tutorial I’ll be using Eclipse Classic 3.7.2 32-bit.

  1. Go to Help -> Install New Software and click Add..
  2. In the Name field write Colorer and in the Location field write


  1. Select the entry you’ve just added in the work with: combo box, wait for the component list to populate and click Select All
  2. Click Next and follow the instructions
  3. Once the plugin is installed, close Eclipse
  4. Copy your HRC file to [EclipseFolder]\plugins\net.sf.colorer\0.9.9\colorer\hrc\auto\types
  5. Use your favorite text editor to open [EclipseFolder]\plugins\net.sf.colorer\0.9.9\colorer\hrc\auto\empty.hrc
  6. Add the appropriate prototype element. For example, if your HRC file is d.hrc, empty.hrc  will look like this: 
   <?xml version="1.0" encoding='Windows-1251'?>
    "-//Cail Lomecb//DTD Colorer HRC take5//EN"
    <hrc version="take5" xmlns=""
    'auto' is a place for include
    to colorer your own HRCs
   <prototype name="d" group="main" description="D">
    <location link="types/d.hrc"/>
  1. Save the changes and close the text editor
  2. Open Eclipse and go to Window -> Preferences -> General -> Editors -> File Associations
  3. In the file types section, click Add.. and fill in the appropriate filetype (for example .d)
  4. Click OK and click your newly added entry in the list
  5. In the associated editors section, click Add.., select Colorer Editor and press OK

All done! Now you can open your new language files in Eclipse and enjoy syntax highlighting and parsing.

Adding new language support to FAR manager (plugin) and Midnight Commander (plugin) is similar.[



Leave a Comment