Vim + OmniCppComplete and completing members of class members
- by Robert S. Barnes
I've noticed that I can't seem to complete members of class members using OmniCppComplete. For example, given the following files:
// foo.h
#include <string>
class foo {
public:
void
set_str(const std::string &);
std::string
get_str_reverse( void );
private:
std::string str;
};
// foo.cpp
#include "foo.h"
using std::string;
string
foo::get_str_reverse ( void )
{
string temp;
temp.assign(str);
reverse(temp.begin(), temp.end());
return temp;
} /* ----- end of method foo::get_str ----- */
void
foo::set_str ( const string &s )
{
str.assign(s);
} /* ----- end of method foo::set_str ----- */
I've set up tags for stdlibc++ and generated the tags for these two files using:
ctags -R --c++-kinds=+pl --fields=+iaS --extra=+q .
When I type temp. in the cpp I get a list of string member functions as expected. But if I type str. omnicomplete spits out "Pattern Not Found".
I've noticed that the temp. completion only works if I have the using std::string; declaration.
How do I get completion to work on my class members?