-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go to definition of function within current class #1960
Comments
ctags provides hints to implement such feature in a client tool like vim.
Consider you press "JUMP" key at
From the found line, the client tool knows
The client tool knows the kind of Now the client tool searchs
From the field What you have to do is find a plug-in implementing above algorithm or write your own one.
This is the most difficult step in the algorithm. How to do is is not so obvious. |
This was exactly my goal when writing the C++ parser: add intelligent symbol lookups and smart completion. With the current state of ctags this can be done in 95% of the cases but it requires a fair amount of additional external code. The process is roughly the following:
When the user wants to jump to a symbol (say CTRL+Clicks on a text line):
The details are quite complicated because
Additionally one usually wants the symbol maps to be updated on-the-fly as files are being edited. Making this non invasive (non blocking) is an interesting challenge. I have a (scary) implementation of all this in my editor. So yes, it can be done... but it requires quite some code. Maybe one day I'll find time to publish it. |
Hi. I have a C++ member function
foo
in class A,void A::foo();
. And I call it in a functionbar
.When I put cursor under
foo
and pressg + ]
, I expect to jump exactly to thefoo
definition of class A, not the function of same name in other classes. This will greatly reduce the number of entries in the selection list when there're many same function name across the project classes. Would ctags be able to do that ? Or I may need to find other plugin for vim to do that ?(
Thank you for contacting us.
If you are reporting an issue with the parsing output, please fill
the following template. As your custom CTags configuration can
affect results, please always use
--options=NONE
as the firstoption when running
ctags
.Otherwise, delete the template and write your issue from scratch.
Examples may help developers understanding your issue better.
Use GitHub web interface and markdown notation.
Using mail results broken text rendering that makes
the developers go crazy.
)
The name of the parser:
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with:
The tags output you expect:
The version of ctags:
How do you get ctags binary:
(
Building it locally, via GNU/Linux distribution, as BSD's package,
win32 binary taken from Universal-ctags/ctags-win32 project, macosx
binary taken from Universal-ctags/homebrew-universal-ctags project,
etc.
)
The text was updated successfully, but these errors were encountered: