分页: 1 / 1

菜鸟,问一个gVim自动补全的问题

发表于 : 2010-09-06 18:38
Leeto
折腾了半天,总算是把VIM的自动补全功能搞上了,刚开始一直提示
Parttern not found
我知道是没生成tags文件,其他都搞定了
最后不知道怎么莫名其妙,在我的保存源码文件夹里出现一个tags文件,110来M,于是CP到VIM文件夹(我用的是Windows)
然后试了一下
我上个图
auto.jpg
有点不理解,怎么提示这么多呢。原来在VC中,只会提示相关的变量,比如我这个,我的class里只有3个成员变量
可是bs.然后提示出来这么一大堆不相干的东西呢
可不可设置成,让它只提示该类中的成员变量呢?

Re: 菜鸟,问一个gVim自动补全的问题

发表于 : 2010-09-06 20:16
风间星魂
viewtopic.php?f=68&t=290726

看看人家是怎么搞的。

Re: 菜鸟,问一个gVim自动补全的问题

发表于 : 2010-09-06 20:52
Leeto
风间星魂 写了:viewtopic.php?f=68&t=290726

看看人家是怎么搞的。
照着那个贴子试了试,其实也没多少可做的,我的是windows平台
所以把相关文件只读去掉,然后又添加
let OmniCpp_DisplayMode = 1 "使用“MyClass::”显示类的所有方法和属性,这样比较方便
let OmniCpp_MayCompleteDot = 1 " autocomplete with .
let OmniCpp_MayCompleteArrow = 1 " autocomplete with ->
let OmniCpp_MayCompleteScope = 1 " autocomplete with ::
let OmniCpp_SelectFirstItem = 2 " select first item (but don't insert)
let OmniCpp_NamespaceSearch = 2 " search namespaces in this and included files
let OmniCpp_ShowPrototypeInAbbr = 1 " show function prototype (i.e. parameters) in popup window
不行,又添加了
autocmd FileType cpp set omnifunc=cppcomplete#Complete
还是不行,同样是提示一堆成员变量