vim + ctags
works well for C projects, since C does not allow function overloading and, in general encourages manual prefixing of symbols due to rudimentary scoping facilities.
In C++, functions are frequently overloaded, and overridden in subclasses. This makes vim always jump to the tag in the wrong class on "Ctrl + ]"
. Is there a way to make it behave a little more intelligently? I know I can bring a list with tag alternatives, but that's insanely annoying to always have to bring up this list, and find a needed tag by number whenever I want to jump to definition.
There is also "tagNext" to move to the next tag (or :tn<enter>)
I use tjump a lot. It supports tab completion which is helpful. If multiple tags are found, it will give a list for you to select from, if only one is found, it will jump right to the tag (unlike tselect).
Usage:
:tj foo
I know two workarounds for your porblem ( it seems you knew it too ):
You can use my script which will help you to select tag you need by typing some letters of the class name or special tags like 'field', 'function', 'constructor', etc.
http://www.vim.org/scripts/script.php?script_id=2507
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With