Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highlight .tpl syntax in Eclipse

Tags:

eclipse

I've been googling and can't find a solution for this. I'm trying to setup .tpl files to use either HTML syntax highlighting or PHP syntax highlighting. Has anyone does this, or do you know how?

Thanks

like image 694
Webnet Avatar asked Nov 02 '10 15:11

Webnet


2 Answers

  • Go to Window -> Preferences-
  • Then General -> Editors -> File Associations-
  • Add the PHP Editor to the *.tpl file type. You may have to create the *.tpl type if it doesn't already exist.

You may also have to set the content type for your tpl files in Content Types also under the General settings. Scroll down to PHP Source File and make sure *.tpl exists there as well.

Then you need to restart eclipse to make it work.

like image 172
sreimer Avatar answered Oct 16 '22 06:10

sreimer


  • Go to Window -> Preferences -> General -> Content Types
  • Select Text -> CSS, click Add, write *.tpl and save.
  • Do the step two for Text -> HTML, Javascript and PHP.
like image 35
svlzx Avatar answered Oct 16 '22 04:10

svlzx