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 responses to “Fix WordPress Syntax Mode for Coda 2”

  1. Awesome, thanks for this. I’m working on a fix now 🙂

    Like

  2. Glad to be of assistance!

    Like

  3. Thanks You so much !!!!

    Like

  4. You’re awesome. thks !

    Like

  5. Legendary! Saved me the trouble, ta

    Like

  6. Thanks! Just was reading an article about the plugin being broken on Amber Weinberg’s site.

    Like

  7. Grrreat. Thank you.

    Like

  8. […] 2対応のWordPress Syntax Modeが配布されていると教えて頂きました。 Fix WordPress Syntax Mode for Coda 2 試してみたらばっちり動いたのでお急ぎの方はお試しください。 (Nao […]

    Like

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

    Like

  10. Nevermind … Files were hidden – and not so anymore, thank you 🙂

    Like

  11. […] 「~/Library/Application Support/Coda/Modes/」配下に解凍した「PHP-HTML-WP.mode」フォルダを置いて下さい。 Coda2の場合は「~/Library/Application Support/Coda 2/Modes/」になりますのでご注意下さい。 ただし、まだ正式にCoda 2には対応してないようです(2012年6月7日)。 Coda 2で試してみたい方は以下のサイトよりダウンロードしてみて下さい。 Fix WordPress Syntax Mode for Coda 2 […]

    Like

  12. […] Coda 2, it kinda breaks it. Fortunately the developer is already working on a fix and you can get a short time fix from this lovely chap! […]

    Like

  13. Thanks for this a nice little short term fix!

    Like

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

      Like

  14. […] 早速、Zen-CodingとWordPress Syntax modeをインストール。 […]

    Like

  15. This seems to have broken with with 2.0.2… Had to revert back to PHP-HTML

    Like

  16. New version 2.0.2 as broke syntax mode… grr

    Like

    1. Oh shh.. I’m still on 2.0.1 (MAS version). Has anyone else the same issue ? I won’t upgrade if so..

      Like

      1. Yes, I can confirm syntax mode broke with 2.0.2

        Like

      2. Yes, with Coda 2.0.2 PHP-HTML-WP does not work fine. Any solution?

        Like

  17. Yes, 2.0.2 broke the syntax mode 😦
    But thanks for the previous fix, Daniel 🙂

    Like

  18. OK, I made a quick fix for Coda 2.0.2, the same way you used for 2.0, Daniel. http://scri.in/coda202wpsm

    Like

  19. Does anyone know if this would work with Coda 2.0.7?

    Like

    1. It’s working fine for me with Coda 2.0.7

      Like

  20. Thank you. Excuse my beginner’s ignorance, but what is the difference between this file and this one: http://matthewwoodard.com/blog/wordpress-mode-for-coda-2

    Like

  21. Nevermind. This is an earlier version of the same thing, its seems. sorry.

    Like

  22. Daniel Koskinen Avatar
    Daniel Koskinen

    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.

    Like

    1. Curious to hear what you use instead of Coda, and maybe why?

      Like

      1. Deryck Oñate Espinel (DeryckOE) Avatar
        Deryck Oñate Espinel (DeryckOE)

        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.

        Like

      2. Daniel Koskinen Avatar
        Daniel Koskinen

        Sublime Text 2

        Like

  23. I just released a WordPress syntax mode for Coda 2 that includes all WordPress 3.6 functions: https://github.com/tillkruess/Coda-WordPress-Mode

    Like

Leave a comment