因为 CentOS7 在默认情况下,通过 yum 安装的 vim-X11.x86_64 版本为 7.x 版本,对 Youcompleteme 支持不好。故需要升级到 8.x 版本。
以下记录 gvim 源码安装过程:
0. 卸载原始的安装包 vim-X11
$ sudo yum remove vim-X11.x86_64
1. 安装必要的软件包 (主要是为了支持 X,首先可用 $ rpm -qa xxx 查看是否这些包已经安装)
$ sudo yum install ncurses-devel.x86_64
$ sudo yum install libXt-devel.x86_64
$ sudo yum install gtk2-devel.x86_64
2. clone 源码包
$ git clone https://github.com/vim/vim.git
3. 进入源码目录进行编译前配置 (可用 $ ./configure --help 查看可用的编译选项)
$ ./configure --prefix=/usr/local --enable-pythoninterp=yes --enable-gui=auto --enable-cscope --enable-multibyte --enable-xim --enable-fontset --with-features=huge --with-x
4. 编译
$ make
5. 安装
$ sudo make install
6. 问题
github 最新的 vim8.1 可能出现在 GUI 情况下 Ctrl + F 不能正确翻页的问题,Linux 下解决方法如下,
打开文件:/usr/local/share/vim/vim81/mswin.vim
把如下的黄色部分注释掉即可,
if has("gui")
"" CTRL-F is the search dialog
"noremap has("gui_running") ? ":promptfind\" : "/"
"inoremap has("gui_running") ? "\\:promptfind\" : "\\/"
"cnoremap has("gui_running") ? "\\:promptfind\" : "\\/"
" CTRL-H is the replace dialog,
" but in console, it might be backspace, so don't map it there
nnoremap has("gui_running") ? ":promptrepl\" : "\"
inoremap has("gui_running") ? "\\:promptrepl\" : "\"
cnoremap has("gui_running") ? "\\:promptrepl\" : "\"
endif
完。
centos7 升级openssh到openssh-8.0p1版本
环境介绍 centos7.3和centos7.6升级完毕测试登录ssh以及重启后登录ssh均无问题. 前期请自行配置好yum源(如果不会请百度) 整个过程不需要卸载原先的openssl包和openss ...
centos7 升级 git(2.14.3) 版本
下载 wget https://www.kernel.org/pub/software/scm/git/git-2.14.3.tar.gz 安装依赖包 yum install curl-devel ...
Centos7升级Git版本
centos 升级 Git 版本 问题描述 centos7 系统默认的 git 安装版本是 1.8,但是在项目构建中发现 git 版本过低,于是用源码编译的方式进行升级.同时该文章也适用于安装新的 g ...
centOS7升级git版本到2.7.3
CentOS 自带的git版本太低,需要升级到2.1.2版本以上才能使用gitea. 升级方法: 1.安装所需软件包 yum install curl-devel expat-devel gettex ...
CentOS7升级OpenSSL版本
1.CentOS7.6默认安装的openssl版本为 # 查看openssl版本 openssl version 2.下载最新的openssl wget https://www.openssl.org ...
Centos7 升级 Ruby
Centos7通过yum 安装的Ruby 是2.0版本.版本较低,需要升级到2.5以上版本. #yum 安装ruby yum install ruby #查看ruby版本 ruby -v 以下开始升级 ...
【转】CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)