This replaces the default Rails snippets from Sublime Text 2. All the features can be found in this cheatsheet generated by Snipcheat.
** This package replaces the default Sublime Rails snippets.**
If you installed it via Package control, you will need to do some housekeeping, see troubleshooting.
Regardless of which way of installation you choose, please backup the old Rails snippets installation. You don't want to have both this and the original installed.
➜ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
➜ mv Rails ~/.RailsSublimeBackup
➜ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
➜ git clone https://github.com/tadast/sublime-rails-snippets.git Rails
- Go to the downloads section
- Download the preferred type of archive.
- Extract it to your
Packages/Rails
Look for "Ruby on Rails snippets". Here's how to install packages
If Sublime complains it can't find Ruby on Rails.tmLanguage
, chances are you are using this hack.
You'll need to change the path where it looks for that file. Here's the forked version which works with this plugin.
You may also need to change Packages/(DetectSyntax|User)/DetectSyntax.sublime-settings
to replace/include this rule
{
"name": "Ruby on Rails snippets/Ruby Haml",
"rules": [
{"file_name": ".*\\.haml$"}
]
},
{
"name": "Ruby on Rails snippets/Ruby on Rails",
"rules": [
{"function": {"name": "is_rails_file"}}
]
}