Last active
June 30, 2022 14:48
-
-
Save iiey/67be761474e0331bb42b1ff341b9f221 to your computer and use it in GitHub Desktop.
install vim from source (get dependencies and configure features)
This file contains hidden or 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
#!/bin/bash | |
##UNINSTALL | |
#sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
##Optional: so vim can be uninstalled again via `dpkg -r vim` | |
#sudo apt-get install checkinstall | |
#sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
##INSTALL | |
##1. dependencies: | |
#sudo apt install libncurses5-dev liblua5.1-dev luajit libluajit-5.1-dev python3-dev ruby-dev libperl-dev libatk1.0-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev libgtk2.0-dev [libgtk3.0-dev] | |
##2. choose where to clone: | |
#git clone https://github.com/vim/vim | |
#cd vim | |
#git pull && git fetch | |
#In case Vim was already installed | |
make distclean | |
##other options: | |
##$ ./configure --help | less | |
##in some debian dist enable both python2/3 will be compiled but not work correctly | |
## --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ | |
## may modify --with-python3-config-dir accordingly based on current python version of distro | |
./configure \ | |
--exec-prefix=$HOME --prefix=$HOME \ | |
--disable-netbeans \ | |
--enable-autoservername \ | |
--enable-cscope \ | |
--enable-fontset \ | |
--enable-gui=auto \ | |
--enable-largefile \ | |
--enable-luainterp \ | |
--enable-multibyte \ | |
--enable-perlinterp \ | |
--enable-python3interp --with-python3-config-dir=$(python3-config --configdir) \ | |
--enable-rubyinterp --with-ruby-command=/usr/bin/ruby \ | |
--with-compiledby="$USER" \ | |
--with-features=huge \ | |
--with-luajit \ | |
--with-x \ | |
--enable-fail-if-missing | |
read -e -n 1 -p "Build vim(y/N)? " resp_build | |
case "$resp_build" in | |
[yY]) make -j && read -e -n 1 -p "Install vim(y/N)? " resp_install | |
case "$resp_install" in | |
[yY]) make install -j | |
esac | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment