如何提高clang_complete的完成速度?
我在 Vim 中使用插件 clang_complete 。该插件可以准确地完成C++ STL。但其完成速度却令人难以接受。有没有办法提高clang_complete的完成速度?
更新:昨天我发现这个,现在omnicppcomplete已经基本可以满足我的需求了,所以我决定继续使用omnicppcomplete.vim。谢谢各位的解答!!
I'm using the plugin clang_complete in Vim. The plugin could complete C++ STL accurately. But its completion speed is unacceptable. Is there any way to improve the clang_complete's completion speed?
update:Yesterday I found this,and now the omnicppcomplete could basically meet my need ,so I decided to continue to use omnicppcomplete.vim. Thak you for your answers!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,我听说,使用 libclang.so 而不是 clang 可执行文件要快得多。然而,为了可靠地完成,您需要忽略错误,并且我在使用 libclang api 时有点迷失。确实没那么容易。
我不知道您使用的是哪个版本的 clang_complete,但是有一个名为 Same 的后续插件,到目前为止已经由某个人更新了。他尝试使用 libclang 和预填充数据库来加速 - 不仅是为了完成,还为了上下文敏感的导航。参见这里:
http://blog.wuwon.id .au/2011/10/vim-plugin-for-navigating-c-with.html
它实际上确实存在一些问题,因为它无法正常工作,当代码中有某些内容时,clang编译器不会 喜欢。旧的 clang_complete 可能会忽略它,但这个版本不会(至少,当您使用 libclang 时,您也可以自由使用旧的 clang 可执行文件)。
Well i heard, that using libclang.so instead of clang executable is much faster. However for reliable completion, you need to ignore errors, and im kinda lost in using libclang api. Its really not that easy.
I dont know, which version of clang_complete are you using, but there is follow up plugin called same, that is updated until now by some guy. He tried to use libclang and pre-filled databases for speedup - and not only for completing, but also for context sensitive navigating. See here:
http://blog.wuwon.id.au/2011/10/vim-plugin-for-navigating-c-with.html
It actually does have some problems, as it doesnt work correctly, when there is something in code, that clang compiler doesnt like. it could be ignored by old clang_complete, but not this version(at least, when you are using libclang, you are free to use also the old clang executable).
如果您不使用 Clang 3.0 (rc) 或 trunk,则可能使用速度较慢的代码。由于性能不可接受,最近已对此进行了研究,因此仅更新 Clang 可能会给您带来所需的提升。
If you're not using Clang 3.0 (rc) or trunk, you may be using slower code. This has recently been worked on, due to inacceptable performance, so just updating Clang might give you the boost you need.