2012-05-09 97 views
0

當我在vim中使用ctags時,遇到這個問題:vim ctags,跳轉到類方法的定義

InputDevice * device = mdev; device-> process(...);

當我想看類InputDevice的過程的定義時,ctags不能給出解決方案,並且它顯示了很多標籤。 在源代碼洞察中,它可以跳轉到正確的定義位置,因爲它發現標籤「device-> process」不僅標籤爲「process」。

我發現cscope無法做到這一點。

有沒有一種方法可以找到正確的標籤定義?

+1

「想」 跳?真? –

+0

ctags/cscope不可能。 Dup of http://stackoverflow.com/questions/6190955/how-to-find-struct-member-uses-with-cscope – jman

回答

1

雙向

  1. CTAGS

    您可以通過 「按Ctrl +]」

    ,但你應該使用跳 「 - -kinds」 與 「M」 創建標籤文件。有關「ctags --list-kinds」的更多信息。

  2. eclim

    在默認mapping,您可以按 「Enter」 鍵

+0

謝謝!我忘了這篇文章。 「--lang-kinds」與「m」是指「m類,結構和聯合成員」(由ctags --list-kinds產生)?我會嘗試你的方法,非常感謝。 –

相關問題