-
-
Save zhu3pang/8653a66883d3735ab75f15dcbbdd1c81 to your computer and use it in GitHub Desktop.
Update to Vim8 on Centos 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# Method 1: Install using rpm packages (credit to DarkMukke) | |
# | |
curl -L https://copr.fedorainfracloud.org/coprs/hnakamur/vim/repo/epel-7/hnakamur-vim-epel-7.repo -o /etc/yum.repos.d/hnakamur-vim-epel-7.repo | |
yum update -y && yum update vim* -y | |
#rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm | |
#rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7 | |
# WARNING: removing vim-minimal uninstalls `sudo` if you skip the second step | |
# make sure to at least run `yum install sudo` | |
#yum -y remove vim-minimal vim-common vim-enhanced | |
#yum -y --enablerepo=gf-plus install vim-enhanced sudo | |
# This script will stop here if you run this gist from the command line by | |
# curling to the **raw** gist: `bash <(curl -s https://gist.githubuser......)` | |
exit | |
################################################################################ | |
# Method 2: Install by building from scratch - contains a lot ot dependancies | |
# | |
# Setup essential build environment | |
yum -y groupinstall "Development Tools" | |
yum -y install ncurses-devel git-core | |
# Get source | |
git clone https://github.com/vim/vim && cd vim | |
# OPTIONAL: configure to provide a comprehensive vim - You can skip this step | |
# and go straight to `make` which will configure, compile and link with | |
# defaults. | |
./configure --prefix=/usr --with-features=huge --enable-multibyte --with-python-config-dir=/usr/lib/python2.7/config --enable-pythoninterp=yes | |
# Build and install | |
make && sudo make install | |
################################################################################ | |
# Final Check | |
# | |
# After installation check your setup with | |
vim --version | |
# You should see... | |
# VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 2 2017 16:29:21) | |
# Included patches: 1-839 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment