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

Screenshot of Coda 2

38 thoughts on “Fix WordPress Syntax Mode for Coda 2

  1. Pingback: Coda 2を買ったのでZen-CodingとWordPress Syntax modeを入れてみた | sacnoha

  2. Hi guys,
    I just switched to Coda v2 (from DW) yesterday – and I would so love to get the WP syntax into coda BUT … There is no folder under my application support called Coda – and naturally adding it, does not hep.
    Could anyone be so kind to tell me how I do this?

  3. Pingback: WordPressのコード補完を行ってくれるCodaのプラグイン「WordPress Syntax Mode」 – WebCake

  4. Pingback: Coda2に、WordPressのコード補完とZenCodingを入れる。 - Shinichi Nishikawa's blog

  5. Pingback: Coda 2 is finally here! | MojoWill

    • Just a follow up there does seem to be a performance hit when using this. I get a fair bit of lack when typing using this syntax mode compared to the standard PHP-HTML

  6. Pingback: Coda 2をインストールしてみました | こずらんど

  7. Pingback: Coda2 でWordPress Syntax Modeを使う方法 | 愛知県名古屋市のホームページ制作ならSPOT(スポット)

  8. Pingback: [Coda2]バージョン2.02対応のWordPress Syntax Mode for Coda 2を作ってみました。 - prag -pranktone life archives-

  9. Pingback: Coda2でWordPressのコード補足『WordPress Syntax Mode』とコードカラーリングを対応させる方法 | オウガログ

  10. Thanks for the comments guys! Since I haven’t been actively using Coda 2 for a while, I’ve updated the post to point to the new versions by Matthew and Deryck.

    • A lot of developers are using Sublime Text 2 and it’s a good one but I don’t like the look and feel of the App. That’s the truth, at least for me. I feel very “unfinished” in this aspect. Panic Coda 2 have some performance issues but I think it’s one of the best right now.

  11. Pingback: Web制作環境のセットアップ:Coda2(プラグイン)編 - ヒビヅレ - 4410の日々を徒然と

Leave a Reply