Fix WordPress Syntax Mode for Coda 2

NOTE: Apparently my version no longer works for Coda > 2.0.2. Try the newer versions made available by Matthew and deryckoe. Thanks guys!

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 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.

Screenshot of Coda 2