Вопрос

There are execute static methods in every class file in java.

When I do Ctrl+], it goes to current class method. To go to another class execute method, I have to do :ts and navigate there.

How can I automatically go to the other class's static execute method using ctags in vim?

The only thing I have done while building ctags is the following: ctags --language-force=java -R *

Это было полезно?

Решение

You can't. <C-]> jumps you to the first occurrence of the word under the cursor in your tags file.

Vim itself has no mechanism to guess what method you want to jump to or infer scope from context and not much information can be gleaned from your tags file to make that feature smarter anyway.

You can use g<C-]> (same behavior as :ts) or g] (same behavior as :tj) as alternatives to <C-]>.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top