If you’ve updated to Coda 2 and have been using the excellent WordPress Syntax Mode by Thorsten, you need to copy it (and any other modes you’ve been using) over to ~/Library/Application Support/Coda 2/Modes/
. It works just fine, but syntax highlighting is broken. To fix this (and avoid wading through too much code), I simply made a copy of the SyntaxDefinition.xml
file in /Applications/Coda 2.app/Contents/Resources/PHP-HTML.mode/Contents/Resources/
and copied over the contents of the <keywords id="PHP4 Functions"> ... </keywords>
node from Thorsten’s version.
Finally replace all instances of PHP-HTML
in the file with PHP-HTML-WP
, save the file as SyntaxDefinition.xml in ~/Library/Application Support/Coda 2/Modes/PHP-HTML-WP.mode/Contents/Resources
(replacing the old one) and restart Coda 2.
For convenience, here’s the whole updated mode package: PHP-HTML-WP.mode. Unzip and drop into ~/Library/Application Support/Coda 2/Modes/
.
NB: This is just a quick hack until Thorsten updates the original. I cannot guarantee this will work perfectly for everyone.
Leave a Reply