tpope / vim-bundler

bundler.vim: Lightweight support for Ruby's Bundler
https://www.vim.org/scripts/script.php?script_id=4280
404 stars 29 forks source link

Jump to tag not work in gems #51

Open griffinqiu opened 6 years ago

griffinqiu commented 6 years ago

It work when jumping the Gem method in Rails project. However, it does not worker when I try to jump the other Gem method by tag in Gem files.

griffinqiu commented 6 years ago

It look like the ../path did not been support in any Gems

tpope commented 6 years ago

I'm not sure what you're referring to with ../path.

griffinqiu commented 6 years ago

Actually, the problem is:

  1. I opened the app/application_controller.rb in my Rails project. It be able to jump to a Gem's mehtod or any mehtods which defined in my project. The current vim tags is:
tags=~/github/my_project/tags,~/github/my_project/tmp/tags,./tags,tags,gems.tags,/usr/local/Cellar/rbenv/1.1.1/rbenv.d/exec/gem-rehash/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-dar
win17/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17/tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/tags,~/.rbenv/versions/
2.3.7/lib/ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/ruby/2.3.0/x86_64-darwin17/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/bundler/gems/dalli-delete-matched-68de4346d7ca/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/bundler/gems/http_accept_lang
uage-d134215fa3f5/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/bundler/gems/mongoid_token-4758685d7359/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/bundler/gems/qunit-rails-96183abdf607/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/bundler/gems
/sendcloud
  1. When I jump protect_from_forgery with ctags. The current opened file is ~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/actionpack-5.1.6/lib/action_controller/metal/request_forgery_protection.rb. And then the ctags not work in the Gem file. It display 'E426: tag not found: protect_from_forgery' when I want to jump to protect_from_forgery again in request_forgery_protection.rb. The current vim tags is:
tags=./tags,tags,gems.tags,/usr/local/Cellar/rbenv/1.1.1/rbenv.d/exec/gem-rehash/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-darwin17/tags,~/.rbenv/versions/2.3.7/lib/ruby/site_ruby/
tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin17/tags,~/.rbenv/versions/2.3.7/lib/ruby/vendor_ruby/tags,~/.rbenv/versions/2.3.7/lib/ruby/2.3.0/tags,~/.rbenv/versions/2.3.7/lib/
ruby/2.3.0/x86_64-darwin17/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/actionview-5.1.6/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/activesupport-5.1.6/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/builder-3.2.3/tags,~/.rbenv/v
ersions/2.3.7/lib/ruby/gems/2.3.0/gems/concurrent-ruby-1.0.5/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/crass-1.0.4/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/erubi-1.7.1/tags,~/.rbenv/versions/2.3.7/lib/ruby/gems/2.3.0/gems/i18n-0.9
.5/tags,~/