简体   繁体   English

Vim的Youcompleteme插件无法为errno.h中的错误代码提供完成

[英]Youcompleteme plugin for vim fails to provide completion for error codes from errno.h

I've never used vim at work, only starting to familiarize myself with it and so far like it very much. 我从未在工作中使用过vim,只是开始熟悉它,并且到目前为止非常喜欢它。

For YouCompleteMe plugin to work for my test project I took .ycm_extra_conf.py file from here and added '-I/usr/include' and 'path/to/my/project/' to flags. 为了使YouCompleteMe插件适用于我的测试项目,我从此处获取.ycm_extra_conf.py文件,并在标志中添加了“ -I / usr / include”和“ path / to / my / project /”。 It works very well, it can complete even c++11's auto types! 它工作得很好,甚至可以完成c ++ 11的auto类型!

But I couldn't make it complete error codes like EINTR , EAGAIN , etc., that are supposed to be visible after #include <errno.h> 但是我无法使它完整的错误代码,例如EINTREAGAIN等,应该在#include <errno.h>之后可见

If I call :YcmComplete GoToDeclaration with my cursor being on EINTR , it's declaration is correctly found however... 如果我将光标放在EINTR上调用:YcmComplete GoToDeclaration ,但是可以正确找到它的声明...

Is there a solution? 有解决方案吗?

通过进一步的谷歌搜索,我发现可以使用(Ctrl-Space)获得宏完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM