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
Reference: Syntaxhighlighting for .ctp files in Eclipse
4 thoughts on “Opening .ctp file with Syntax Highlight in Eclipse”
it doesn’t work
Are u using the Eclipse for PHP?
I use Codelobster for it: http://www.codelobster.com
haha~~ thx for your comment.