Nathan Osman
Nathan Osman

Reputation: 73305

How to manually specify syntax highlighting for a specific extension in Eclipse?

I am editing some files with the extension '.ctp'. Although these files are perfectly valid PHP files, Eclipse doesn't seem to know that and refuses to do any syntax highlighting with them.

How can I manually instruct it to use PHP syntax coloring for '.ctp' files? Is there even a way to do that?

Upvotes: 12

Views: 4978

Answers (1)

netcoder
netcoder

Reputation: 67745

In Preferences, go to General -> Content Types. Unfold Text, then go to PHP Content Type. Click Add and input *.ctp. Then apply your changes.

You may need to restart eclipse to take effect.

Upvotes: 28

Related Questions