我发现omnicppcomplete不支持类型定义的结构名称。我不知道这是omnicppcomplet的限制,还是因为我的vim环境中缺少配置。让我给你一个虚拟的例子,让它更清楚。
typedef struct foo {
int a;
int b;
}foo_t ;
foo a ;
foo_t b ;然后在我按下“a”之后在插入模式下,弹出窗口中将显示以下内容:
a m + foo
b m + foo但是在点击"b.“之后,以下行出现在sreen的底部:
"Omni completion (^O^N^P) Pattern not found哈比的answer===============================之后的======================edit
我使用的ctags版本是5.4,最新版本是5.8。根据Habi的例子,我下载了ctag的最新版本并解决了这个问题。
发布于 2010-01-29 19:56:03
这里有一个类似的例子。
我以这种方式使用ctag:
ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .我使用的是exuberant ctags版本5.7和omnicppcomplete 0.41。
我的omnicppcomplete设置是:
let OmniCpp_ShowPrototypeInAbbr=1
let OmniCpp_ShowScopeInAbbr=1
let OmniCpp_SelectFirstItem=2https://stackoverflow.com/questions/2161396
复制相似问题