Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to improve the way I use Textmate for Ruby on Rails, HTML, CSS and Javascript?

I use the latest version of textmate for all my Rails development needs and I feel that I'm under-using the possibilities or this software. I only installed the Ruby on Rails bundle and use little to no snippets / shortcuts.

What do I absolutely HAVE to know / do in order to get the most out of my textmate in a web development environment?

I would prefer Ruby on Rails oriented answers, but any html/js/css answers would be helpful.

Edit: Added a bounty to get more inputs on this.

like image 415
marcgg Avatar asked Sep 04 '09 16:09

marcgg


4 Answers

I was on the same boat some time ago. My biggest advice would be to reserve some time to learning your tool. It will do wonders to your productivy.

I started installing the GetBundles bundle:

  cd ~/Library/Application\ Support/TextMate/Bundles
  svn co http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/

With it, you can check and find new bundles. Be sure to go through most of the options of each one you install.

Next, try learning some Textmate skills. I'd recommend the Peepcode screencast. It covers Rails related productivy tips and information, and will give you some new ways to develop.

Then, you try reading most Textmate tips you can find on the Internet. There are a few I read from time to time: Textmate Tips, Cool Textmate Tips, Textmate Tips from Macromates, Mactips, Textmate Productivity Tips.

There is a Textmate book, but haven't been able to get into it yet. Should be useful, though.

Lastly, the best way to improve your skills is to practice. I try to come up with small week-length projects to use new tips or to remember features I had forgotten.

Good luck :)

like image 145
Alessandra Pereyra Avatar answered Nov 11 '22 09:11

Alessandra Pereyra


Ctrl-Cmd-T allows you to search for commands, so every time I want to do something new (like a validation macro) I hit Ctrl-Cmd-T, type vpo and it finds the correct macro for validate_presence_of, and even tells me to just type v-p-TAB next time. It's quite the education.

Also, I managed to use text mate for a year without realising that Esc auto completed. Don't miss that one.

Ctrl+Opt+Cmd+V to see your clipboard history is also a life saver.

like image 42
cwninja Avatar answered Nov 11 '22 09:11

cwninja


I've been using TextMate for a while now, and one of the best things about the application is the ability to extend it using bundles. As Yaraher said, there are lots of resources out there, and you should go and take a look.

My only other piece of advice is this: when you find yourself doing something with TextMate over and over, and it is a pain, or you think that it could really do with this or that feature, think about how you could do that with your favourite scripting language. If you can write a script for your feature, you can add it as a command that TextMate can use - have a look at the bundle editor (Ctrl+Opt+Cmd+B) and the existing commands, it is pretty straightforward.

like image 2
accuser Avatar answered Nov 11 '22 08:11

accuser


Not Rails-related, but I can't say enough good things about the Zen Coding plugins for HTML & CSS coding. A huge bunch of keyboard shortcuts that will completely change the way you use Textmate (if you do a lot of XHTML/CSS like I do). Watch the Screencasts to see just how quickly you can do common tasks with them.

Another plugin that's been super awesome for me along the same lines is the jQuery Bundle that adds keyboard shortcuts for a bunch of jQuery methods.

Essentially, what I'm getting at here, is that with some diligent searching you can uncover a ton of community-built addons for Textmate that increase the functionality of this already awesome program.

Most of the coders in my office use some variant of Eclipse, but I say they can pry my copy of Textmate from my cold, dead hands. :D

like image 2
Scott Avatar answered Nov 11 '22 08:11

Scott