gpt4 book ai didi

ubuntu - 我的 YouCompleteMe Vim 插件不支持 STL

转载 作者:太空宇宙 更新时间:2023-11-03 16:44:06 25 4
gpt4 key购买 nike

我刚刚编译并安装了 Vim、Vundle 和 YouCompleteMe插件根据Github上的介绍。但是 YouCompleteMe 插件在我的 Vim 中不能很好地工作。它可以自动补全变量名,但不能自动补全STL对象(vector、map)的操作。它甚至不能自动完成类中的“this->”。它总是告诉我“(^U^N^P) 找不到模式。”你们以前见过这个吗?我使用 Ubuntu 12.04。我应该怎么办?

最佳答案

github repo 上的自述文件该插件现在解决了这个问题。

This is caused by an issue with libclang. Compiling from clang the binary uses the correct default header search paths but compiling from libclang.so does not. The issue seems to impact some OS's more than others. It appears that OS X Mavericks in particular has problems with this.

The current workaround is to call echo | clang -v -E -x c++ - and look at the paths under the #include <...> search starts here: heading. You should take those paths, prepend -isystem to each individual path and append them all to the list of flags you return from your FlagsForFile function in your .ycm_extra_conf.py file.

您可能还想看看相应的 issue

关于ubuntu - 我的 YouCompleteMe Vim 插件不支持 STL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15266194/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com