I'm working with Vim 7.4 on Mac OS.
I have installed OmniCppComplete plugin and tried to autocomplete c++.
Of course I have installed the ctags.
Now I have a simple project, which has only one class Test
and one member function func()
in the Test
.
Then I execute the command below under the directory of my project:
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=c++ .
In the main
, I did as below:
#include <iostream>
int main(void) {
Test t;
t.| // func( popup automatically
std::| // ERROR
}
The member function can popup correctly but std:: can't -- Omni completion (^O^N^P) Pattern not found
.
It doesn't seem that c++ standard library can be found correctly.
I also found another similar question:
vim omnicppcomplete pattern not found
I also tried to add tags in vim:
:set tags+=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1/
But it still doesn't work.