Opening .ctp file with Syntax Highlight in Eclipse

The view file in CakePHP is with .ctp extension. By default, Eclipse does not know which editor should be used to open this kind of file. If you associate it with PHP Editor in Preference -> General -> File Association, you will find there is no syntax highlight in the editor.

Here comes to the solution.

1. Go to Preference -> General -> Content Type

2. Select PHP Content Type under Text in the top right list

3. add *.ctp as follow

 

Done =)

Reference: Syntaxhighlighting for .ctp files in Eclipse

Advertisement

4 thoughts on “Opening .ctp file with Syntax Highlight in Eclipse”

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.