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:
- Unzip this file
- Open RadRails
- Goto Window>Preferences…
- Goto the Rails>Editors>RHTML Editor>RHTML Templates section
- Import the RHTML file.
- Goto the Ruby>Editor>Templates section
- Import the Ruby file
- Test it
- Open a ruby file
- Type ‘bt’ followed by Ctl+Space
- Choose one of the belongs_to options
- Tab between sections to fill in the parameters
- 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
Post a Comment