2

I've just moved onto a new machine. On my old work horse, I had Silverstripe template (.ss) files following HTML syntax highlighting in Coda. I can't for the life of me remember how I turned this on (I remember it was something I did myself though). Google has turned up no results.

Any suggestions?

Kev
  • 118,037
  • 53
  • 300
  • 385
Fraser
  • 14,036
  • 22
  • 73
  • 118
  • If you go to the bottom left hand corner of the editor, you can change the syntax highlighting mode for a particular file to anything you please. – Ethan Reesor Jun 19 '12 at 21:53

1 Answers1

5

UPDATE: The real way

In Coda, open Preferences, go to Editor, at the bottom, add a Custom Syntax Mode.


As per this guide:

  1. Right click on Coda.app in /Applications and select Show Package Contents
  2. Navigate to Contents/Resources/Modes/HTML.mode/Contents/Resources
  3. Open ModeSettings.xml
  4. Add <extension>ss</extension> to the list of extensions.

Or, make your mode (eg, SilverStripe.mode) and put it in ~/Library/Application Support/Coda/Modes

Or, copy HTML.mode to ~/Library/Application Support/Coda/Modes and then modify it, to preserve the original.

(For system-wide changes without modifying the application bundle, create the directory /Library/Application Support/Coda/Modes and put .mode directories there.)

Ethan Reesor
  • 2,090
  • 1
  • 23
  • 40
  • 1
    @Fraser I played around some more on my machine. If you have .mode in the application bundle and in `~/Library/Application Support/Coda/`, the latter takes precedence. One advantage to that last solution (that I added after your comment) is that it should avoid the problem of updates to Coda clobbering your setup. I think constructing your own mode would be the best, but that could be quite the challenge. – Ethan Reesor Jun 19 '12 at 22:15
  • 1
    @Fraser I just figured out how you're really supposed to do this. Please check my update. – Ethan Reesor Jun 20 '12 at 05:39