简体   繁体   English

clang_complete vim扩展不适用于STL

[英]clang_complete vim extension not working with STL

I have installed clang and clang_complete on a Linux system. 我已经在Linux系统上安装了clang和clang_complete。 I added the following lines to my .vimrc : 我在.vimrc添加了以下几行:

let g:clang_user_options='|| exit 0'
set completeopt-=preview

Auto-completion works for my own code. 自动补全适用于我自己的代码。 However, it doesn't work with STL container. 但是,它不适用于STL容器。 Even when I just type std:: , I see a "user defined completion - pattern not found" at the bottom of the screen. 即使当我只键入std:: ,在屏幕底部也会看到“用户定义的补全-找不到模式”。 What is the problem? 问题是什么?

I use Vim 7.3 and clang_complete 1.8 我使用Vim 7.3和clang_complete 1.8

The workaround is to tell clang_complete to use the clang library (instead of binary) for parsing. 解决方法是告诉clang_complete使用clang库(而不是二进制库)进行解析。 This is done by adding the following line to .vimrc : 这是通过在.vimrc添加以下行来完成的:

let g:clang_use_library=1

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

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