CentOS安装YCM的方法
https://www.518cn.com 发布时间:2025-03-18 09:09 作者:网络
摘要:这篇文章主要介绍了CentOS安装YCM的方法,需要的朋友可以参考下
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.8怎么更新openssh? Centos升级openssh的技巧
Centos7.8怎么更新openssh?Centos7.8系统想要安装openssh,该怎么安装呢?下面我们就来看看Centos升级...03-18Centos7.8怎么更新openssl? CentOS升级OpenSSL的技巧
Centos7.8怎么更新openssl?Centos7.8系统想要升级OpenSSL,该怎么升级呢?详细请看下文介绍...03-18- centos7没有图形化操作可能对很多人来说都不太习惯,下面我们来为centos7安装图形化界面,本文...03-18
- 今天小编在安装RHEL7的时候,一步留神没有安装图形化桌面,下面分享一下安装图形化桌面的过...03-18
- 下载CentOS-7.0-1406的时候,有很多可选则的版本,对于普通用户来说,不知道选择哪个好,下面...03-18
Centos 7怎么手动配置ip地址? Centos7配置IP地址的技
Centos 7怎么手动配置ip地址?Centos 7系统想要自己配置ip地址,该怎么操作呢?下面我们就来看看...03-18- 这篇文章主要介绍了Centos 7 压缩与解压缩命令小结,需要的朋友可以参考下...03-18
- 这篇文章主要介绍了Centos7 yum安装git服务器,需要的朋友可以参考下...03-18
CentOS 6.6系统怎么安装?CentOS Linux系统安装配置图
CentOS系统怎么安装?今天小编就为大家带来了CentOS Linux系统安装配置图解教程,需要的朋友可...03-18在vmware虚拟机中安装Linux系统CentOS7详细教程
这篇文章主要为大家分享在虚拟机中安装Linux系统CentOS7的方法,非常详细,看了这篇基本上都...03-18
最新评论