views:

541

answers:

1

I've been using vi/vim since '97 for various quick edits and administration tasks, but have only recently considered using it to replace Netbeans as my ruby editor of choice. One thing I find extremely useful in both Netbeans and Eclipse is the Ctrl+Click "Go to definition" feature, where you can ctrl+click on a class or method and it will take you to the definition.

Now, I've played with exuberant ctags and rails.vim, and it's close, but no cigar. Here's what I want: by default in Netbeans and Eclipse, you can ctrl+click a local method or class in your local rails project, but you can also ctrl+click on things defined in gems or in the system libraries that are coded in Ruby. Netbeans for example parses all ruby files in the default system paths and makes them navigable for you. If there are multiple files that define a method, it will present you with a list and allow you to choose between them.

How can one accomplish this within vim? If it can be done, I may be able to make the jump full time.

+1  A: 

You can use multiple tag files in Vim as follows:

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

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