tags:

views:

93

answers:

1

I found that omnicppcomplete does not support typedef-ed struct name . I don't know it is a limitation of omnicppcomplet or it is because some missing configuration in my vim enviroment . Let me give you a dummy example to put it more clear.

typedef struct foo {
   int a;
   int b;
}foo_t ;

foo a ;
foo_t b ;

then after I hit "a." in insert mode , the following will appear in a popup window :

a m  + foo
b m  + foo

but after hit "b." , the following line appears at the bottom of the sreen :

"Omni completion (^O^N^P) Pattern not found

======================edit after Habi's answer===============================

the ctags version I use is 5.4 and the latest is 5.8 . hint by Habi's example , I download the latest version of ctags and fix the problem .

+1  A: 

A similar example works here.

I use ctags this way:

ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .

I use exuberant ctags version 5.7 and omnicppcomplete 0.41.

My settings of omnicppcomplete are:

let OmniCpp_ShowPrototypeInAbbr=1
let OmniCpp_ShowScopeInAbbr=1
let OmniCpp_SelectFirstItem=2
Habi
@habi : the ctags version in the linux box I login is 5.4 , apparently out of date . hint by your example , I try to use the latest version of ctags , it works now . thanks for your help .
Haiyuan Zhang