[iyunv@localhost ~]# vim ~/.vimrc
YouCompleteMe unavailable: requires Vim 7.4.1578+.
Press ENTER or type command to continue
然后我就查看下自带的vim的版本
[iyunv@localhost ~]# vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 2 2017 00:45:39)
Included patches: 1-160
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
我想反正需要升级vim索性升级到8的版本,具体的升级过程如下
找到vim 8 的repository,并且放到本地
[iyunv@localhost ~]# cd /etc/yum.repos.d/
[iyunv@localhost yum.repos.d]# wget https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo
--2017-11-13 03:45:36-- https://copr.fedorainfracloud.org/coprs/mcepl/vim8/repo/epel-7/mcepl-vim8-epel-7.repo
Resolving copr.fedorainfracloud.org (copr.fedorainfracloud.org)... 209.132.184.54
Connecting to copr.fedorainfracloud.org (copr.fedorainfracloud.org)|209.132.184.54|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 306 [text/plain]
Saving to: ‘mcepl-vim8-epel-7.repo’
100%[==================================================================================================>] 306 --.-K/s in 0s
2017-11-13 03:45:37 (48.2 MB/s) - ‘mcepl-vim8-epel-7.repo’ saved [306/306]
查看repository的配置
[mcepl-vim8]
name=Copr repo for vim8 owned by mcepl
baseurl=https://copr-be.cloud.fedoraproject.org/results/mcepl/vim8/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/mcepl/vim8/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
Transaction check error:
file /usr/share/man/man1/vim.1.gz from install of vim-common-2:8.0.1290-1.0.56.el7.centos.x86_64 conflicts with file from package vim-minimal-2:7.4.160-2.el7.x86_64
Error Summary
-------------