Espresso is a great new editor from the guys that made CSSEdit. Here, I’ll show you how to get php syntax highlighting in CakePHP’s “.ctp” view files.
- Open Finder and navigate to “/Applications”.
- Right click on Espresso and select “Show Package Contents”
- In this new Finder window, navigate to “Contents/SharedSupport/Sugars”
- Right click on PHP.sugar and select “Show Package Contents”.
- Another Finder window will pop up and you should see a file called Languages.xml. Open this file in your favorite text editor and navigate to the following lines of code around line 64:
Languages.xml before edit
And add the following lines of code
Languages.xml after edit
- Save the file and close your text editor.
- Now find PHP.sugar again and double click on the package. This will install the sugar for Espresso.
And you’re done! Now when you create a new .ctp file in your CakePHP views you should automatically get php syntax highlightning.