找不到vim omnicppcomplete模式 [英] vim omnicppcomplete pattern not found
本文介绍了找不到vim omnicppcomplete模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的计算机上安装了vim7.3(在Windows 7下),我想使用自动完成插件。
I installed vim7.3 on my computer (under windows 7) and i want to use an autocomplete plugin.
我搜索了很多,发现Omnicppcomplete是
I searched a lot and found that Omnicppcomplete is the best for that.
因此,我遵循本教程: 安装OmniCppComplete插件
So i followed this tutorial: Install OmniCppComplete plugin
我的_vimrc配置文件看起来像这样:
My _vimrc config file looks like this:
set nocp
filetype plugin on
syntax on
set filetype=cpp
set tags+=C:/Program\ Files/Vim/vimfiles/tags/stl
" build tags of your own project with CTRL+F12
"map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
noremap <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
inoremap <F12> <Esc>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_MayCompleteDot = 1
let OmniCpp_MayCompleteArrow = 1
let OmniCpp_MayCompleteScope = 1
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview
这个错误发生,不知道为什么。
But if i type this an error occurs and dont know why.
#include <iostream>
int main(void) {
std::|
}
和错误: - Omni completion O ^ N ^ P)未找到模式
推荐答案
问题是 set tags + = C:/ Program\ Files / Vim / vimfiles / tags / stl
这里有错误:
-
:pwd
- >c:\Windows \system32
- 将标签文件复制到system32
- 重新启动vim
:pwd
->c:\Windows\system32
- copy the tags file to system32
- restart vim
然后下面的c ++代码工作。
then the following c++ code worked.
这篇关于找不到vim omnicppcomplete模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文