Viewing CakePHP’s .ctp files in Aptana Studio has been quite annoying due to the lack of syntax highlighting. I have grown use to it until earlier today when I was converting a .php file into a .ctp. I knew there had to be a way to associate .ctp files with .php files in Aptana/Eclipse. I did a bit of searching and found the solution.
- Go to Window/Preferences/General
- Select Content Types
- In the right pane, select the Text Navigation tree
- Select PHP Content Type
- Click the Add button
- Enter *.ctp and click Ok
If you have a .ctp file open, you will have to close and re-open it to view the changes. Much better.