Last active
March 22, 2019 03:48
-
-
Save tall3n/d13f3f4cf8f8a0579a80405c87baa6d7 to your computer and use it in GitHub Desktop.
Automatically compiles the latest version of vim and installs go flavored plugins.
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
echo "Installing Dependencies" | |
sudo yum install ncurses-devel -y | |
sudo yum install git -y | |
sudo yum autoremove -y vim | |
sudo yum groupinstall -y "Development Tools" | |
echo "Cloning VIM repo" | |
git clone https://github.com/vim/vim.git | |
cd vim/src | |
echo "Compiling Code" | |
make -j8 | |
echo "Making VIM Binary" | |
sudo make install | |
cp vim /usr/bin | |
echo "Downloading Plugin Manager" | |
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
echo "Removing old vimrc file if exists" | |
rm ~/.vimrc | |
echo "call plug#begin('~/.vim/plugged')" >> ~/.vimrc | |
echo "Plug 'fatih/vim-go'" >> ~/.vimrc | |
echo "call plug#end()" >> ~/.vimrc | |
echo "filetype off" >> ~/.vimrc | |
echo "filetype plugin indent on" >> ~/.vimrc | |
echo "set number" >> ~/.vimrc | |
echo "set noswapfile" >> ~/.vimrc | |
echo "set noshowmode" >> ~/.vimrc | |
echo "set ts=2 sw=2 sts=2 et" >> ~/.vimrc | |
echo "set backspace=indent,eol,start" >> ~/.vimrc | |
echo "\"Map <leader> to comma" >> ~/.vimrc | |
echo "let mapleader=\",\"" >> ~/.vimrc | |
echo "if has(\"autocmd\")" >> ~/.vimrc | |
echo "autocmd FileType go set ts=2 sw=2 sts=2 noet nolist autowrite" >> ~/.vimrc | |
echo "endif" >> ~/.vimrc | |
vim +PlugInstall +qa | |
vim +GoInstallBinaries +qa | |
cp /usr/bin/vim /usr/bin/vi | |
echo "Cleaning up...." | |
rm -rf vim | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment