On Sun, Jan 28, 2007 at 01:12:00AM +0100, Bram Moolenaar wrote:
> > Hope that gets added to the default vim 7.1 distribution, because it's
> > quite the best working omni complete script I have seen so far.
>
> Can you mention on what points cppcomplete.vim works better than the
> ccomplete.vim scripts?
>
> If it's overal better I can replace the script.
First, it checks return types of functsion (where possible).
Lets assume this C code:
--------------------
typedef struct POINT
{
int x;
float y;
} _POINT;
POINT func()
{
// POINT foo = ...
return foo;
}
int main()
{
func().<c-x><x-o>
}
-------------------
cppcomplete lists me:
x and y as members since func() returns a struct of type POINT.
ccomplete does nothing but searching for a long time. I have a 125MB
tags file in /usr/include with --foldcase, but cppcomplete is instant,
and ccomplete takes some seconds, and still doesn't find something.
Second, I am not sure, if ccomplete can follow typedefs, cppcomplete can.
These are my main 2 concerns, and probably a unified codebase for c/c++
completion is easier to maintain. But I have not worked with ccomplete
that much, so please check, if cppcomplete also works for your usage
szenarios when coding C.
--
Martin