1.安装依赖
sudo apt-get install build-essential cmake python3-dev git
2.安装vunble
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
3.在~/.vimrc中添加
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
call vundle#end()
filetype plugin indent on
4.在vim中执行
:PluginInstall
5.
cd ~/.vim/bundle/YouCompleteMe/
6.
./install.py --clang-completer --system-libclang --no-regex
失败时的处理
执行下列命令,成功后再次执行6
/usr/bin/python3 /home/jy/.vim/bundle/YouCompleteMe/third_party/ycmd/build.py --clang-completer --verbose
上面命令执行失败,写入后再次执行
~/.ycm_c-c++_conf.py中写入
import os import ycm_core flags = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-ferror-limit=10000',
'-DNDEBUG',
'-std=c99',
'-xc',
'-isystem/usr/include/',
]
SOURCE_EXTENSIONS = [
'.cpp',
'.cxx',
'.cc',
'.c',
]
def FlagsForFile( filename, **kwargs ):
return {
'flags': flags,
'do_cache': True
}
404

被折叠的 条评论
为什么被折叠?



