TextMate Style ERB Block for Sublime Text
Python
Switch branches/tags
Nothing to show
Pull request Compare This branch is 25 commits behind eddorre:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
erb.gif
erb_block.py
erb_block.pyc

README.markdown

A Port of TextMate's ERB support for Sublime Text 2 (still in progress - see Coming Soon section)

Usage

Installation

Suggest Installing Sublime Package Control

Then you can install "ERB Insert and Toggle Commands"

Manual Installation

Clone the repository and symlink file to Sublime's User Directory

OS X Example

  git clone git@github.com:eddorre/SublimeERB.git ~/.sublime_erb

  ln -fs ~/.sublime_erb/erb_block.py ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User

Open your User Keybinding File and add the following keybinding to activate the toggle command in all file types

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

or only in the most common ERB contexts

  { "keys": ["ctrl+shift+."], "command": "erb", "context":
    [
      { "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" }
    ]
  }

Update To Latest Version

  cd ~/.sublime_erb
  git pull

Sample

Coming Soon

Adding Support for Toggling ERB styles <%= %>, <%# %>, <%= -%>, <% %>, <% -%> when there is a selection.

Copyright

SublimeERB is Copyright (c) 2011 Carlos Rodriguez, released under the MIT License.