RadRails textmate templates

I have been inspired by earlier templates for RadRails and by the templates for JEdit, I have created another set of templates. These ones use the same commands as TextMate, and can use the same reference as the ones for JEdit (although I will try to post another reference soon).

To install:

  1. Unzip this file
  2. Open RadRails
  3. Goto Window>Preferences…
  4. Goto the Rails>Editors>RHTML Editor>RHTML Templates section
  5. Import the RHTML file.
  6. Goto the Ruby>Editor>Templates section
  7. Import the Ruby file
  8. Test it
  1. Open a ruby file
  2. Type ‘bt’ followed by Ctl+Space
  3. Choose one of the belongs_to options
  4. Tab between sections to fill in the parameters
  5. Start typing on the next line, cause you’re done!

Hope you all enjoy, this includes both the regular Textmate Templates, plus some that I find useful (like pp which expands to +=, pure laziness, but nice for someone coming from Java/C#/C++ background).

JD

EDIT: So, for the life of me, I realized that I didn’t include habtm in the templates. Why, I don’t know, its not like I enjoy typing that beast, anyways, here is a new zip that includes the new template. If you want just the single template for habtm, let me know and I can post it as well. JD