您现在的位置是:网站首页> 编程资料编程资料
CentOS安装YCM的方法_RedHat/Centos_操作系统_
2024-02-20
512人已围观
简介 CentOS安装YCM的方法_RedHat/Centos_操作系统_
1、安装vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
2、配置.vimrc
set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'tpope/vim-fugitive' call vundle#end() Bundle 'Valloric/YouCompleteMe' filetype plugin indent on
3、打开vim运行
:BundleInstall
4、安装必要工具
1、yum install gcc gcc-c++ make automake python-devel
2、安装CMake
wget http://www.cmake.org/cmake/resources/software.html tar -zxv -f cmake-*.*.*.*.tar.gz cd cmake-*.*.*.*.tar.gz ./bootstrap gmake gmake install
5、安装clang+llvm(这里用已经编译好的)
1、wget http://llvm.org/releases/3.5.1/clang+llvm-3.5.1-x86_64-fedora20.tar.xz xz -d clang+llvm-3.5.1-x86_64-fedora20.tar.xz tar xvf clang+llvm-3.5.1-x86_64-fedora20.tar cd clang+llvm-3.5.1-x86_64-fedora20 注:也可用tar xvf clang+llvm-3.5.1-x86_64-fedora20.tar.xz解压 2、在/etc/profile这个档案最尾端添加以下两行代码: PATH=/usr/local/cmake/bin:/usr/clang_3_3/bin:$PATH export PATH 3、执行更新变量:source /etc/profile
6、进入YCM目录,运行
./install.sh –clang-completer
7、对~/.vimrc做配置
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/y cmd/cpp/ycm/.ycm_extra_conf.py' let g:ycm_confirm_extra_conf = 0 let g:ycm_semantic_triggers = { \ 'c' : ['->', ' ', '.', ' ', '(', '[', '&'], \ 'cpp,objcpp' : ['->', '.', ' ', '(', '[', '&', '::'], \ 'perl' : ['->', '::', ' '], \ 'php' : ['->', '::', '.'], \ 'cs,java,javascript,d,vim,python,perl6,scala,vb,elixir,go' : ['.'], \ 'ruby' : ['.', '::'], \ 'lua' : ['.', ':'] \ }
相关内容
- centos7下解压文件命令(zip)详解_RedHat/Centos_操作系统_
- Centos 6.5下安装配置VNC(tigervnc)服务的详细配置_RedHat/Centos_操作系统_
- CentOS 7实现DNS+DHCP动态更新详解_RedHat/Centos_操作系统_
- CentOS 增加IP地址的方法_RedHat/Centos_操作系统_
- 天天酷跑 2016年4月活动大全分享_手机游戏_游戏攻略_
- 战舰少女r岚图鉴 属性装备获得方法及立绘(含大破)_手机游戏_游戏攻略_
- 战舰少女r圣建日活动2016攻略 各舰船建造公式时间阈值详解_手机游戏_游戏攻略_
- 王者荣耀貂蝉出装符文详解 美女貂蝉放到一片猛汉_手机游戏_游戏攻略_
- 王者荣耀安琪拉出装符文详解 安琪拉大神玩法攻略_手机游戏_游戏攻略_
- 崩坏学园2 3.1版本新徽章旅途行愿介绍_手机游戏_游戏攻略_
