2017-06-06 55 views
0

當我有方法test_methodModuleB::Class2test_methodModuleA::Class1的歡迎,並在某處的代碼,我ModuleB::Class2.test_method並單擊Ctrl-]test_method它跳到從ModuleA::Class1錯誤test_method定義。有沒有辦法使用紅寶石命名空間的ctags?

有什麼辦法可以使ctags與Ruby命名空間一起工作嗎?

回答

0

也許你可以給ripper-tags一個嘗試,但我沒有任何經驗。

我通常做的是,如果按Ctrl +]不打開正確的標籤,我只是重複:tnext,直到我到達正確的。

如果你發現很累,你可以使用vim-unimpaired有方便[t]t或手動映射

nnoremap ]t :tnext<cr> 
nnoremap [t :tprevious<cr> 
相關問題