Are you sure you called ctags with the right options? For C++, I use:
ctags --c++-kinds=+p --fields=+iaS --extras=+q --language-force=C++
This is what the documentation has to say about the --c++-kinds=+p
option:
When parsing a C++ member function definition (e.g.
"className::function"), ctags cannot determine whether the scope specifier
is a class name or a namespace specifier and always lists it as a class name
in the scope portion of the extension fields. Also, if a C++
function is defined outside of the class declaration (the usual case), the
access specification (i.e. public, protected, or private) and
implementation information (e.g. virtual, pure virtual) contained in the function
declaration are not known when the tag is generated for the function
definition. It will, however be available for prototypes
(e.g --c++-kinds=+p).
The --fields=+iaS
option:
a Access (or export) of class members
i Inheritance information
S Signature of routine (e.g. prototype or parameter list)
The --extras=+q
option:
Because, by default, ctags only generates tags for the separate identifiers found in the source files. If you specify the --extra=+q option, then ctags will also generate a
second, class-qualified tag for each class member (data and function/method) in the form class::member for C++, and in the form class.method for Eiffel and Java.
The --language-force=C++
option:
By default, ctags automatically selects the language of a source file, ignoring those files whose language cannot be determined (see SOURCE FILES, above). This option forces the specified language (case-insensitive; either built-in or user-defined) to be used for every supplied file instead of automatically selecting the language based upon its extension. In addition, the special value auto indicates that the language should be automatically selected (which effectively disables this option).
:tags NamespaceName::ClassName::methodName
everything ok, but putting cursor above the method name and typeCTRL + ]
it fail going to wrong method, I discover that usingg + ]
they show a list of tags than you can select the correct matching. The best to me is a script to analyse current code and correctly call:tag
– Ajit