Skip to content

kanekv/sublime-rails-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sublime Text 2 Rails snippets

This replaces the default Rails snippets from Sublime Text 2. All the features can be found in this cheatsheet generated by Snipcheat.

Installation

** 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

From Git

➜ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
➜ git clone https://github.com/tadast/sublime-rails-snippets.git Rails

From an archive

  • Go to the downloads section
  • Download the preferred type of archive.
  • Extract it to your Packages/Rails

From Package control

Look for "Ruby on Rails snippets". Here's how to install packages

Troubleshooting

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"}}
  ]
}

About

Rails 3, Ruby 1.9 oriented snippets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published