views:

286

answers:

1

Is there a way that I can have auto completion in Vim after I load a model from the database? So for example if I have a model of type Foo with an instance method of type bar and do the following

foo = Foo.first(:param=>'x')
foo.b

should show me bar as a possible auto complete value. I think that this is somewhat hard to accomplish with dynamic languages and you would probably have to be aware of the datamapper conventions.

Maybe I'm taking the wrong approach and should not be thinking using auto complete because there is an easier way to code?

A: 

I don't think it's possible to do semantic completion in VIM. However if you have written the instance name once, you could use the simple auto completion in VIM to avoid typing long names again.

broom9