Politics, Programming and Possibilities
18 Feb
After introducing the controller-to-view textmate shortcut yesterday, my coworker (Pete Lasko) and I got excited about the possibility of expanding this idea. So from some of our ideas I built the “syncPeople on Rails” bundle for TextMate, in honour of the company we both work for.
The Open Controller / View feature is the same as yesterday’s feature. It is superceded by the Intelligent Go To File command, however, and may soon be deprecated.
The Create Partial from Selection feature lets you select a section of text in your view, hit option-command-p and then name your new partial. In place of the selection you’ll get a “render :partial => [partial name]” and a new partial file to match.
The Intelligent Go To File feature is perhaps the coolest feature of the set. Hit the keypad ‘enter’ key and you’ll be taken to whatever makes the most sense. For example, if you’re on a line that reads “render :action => ‘list’” and you hit ‘enter’, you’ll be taken to that list action in the controller. If you’re inside a view file but not on any particular “render” line, you’ll be taken to the controller. It tries to use a best-match scenario, and for the most part, I think it does well enough. It still has some significant limitations, however, that I will be eliminating as I develop Rails apps with it.
Download the syncPeople on Rails Bundle and untar/unzip it in to the following folder:
~/Library/Application Support/TextMate/Bundles
Done!
8 Responses for "The "syncPeople on Rails" Bundle for TextMate"
[...] See the syncPeople on Rails Bundle for even more features and a much simpler installation. [...]
Nice! I’m going to have to look into how you did this so I can create my own. Look forward to more from you to.
Dude. This is amazing. Textmate rocked already, but this… I love being able to jump right to the view from the controller, and vice-versa. And the create partial thing is cool too. Thanks!
You have to be kind of careful with the create partial feature. Before I figured out what it did I had overwritten one of my partials with a blank file. Thank goodness for Subversion.
[...] The original announcement of version 0.5 can be found here. [...]
[...] Following the 0.5 release and the 0.6 release, the “syncPeople on Rails” TextMate bundle has reached version 0.7. Here are the feature updates: [...]
[...] It started out last weekend with a couple of features and now the syncPEOPLE on Rails bundle has really become a must have for Textmate if you do any programming in Rails. [...]
[...] Going Up » The “syncPeople on Rails” Bundle for TextMate (tags: textmate rubyonrails ruby rails bundles) [...]
Leave a reply