clang_complete vim扩展不能与STL一起使用 [英] clang_complete vim extension not working with STL
问题描述
我在Linux系统上安装了clang和clang_complete。
我添加了以下行到我的 .vimrc
:
I have installed clang and clang_complete on a Linux system.
I added the following lines to my .vimrc
:
let g:clang_user_options='|| exit 0'
set completeopt-=preview
自动完成适用于我自己的代码。但是,它不能与STL容器一起使用。即使我只是键入 std ::
,我看到一个用户定义完成 - 模式未找到在屏幕的底部。问题是什么?
Auto-completion works for my own code. However, it doesn't work with STL container. Even when I just type std::
, I see a "user defined completion - pattern not found" at the bottom of the screen. What is the problem?
我使用Vim 7.3和clang_complete 1.8
I use Vim 7.3 and clang_complete 1.8
推荐答案
p>解决方法是告诉clang_complete使用clang库(而不是二进制)进行解析。这是通过在 .vimrc
中添加以下行来实现的:
The workaround is to tell clang_complete to use the clang library (instead of binary) for parsing. This is done by adding the following line to .vimrc
:
let g:clang_use_library = 1
这篇关于clang_complete vim扩展不能与STL一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!