问题
For C++, is there a functionality (or plugins that will provide this) in Geany which enables suggestion/hint list of all members of a class, also classes from a linked library? I mean like in Java, when you type dot(.) after an object instance variable, all of its members (methods and public variables are shown). This also applies when importing packages and classes.
For example in Java(using Eclipse):
Vector<Object> vec = new Vector<Object();
vec.[here after typing a dot(.), all public members of Vector are shown as hints]
I'd like to have this kind of feature in Geany because its hard to memorize the correct function or header names in C++.
Is there a functionality in Geany just like I mentioned above? Or any plugins to achieve this? I know there's autocompletion in Geany, but it only works when you already used or called that specific function/variable once.
回答1:
There are two types of "tags" you'll get in Geany which provide auto-completion. The first is from the session/workspace which only includes currently open files and the second is from the "global tags" read from the "tags" directory (location is platform dependent, see manual link below). It actually uses an old but quite maintained (probably better than Exuberant Ctags itself) fork of Ctags and recently added support for reading normal Exuberant Ctags files. Of course compared to a real parser, Ctags is quite limited, but I think this is the feature you are asking about. You can find more information in in the manual.
来源:https://stackoverflow.com/questions/12540792/geany-hint-list-for-classes-in-linked-libraries