开发者

Autocomplete with Vim and Rails Datamapper

开发者 https://www.devze.com 2022-12-14 09:37 出处:网络
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 followin开发者

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 followin开发者_开发问答g

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号