Topic: Question about textmate

I see on screencasts how they have this auto complete where it finishes def areas and common items.  How do you get Textmate to do that?

Re: Question about textmate

I think it's typing the keys and then pressing tab. For example in a model type hm and then tab to get has_many :objects

Re: Question about textmate

Hmm, I tried that but it just tabbed like normal.  Is there something I need to do to turn it on?

Re: Question about textmate

First, make sure you're in the correct syntax-highlighting mode (at the bottom, it might say Plain, Ruby on Rails, etc. Pick the correct one.). Then, you have to use the correct "trigger phrase". For instance, typing "def" and then hitting tab will complete that "snippet". There are a myriad of others. Rather than listing them for you here, check the bundle menu.

Re: Question about textmate

You can also use ESC to auto complete words from your current file.

So if you have:

def my_cool_function
  # do something
end

Typing 'my_' and pressing ESC will auto complete 'my_cool_function' for you.

Re: Question about textmate

manitoba98 wrote:

First, make sure you're in the correct syntax-highlighting mode (at the bottom, it might say Plain, Ruby on Rails, etc. Pick the correct one.). Then, you have to use the correct "trigger phrase". For instance, typing "def" and then hitting tab will complete that "snippet". There are a myriad of others. Rather than listing them for you here, check the bundle menu.

That's what it was, I didn't have the right syntax selected.  It was on Ruby.  As soon as I switched it, the bundle started working.

Thanks

Last edited by Jhorra (2007-12-10 11:25:14)

Re: Question about textmate

Thanks for the tip, Adam.

Re: Question about textmate

I don't mean to sound like an advert, but the peepcode screencast for textmate really helped me out.

Re: Question about textmate

I've been thinking about checking out a few of those peepcode screencasts.  They seem like they could be helpful.  Right now I'm just kind of waiting for them to update them for Rails 2.0.

Last edited by Jhorra (2007-12-13 18:53:15)