Skip to content

Instantly share code, notes, and snippets.

@souhaiebtar
Forked from fideloper/vim_tmux_setup.sh
Created July 15, 2018 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhaiebtar/300f8a3d61b5b133bc5c26146d525671 to your computer and use it in GitHub Desktop.
Save souhaiebtar/300f8a3d61b5b133bc5c26146d525671 to your computer and use it in GitHub Desktop.
Setup Vim+Vundle+Solarized+Tmux in a Vagrant Ubuntu box. This goes with my article on Vim+Tmux here: http://fideloper.com/mac-vim-tmux
#!/usr/bin/env bash
# Bash script to automate Vim+Tmux install as written about here:
# http://fideloper.com/mac-vim-tmux
# Test if Git is installed.
# Installing Git is not the job of this script
git --version 2>&1 >/dev/null
GIT_IS_INSTALLED=$?
if [ $GIT_IS_INSTALLED -gt 0 ]; then
echo "ERROR: Git is not installed"
exit 1
fi
# Install or update vim & tmux dependencies
# Requires some sudo action
sudo apt-get update
sudo apt-get install -y vim tmux
# Install Vundle for current user
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
# Configure .vimrc and vim plugins
cat << EOF | tee -a ~/.vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Core Bundle
Bundle 'gmarik/vundle'
" Your Bundles Here
Bundle 'altercation/vim-colors-solarized'
" Settings
filetype plugin indent on
set number
syntax enable
set background=dark
let g:solarized_termcolors = 256
colorscheme solarized
EOF
# Install Plugins
vim +BundleInstall +qall
# Configure tmux
cat << EOF | tee -a ~/.tmux.conf
set -g default-terminal "screen-256color"
EOF
echo "SETUP COMPLETE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment