[TxMt] Ruby Auto Complete Not working?

James Edward Gray II james at grayproductions.net
Wed Feb 14 14:32:21 UTC 2007


On Feb 14, 2007, at 8:15 AM, John Tsombakos wrote:

>
>
> On 2/14/07, James Edward Gray II <james at grayproductions.net> wrote:  
> On Feb 14, 2007, at 7:09 AM, John Tsombakos wrote:
>
>
> ...
>
>
> Ah, that just gave me an idea...
>
> Do you have Rails in the vendor directory of your project?  I always
> do and would not be at all surprised if that is required to make the
> command pick up on the methods.  If you don't, try vendering Rails
> and see if that helps.
>
> James Edward Gray II
>
>
> The two  system I tried on did not have Rails in the vendor directory.

I really bet that is it.  Try vendering Rails and see if that makes a  
difference.

> Should this also auto-complete non-Rails Ruby items too? Because I  
> couldn't get anything there either (started to type the name of one  
> of the methods in the file I had open, hit Opt-Esc, and got "No  
> matches were found"

Again it "should."

As a simple test, try this:

1.  Create a new document
2.  Change the document language to Ruby
3.  Type Array.new.rev
4.  Invoke the auto complete

Does that much work?

If so, you're probably just trying something rcodetools doesn't  
support.  The main thing I've noticed is that I cannot autocomplete  
implicit receiver instance method calls with it.  For example:

class Test
   def abc
     "abc"
   end

   def xyz
     ab  # <= this will not autocomplete
   end
end

t = Test.new
t.ab  # <= this will

__END__

This is just the way rcodetools completion works and if you want to  
know more about that, you will need to take it up with the author.

James Edward Gray II




More information about the textmate mailing list