我想在C ++语义完成中使用YouCompleteMe,但是经过数小时的尝试,我找不到为什么它无法按预期工作。
一切似乎都正常,但是我无法完成函数参数。
我在Archlinux(Openbox上的Gnome Terminal)上运行Vim:
Linux Arch-PC 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux
我按照说明(带有install.py
脚本和clang支持)安装了YCM 。我还尝试了AUR YCM软件包,并遇到了同样的问题。
YcmDebugInfo
:
Printing YouCompleteMe debug information...
-- Server has Clang support compiled in: True
-- Clang version: clang version 3.7.0 (tags/RELEASE_370/final)
-- Flags for /home/arthur/vimtest/main.cpp loaded from /home/arthur/vimtest/.ycm
_extra_conf.py:
-- ['-x', 'c++', '-Wall', '-isystem', '/home/arthur/.vim/bundle/YouCompleteMe/th
ird_party/ycmd/ycmd/../clang_includes']
-- Server running at: http://127.0.0.1:54555
-- Server process ID: 11520
-- Server logfiles:
-- /tmp/ycm_temp/server_54555_stdout.log
-- /tmp/ycm_temp/server_54555_stderr.log
我将YCM-Generator用于.ycm_extra_conf.py
。
由于缺乏Vim知识,我是否只是缺少一些愚蠢的东西?似乎是不良的键盘快捷键映射之类的东西……但无法准确找出问题所在。这是我的.vimrc:
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'mbbill/undotree'
Plugin 'majutsushi/tagbar'
Plugin 'bling/vim-airline'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-scripts/c.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'sjl/badwolf'
Plugin 'rdnetto/YCM-Generator'
call vundle#end() " required
filetype plugin on " required
"Settings
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set autoindent
set backspace=indent,eol,start
set background=dark
set shiftround
set ignorecase
set showmode
set ruler
set showcmd
set mouse=a
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"Plugins Settings :
"badwolf
colorscheme badwolf
"YCM :
let g:ycm_collect_identifiers_from_tags_files = 1
"airline :
set laststatus=2
let g:airline_powerline_fonts = 1
"Shortcuts
nnoremap <F3> :UndotreeToggle<cr>
nnoremap <F4> :TagbarToggle<cr>
nnoremap <F2> :NERDTreeToggle<cr>
syn on
set nu
谢谢你的帮助!
clang_completer
是github.com/Rip-Rip/clang_complete或其他插件?