Global "Go to Definition" in vim for Ruby?

I use vi / vim with '97 for various quick changes and administrative tasks, but have recently considered using replace Netbeans as my ruby ​​editor. One thing that I find extremely useful for both Netbeans and Eclipse is Ctrl + Click "Go to Definition", where you can ctrl + click on a class or method and this will lead you to the definition.

Now I was playing with exuberant ctags and rails.vim, and it is close, but there is no cigar. Here's what I want: by default in Netbeans and Eclipse, you can ctrl + click on a local method or class on your local rails , but you can also ctrl + click on things defined in gems or in system libraries encoded in Ruby . For example, Netbeans analyzes all ruby ​​files by default system paths and makes them navigable for you. If there are several files that define a method, it will present you with a list and let you choose between them.

How can this be done in vim? If this can be done, I may be able to make the leap full time.

+6
ruby vim ruby-on-rails
source share
1 answer

You can use multiple tag files in Vim as follows:

:set tags=./tags,c:/ruby/lib/tags 

Using g] will give you options for several entries found.

+4
source share

All Articles