How do I setup/use ruby on rails snippets and autocomplete in sublime text 2?

LondonGuy picture LondonGuy · Feb 24, 2012 · Viewed 25.7k times · Source

I would appreciate if someone could direct me to a website that shows how to do this.. Can't seem to find anything decent enough via google.

This will be the first time I'm doing this kind of thing with a text editor.. It has got to the stage where typing out things like <%= %> is getting old and slow.

I've got a rails snippet package and also ryan-on-rails package installed. Just confused with how to start using them.

I'm on max osx - snow leopard

Kind regards

Update

This helped me out. http://webtempest.com/sublime-text-2-how-to-create-snippets/ but I still need a little practice.

  1. I have a package "rails" can't remember where I got it but the triggering of snippets is working. I'd just like to find a nice list of the commands rather than have to go to each snippet and look for myself. I can find the by clicking on snippets but isn't there a way I can create a shortcut for that?

  2. Also would like some auto indentation.. and also complete.

Answer

rda3000 picture rda3000 · Apr 1, 2012

I'm puzzled that this isn't part of the default Rails package, but I found this to be just what I was looking for:

https://github.com/eddorre/SublimeERB