解决安装YouCompleteMe与Vim版本不兼容问题
用vim 7.4.4版本装YouCompleMe的时候提示这样的信息:
YouCompleteMe unavailable: requires Vim 7.4.1578+。明明版本比它要求的还高,居然还会报错,网上搜了一下说需要升级vim到8.0版本,大都需要用到sudo命令,但是我的是在服务器上,我并没有sudo权限,所以可以考虑将vim安装在local,安装步骤如下:
I. Install the Vim 8.0 with Make
1. Install the necessary package.
$ sudo yum install gcc-c++ ncurses-devel python-devel
2. Get the source code of Vim.
$ git clone https://github.com/vim/vim.git
3. Go to build directory.
$ cd vim/src && git check v8.0.1522
Use the version like my MacVim.
4. Configure it !
$ ./configure \
--disable-nls \
--enable-cscope \
--enable-gui=no \
--enable-multibyte \
--enable-pythoninterp \
--enable-rubyinterp \
--prefix=/home/jonny/.local/vim \
--with-features=huge \
--with-python-config-dir=/usr/lib/python2.7/config \
--with-tlib=ncurses \
--without-x
注意上面的一些参数需要做对应的修改:
--prefix: 需要改成local user路径--with-python-config-dir:我用的是anaconda,然后我的/home/anaconda3/lib/python3.7路径下并没有config文件夹,这个文件夹是用来支持YouCompleteMe插件的,所以你可以先手工创建这个文件夹即可。
5. Compile and install the Vim.
$ make && make install
6. Add ~/.local/vim/bin/ into $PATH.
$ vim ~/.bashrc
...
if [ -d "$HOME/.local/vim/bin/" ] ; then
PATH="$HOME/.local/vim/bin/:$PATH"
fi
7. Reload the bashrc.
source ~/.bashrc
8. Check Vim version
输入$ vim --version你就会看到此时vim版本变成了8.0.
II. Install the YouCompleteMe plugin
- Install the necessary package.
$ sudo yum install gcc-c++ cmake python-devel
- Get the YouCompleteMe plugin.
$ mkdir ~/.vim/bundle && git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe
- Compile and install the YouCompleteMe.
$ cd ~/.vim/bundle/YouCompleteMe && python ./install.py
安装完YouCompleteMe之后,每次打开一个文件都会提示这样的信息
Found /Users/username/.ycm_extra_conf.py. Load?
(Question can be turned off with options, see YCM docs)
[O]k, (C)ancel
可以在.vimrc文件中添加如下命令即可关闭提示
let g:ycm_confirm_extra_conf = 0
Enjoy it.
感谢: Install the Vim 8.0 and YouCompleteMe with Make on CentOS 7.4
解决安装YouCompleteMe与Vim版本不兼容问题的更多相关文章
- centos7安装YouCompleteMe,vim打造成C++的IDE
一.安装python3 1.安装编译工具 yum -y groupinstall "Development tools" yum -y install zlib-devel bzi ...
- 解决Selenium与firefox浏览器版本不兼容问题
因为在用java打开firefox浏览器的时候报错 org.openqa.selenium.firefox.NotConnectedException: Unable to connect to ho ...
- vim安装YouCompleteMe 插件
要安装YouCompleteMe ,vim须支持python.看是否支持,可以在vim中:version 查看, 如果python前有+号,就是支持,减号就是不支持. 如果不支持,需要以编译安装方式重 ...
- 给vim安装YouCompleteMe
要安装YouCompleteMe ,vim须支持python.看是否支持,可以在vim中:version 查看, 如果python前有+号,就是支持,减号就是不支持. 如果不支持,需要以编译安装方式重 ...
- vim学习之安装YouCompleteMe
YouCompleteMe号称vim最难安装的插件,是太低估它了,我觉得只是目前我遇到的最难安装的一个软件. YouCompleteMe是用c++写的,要想补全c-family需要用clang编译. ...
- ubuntu下python安装pandas和numpy等依赖库版本不兼容的问题RuntimeWarning: numpy.dtype size changed
习惯了linux下用pip install numpy及pip install pandas命令了.折腾了好久了. 上来先在python3中pip3 install numpy装了numpy,然后再p ...
- Linux c++ vim环境搭建系列(3)——Ubuntu18.04.4编译安装youcompleteme
3. youcompleteme编译安装 参考网址: https://github.com/ycm-core/YouCompleteMe#linux-64-bit 建议不要用这个博客的方法: http ...
- 【我的Android进阶之旅】解决 Error:CreateProcess error=216, 该版本的 %1 与您运行的 Windows 版本不兼容。请查看计算机的系统信息,了解是否需要 x86
一.错误描述 刚刚打开Android Studio新建一个项目,然后就编译不了,报了如下所示的错误: 错误描述为: Error:CreateProcess error=216, 该版本的 %1 与您运 ...
- 【暂时解决】win10下安装VS2017 15.3版本 提示 未能安装包“Microsoft.NET.4.6.FullRedist.NonThreshold.Resources,version=4.6.81.9,language=zh-CN”。
win10下安装VS2017 15.3版本的时候,出现以上错误日志提示,请问如何解决的哇? 这个问题,开始我以为是我的安装包所在的路径问题引起的,但是我将安装包移动到了磁盘根目录进行安装,依然出现这个 ...
随机推荐
- feign无法注入service
https://segmentfault.com/q/1010000008531927
- Explicit Constructors(显式构造函数)
按照默认规定,只有一个参数的构造函数也定义了一个隐式转换,将该构造函数对应数据类型的数据转换为该类对象,如下面所示:class String {String ( const char* p ); // ...
- (分治法 快速幂)51nod1046 A^B Mod C
1046 A^B Mod C 给出3个正整数A B C,求A^B Mod C. 例如,3 5 8,3^5 Mod 8 = 3. 收起 输入 3个正整数A B C,中间用空格分隔.(1 < ...
- vue实现购物车和地址选配
参考文献 vue.js官网 项目演示:数据渲染,格式化数据,点击加,减号自动加减 项目准备 1. 项目css和js文件 https://github.com/4561231/hello ...
- 机器学习-随机梯度下降(Stochastic gradient descent)
sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...
- layui(五)——form组件常见用法总结
form 是我们非常看重的一块.layui中的form实现全自动的初始渲染,和基于事件驱动的接口书写方式.我整理了layui中form的配置.下边直接给一个栗子,后台采用.net MVC,除了razo ...
- Windows Azure中国版试用
Winodws Azure刚出来那会都没怎么关注,就在一些网页新闻上见过一些报道,之前阿里云在博客里搞过推广,拿什么豆可以换,当时也就是看了一下没去用过. 有次在一群里别人说Windows Azure ...
- SQL语句实例集合
SQL语句实例 表操作 例 1 对于表的教学管理数据库中的表 STUDENTS ,可以定义如下: CREATE TABLE STUDENTS (SNO NUMERIC (6, ...
- Mysql查看表的建表语句
已查询Test的建表语句为例: SHOW CREATE TABLE TEST
- C语言宏定义##连接符和#符的使用
1. 关于宏(Macro) 属于编译器预处理的范畴,属于编译器概念(而非运行期概念). 2. 关于# #的功能:是 将其后面的宏参数进行 字符串化操作(Stringfication),即:在对它所引用 ...