Associating Template files with HTML editing engines in Eclipse

10 Oct

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!

Tags: , , ,

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

  1. Reynaldo January 3, 2009 at 9:40 am #

    Thanks! I really need it. ;)

  2. Rafael Theodoro March 24, 2012 at 9:22 pm #

    Thanks, great information….

Trackbacks/Pingbacks

  1. Using PDT for PHP Development - Diggly Dufus - January 15, 2009

    [...] with Smarty Templates(*.tpl), and more. (KK has a post about associating TPL with HTML editing, you can try that. Or, you can also have the full smartyPDT [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.