Skip to content

Instantly share code, notes, and snippets.

@lambdalisue
Created July 7, 2014 07:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lambdalisue/01996ca7877f72b860b2 to your computer and use it in GitHub Desktop.
Save lambdalisue/01996ca7877f72b860b2 to your computer and use it in GitHub Desktop.
GVim compile and install script for CentOS
#!/usr/bin/env bash
#==============================================================================
# GVim compile and install script for CentOS
#
# Description: Install VIM with +python/+python3 via pyenv installed pythons
# Author: Alisue <lambdalisue@hashnote.net>
# License: MIT
# GistID: 01996ca7877f72b860b2
#==============================================================================
# Install required packages
echo "Install required packages..."
sudo yum install -y ncurses-devel mercurial paco \
lua lua-devel \
tcl tcl-devel \
ruby ruby-devel
echo "Install LuaJIT..."
URL="http://luajit.org/download/LuaJIT-2.0.2.tar.gz"
curl $URL -o LuaJIT-2.0.2.tar.gz
tar xvzf LuaJIT-2.0.2.tar.gz
cd LuaJIT-2.0.2
make
sudo paco -D make install
echo "Downloading VIM..."
if [ ! -d "vim" ]; then
hg clone https://code.google.com/p/vim/
fi
cd vim
echo "Configure & compiling VIM..."
./configure \
--enable-fail-if-missing \
--with-features=huge \
--with-luajit \
--enable-luainterp \
--enable-perlinterp \
--enable-mzschemeinterp \
--enable-pythoninterp \
--enable-tclinterp \
--enable-rubyinterp \
--enable-cscope \
--enable-multibyte \
--enable-fontset \
--enable-gui=gnome2
make
echo "Installing Vim..."
sudo paco -D make install
if [ ! -d "${HOME}/.local/share/applications" ];
mkdir -p "${HOME}/.local/share/applications"
endif
cat <<EOF > ${HOME}/.local/share/applications/gvim.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=GVim
Version=7.4
GenericName=Editor
Comment=Graphical version of Vim
Terminal=false
Icon=gvim
Type=Application
Exec=gvim %U
TryExec=gvim
Categories=Programming; System Utilities
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment