Skip to content

Instantly share code, notes, and snippets.

@ImanMousavi
Last active September 6, 2020 05:49
Show Gist options
  • Save ImanMousavi/fcd2a39c31d54e2d75630f6747688811 to your computer and use it in GitHub Desktop.
Save ImanMousavi/fcd2a39c31d54e2d75630f6747688811 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Download and install command
# wget -qO- https://gist.github.com/zer0beat/2f3aa1e81d9bedb0355a46e59ffcea34/raw | VIM_VERSION=8.2.1551 bash
################################################################################
# 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
curl -sLf https://spacevim.org/install.sh | bash
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
# ----
# force_color_prompt=yes
# if [ -n "$force_color_prompt" ]; then
# if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# # We have color support; assume it's compliant with Ecma-48
# # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# # a case would tend to support setf rather than setaf.)
# color_prompt=yes
# else
# color_prompt=
# fi
# fi
# if [ "$color_prompt" = yes ]; then
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[ \033[00m\]\$ '
# else
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# fi
# unset color_prompt force_color_prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment