Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Syntax highlighting for Eco (Embedded CoffeeScript) Templates in Sublime Text 2
branch: master

Merge pull request #1 from brianewing/coffee-highlighting

Highlight non-HTML source code as CoffeeScript
latest commit d8d81caea8
David Rice authored
Failed to load latest commit information.
Syntaxes add a definition for the eco control keyword 'end' (and 'else:') Further clarifications

Syntax highlighting for Eco Embedded CoffeeScript Templates in Sublime Text 2

It is based on an edited version the HTML (RAILS) Syntax from the rails textmate bundle.


  • First, install Package Control.

    The following instructions are temporary until sublime-eco is added to the package control source repository.

  • Hit command+shift+p and type "Package Control: Add Repository" and hit return

  • Enter in the sublime console that appears and hit return.
  • Now the repository is available, follow the rest of the instructions below to install the package.

    The following instructions will be all that's necessary after sublime-eco is available through package control directly.

  • Hit command+shift+p and type "Package Control: Install Package" and hit return

  • Type "eco", this package should appear in the dropdown, select it from the list and hit return


To get "Textmate ERB Style" opening and closing of ECO blocks. You will also want to;

You should then open your Preferences -> Keybindings - User and add the key binding for the ERB command.

The simple option is to allow this command in any file.

  { "keys": ["ctrl+shift+."], "command": "erb" }

However if you're like me you may want to restrict the key binding to those files where it makes sense to have that command. (Note the added at the end of the string)

  { "keys": ["ctrl+shift+."], "command": "erb", "context":
      { "key": "selector",
        "operator": "equal",
        "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js,," }
Something went wrong with that request. Please try again.