Associating Template files with HTML editing engines in Eclipse

We have been using template files (*.tpl) for one of our projects, and editing in plain text is always painful. So, here’s a mechanism to use the default Web Editor in Eclipse to edit the files:

  • Add filetype association: open Window > Preferences > General > Content Types > Look for ‘HTML’ and add ‘*.tpl’ (without quotes) to associate tpl files with html content type
  • Add editor preference: open Window > Preferences > General > Editors > File Associations, and associate the ‘*.tpl’ type with the ‘Web Page Editor’.

This should also work with any other templating type that uses html as the base markup.

And then, code away to glory!

About kpowerinfinity
I *♥* technology, business, conversations, experiences, books, music, theater, coffee and people. I am an entrepreneur in the city of Bangalore - my company, Capillary, provides customer engagement programs and marketing services to retailers around the world.

3 Responses to Associating Template files with HTML editing engines in Eclipse

  1. Reynaldo says:

    Thanks! I really need it. ;)

  2. Pingback: Using PDT for PHP Development - Diggly Dufus

  3. Thanks, great information….

%d bloggers like this: