Reputation: 3659
When I have classes ModuleA::Class1
with method test_method
and ModuleB::Class2
with test_method
as well, and somewhere in code I have ModuleB::Class2.test_method
and click Ctrl-]
on test_method
it jumps to wrong test_method
definition from ModuleA::Class1
.
Is there any way to make ctags work with Ruby namespaces?
Upvotes: 1
Views: 192
Reputation: 3439
Maybe you could give ripper-tags a try, but I don't have any experience with it.
What I do usually is, if Ctrl+] doesn't open the correct tag, I just repeat :tnext
until I reach the correct one.
In case you find that tiring, you could use vim-unimpaired to have the convenient [t
and ]t
or manually map
nnoremap ]t :tnext<cr>
nnoremap [t :tprevious<cr>
Upvotes: 2