I have the omnicppcomplete plugin with exuberant ctags, I generate tags for projects with the following command:
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
What I am trying to achieve is to have Vim recognize the type of an object when I access it through an STL container, to provide me with an appropriate list of autocomplete suggestions.
For example suppose the IntWrapper
object has a getTheInt()
method and I have a vector of IntWrappers
:
std::vector<IntWrapper> wrappers;
If I have the following code:
for (size_t i = 0; i < wrappers.size(); i++) {
wrappers[i].<VIM Cursor is here>
}
I'd like VIM to understand that wrapper[i] is of type IntWrapper
and to give me the getTheInt()
method as the first autocompletion choice, along with documentation, as if I operated on an IntWrappers object directly.
To make clear what I would expect, the first screenshot below is what happens when I ask for autocompletion on the vector, the second one is what happens when I access the object directly, and what I'd like to achieve even with stl containers.
(The sentence highlighted in red above says expression not found)
Is there any plugin (I don't care about CPU expensiveness) to do this?
Many thanks.