解决安装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版本的时候,出现以上错误日志提示,请问如何解决的哇? 这个问题,开始我以为是我的安装包所在的路径问题引起的,但是我将安装包移动到了磁盘根目录进行安装,依然出现这个 ...
随机推荐
- discuz 3.1论坛快照被百度劫持解决方案
最近很郁闷,遇到一个很棘手的问题.我们公司有个论坛在百度查看快照信息的时候全部都是博彩信息,但是打开却无博彩信息显示.在快照中查看是这样的 百度快照查看图: 经过思考,怀疑是网站中有网页被改动了,在某 ...
- (map)What Are You Talking About hdu1075
What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K ...
- Python网络编程之socket编程
什么是Socket? Socket是应用层与TCP/IP协议族通信的中间软件抽象层,它是一组接口.在设计模式中,Socket其实就是一个门面模式,它把复杂的TCP/IP协议族隐藏在Socket接口后面 ...
- 信用评分卡 (part 2of 7)
python信用评分卡(附代码,博主录制) https://study.163.com/course/introduction.htm?courseId=1005214003&utm_camp ...
- C++ 二维数组作为形参传递使用实例
在线代码编辑器: http://codepad.org/ 1.*指针 void display(int *arr, const int row, const int col) { ; i < r ...
- 6、JPA-映射-单向一对多
一个用户对应多个订单 实体类 Customer package com.jpa.yingshe; import javax.persistence.*; import java.util.HashSe ...
- 设计模式---行为变化模式之命令模式(Command)
前提:行为变化模式 在组件的构建过程中,组建行为的变化经常导致组件本身剧烈的变化.“行为变化”模式将组件的行为和组件本身进行解耦,从而支持组件的变化,实现两者之间的松耦合. 类中非虚函数和静态函数方法 ...
- elasticsearch 集成springboot
和jpa类似,很简单,很强大. pom <dependencies> <dependency> <groupId>org.springframework.boot& ...
- 完美解决distinct中使用多个字段的方法
众所周知,distinct可以列出不重复的记录,对于单个字段来说distinct使用比较简单,但是对于多个字段来说,distinct使用起来会使人发狂.而且貌似也没有见到微软对distinct使用多字 ...
- 细说shiro之二:组件架构
官网:https://shiro.apache.org/ Shiro主要组件包括:Subject,SecurityManager,Authenticator,Authorizer,SessionMan ...