VIM YouCompleteme错误 - noextraconfdetected:否检测到的.ycm_extra_c

VIM YouCompleteMe error- NoExtraConfDetected: No .ycm_extra_conf.py file detected

本文关键字:ycm 检测 extra 错误 YouCompleteme noextraconfdetected VIM      更新时间:2023-10-16

我正在为C 设置YouCompleteme,但是当我打开一个.cpp文件时,我会收到错误noextraconfdetected:no .ycm_extra_conf.py filected

.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 在那里。

我有让G:ycm_global_ycm_extra_conf ='$ user/.vim/bundle/youcompleteme/youcompleteme/youcompletem/third_party/ycmd/cpp/ycm/.ycm/.ycm_extra_extra_extra_conf.py'''''在.vimrc文件中错误地放置了错误吗?

无法解释它,但是vimrc不喜欢$ user,您需要一个la $ home的完整路径。尝试以下操作:

让G:ycm_global_ycm_extra_conf ='/home/your_user/.vim/bundle/youcompleteme/youcompleteme/third_party/ycmd/ycmd/ycpp/ycp/ycm/.ycm_extra_extra_extra_conf.py'