问题
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?
回答1:
UPDATE: The real way
In Coda, open Preferences, go to Editor, at the bottom, add a Custom Syntax Mode.
As per this guide:
- Right click on
Coda.app
in/Applications
and selectShow Package Contents
- Navigate to
Contents/Resources/Modes/HTML.mode/Contents/Resources
- Open ModeSettings.xml
- 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.)
来源:https://stackoverflow.com/questions/11110014/coda-syntax-highlighting-for-silverstripe