Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Installation instructions

  • Loading branch information...
commit 293f1d8ebbf1d1a39e4490eb99ce82d09c3317bd 1 parent c98af91
@tadast authored
Showing with 43 additions and 1 deletion.
  1. +39 −1 README.md
  2. +3 −0  messages.json
  3. +1 −0  messages/install.txt
View
40 README.md
@@ -2,6 +2,44 @@
I don't know who the original author is, but this repo is an improved version of https://github.com/bradrobertson/sublime-packages/tree/master/Rails
+# Installation
+
+Backup the old Rails snippets before instalation
+
+ $ cd /Library/Application Support/Sublime Text 2/Packages
+ $ mv Rails ~/SublimeRailsBackup
+
+## From Git
+
+ $ cd /Library/Application Support/Sublime Text 2/Packages
+ $ git clone https://github.com/tadast/sublime-rails-snippets.git Rails
+
+## From Package control
+
+Look for "Ruby on Rails snippets". [Here's how to install packages](http://wbond.net/sublime_packages/package_control/usage)
+
+### Troubleshooting
+
+If Sublime complains it can't `find Ruby on Rails.tmLanguage`, chances are you are using [this hack](https://gist.github.com/925008).
+You'll need to change the path where it looks for that file. Here's the [forked version which works with this plugin](https://gist.github.com/4161901).
+
+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"}}
+ ]
+ }
+
+
+
# Changes in this "fork"
* Use ruby 1.9 hash syntax (`foo: :bar`, not ` :foo => :bar`)
@@ -11,4 +49,4 @@ I don't know who the original author is, but this repo is an improved version of
* `class<tab>` autocompletes a ruby class
* `arc<tab>` autocompletes an ActiveRecord model class
* `con<tab>` autocompletes a controller class
-* `crud<tab>` autocompleted controller actions
+* `crud<tab>` autocompleted controller actions
View
3  messages.json
@@ -0,0 +1,3 @@
+{
+ "install": "messages/install.txt"
+}
View
1  messages/install.txt
@@ -0,0 +1 @@
+This package replaces the default Sublime Rails snippets. Additional setup steps are required. Visit https://github.com/tadast/sublime-rails-snippets#sublime-text-2-rails-snippets for instructions
Please sign in to comment.
Something went wrong with that request. Please try again.