我正在为C ++设置YouCompleteMe,但是当我打开.cpp文件时,出现错误NoExtraConfDetected:未检测到.ycm_extra_conf.py文件
.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()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'rdnetto/YCM-Generator'
Plugin 'Valloric/YouCompleteMe'
let g:ycm_global_ycm_extra_conf = '$USER/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
我认为这行代码:
let g:ycm_global_ycm_extra_conf = '$USER/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
我会处理这个错误。
我按照路径操作,.ycm_extra_conf.py在那里。
我在.vimrc文件中是否将let g:ycm_global_ycm_extra_conf = '$USER/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'放错了位置?