kir*_*gum 7 vim boost clang code-completion clang-complete
我喜欢和vim一起使用clang.
我一直有的一个问题就是每当我加入boost时,每当我输入"."时clang就会通过boost库.在一个对象名称之后.这需要5-10秒.
由于我没有对boost标题进行更改,有没有办法通过boost缓存搜索?如果没有,有没有办法从自动完成搜索中删除提升?
更新(1)以回应adaszko的回答:let g:clang_use_library = 1
Run Code Online (Sandbox Code Playgroud)Error detected while processing function ClangComplete: line 35: Traceback (most recent call last): Press ENTER or type command to continue Error detected while processing function ClangComplete: line 35: File "<string>", line 1, in <module> Press ENTER or type command to continue Error detected while processing function ClangComplete: line 35: NameError: name 'vim' is not defined Press ENTER or type command to continue Error detected while processing function ClangComplete: line 40: E121: Undefined variable: l:res Press ENTER or type command to continue Error detected while processing function ClangComplete: line 40: E15: Invalid expression: l:res Press ENTER or type command to continue Error detected while processing function ClangComplete: line 58: E121: Undefined variable: l:res Press ENTER or type command to continue Error detected while processing function ClangComplete: line 58: E15: Invalid expression: l:res Press ENTER or type command to continue
......而且没有自动强制
更新(2)
不确定clang_complete是否应该解决boost的问题.没有插件的vim会搜索boost.超级用户有一个答案,通过boost dirs评论搜索set include=^\\s*#\\s*include\ \\(<boost/\\)\\@!
从这里,您可以将以下内容添加到您的.vimrc:
:set include=^\\s*#\\s*include\ \\(<boost/\\)\\@!
Run Code Online (Sandbox Code Playgroud)
(通过 boost 缓存搜索的问题仍然悬而未决)
| 归档时间: |
|
| 查看次数: |
2064 次 |
| 最近记录: |