ruby-on-railssyntax-highlightingcoda

RoR syntax highlighting for Coda 2


I am curious how to get highlighting for RoR syntax. For instance the Gemfile is all one color and difficult to read.

Of the themes I did download I modified the .sss files to add syntax highlighting specifically for the Gemfile

string {
  color:#3adfb1;
}

string.gemfile {
  color:#fdc53d;
}

string.regex {
  color:#fdc53d;

saved, imported into Coda, but got nothing. Any help here would be appreciated.


Solution

  • You can set the syntax on a per-file basis by using the gear icon at the bottom of the editor window to select a Syntax Mode. That's great for new files that aren't saved yet or files with weird one-off extensions.

    For something more permanent, you can specify a file extension to go with a syntax mode. This is under PreferencesEditorCustom Syntax Modes (at the bottom). Set the extension of the file, without the period (for example gem for ruby gem files) and the syntax mode you want to use for that file type (for example Ruby).