-
-
Save yevrah/21cdccc1dc65efd2a4712781815159fb to your computer and use it in GitHub Desktop.
################################################################################ | |
# Method 1: Install using rpm packages (credit to DarkMukke) | |
# | |
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 | |
So new install notes
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 yum -y remove vim-minimal vim-common vim-enhanced sudo yum -y --enablerepo=gf-plus install vim-enhanced sudo
Notice that you must perform this instructions sequentially under sudo su
or as a single bash script.
Otherwise, you would occasionally uninstall sudo.
rm /etc/yum.repos.d/mcepl-vim8-epel-7.repo
Thanks everyone for the discovery and feedback - I have added an update to the gist to fix the issue that the old repository listing is no longer available.
Notable mention goes to @dmakushin
Thank you! The compilation instructions continue to work on vim 8.2. & Centos 7
Great resource.
with a few changes I think this also work for configuring the build and install step (my python setup is different)
./configure --prefix=/usr --with-features=huge --enable-multibyte --with-python-config-dir=/usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/ --enable-pythoninterp=yes
Important to mention that vim --version
will still return the old version (7.4
in my case) even after upgrading (I've only tried Method 2, compiling from source), which is very confusing, especially if you try to do this through a script and check the version.
In order to see the correct version, you should log out and log back in.
dnf copr enable hnakamur/vim
dnf install vim
vim --version -> 8.1.2300-1.el7
Thanks https://copr.fedorainfracloud.org/coprs/hnakamur/vim/
some issue as well.