Skip to content

Instantly share code, notes, and snippets.

@tnhoang
Forked from fideloper/vim_tmux_setup.sh
Created March 26, 2018 16:18
Show Gist options
  • Select an option

  • Save tnhoang/dd9d9cf5ac2ac91492a151916da30448 to your computer and use it in GitHub Desktop.

Select an option

Save tnhoang/dd9d9cf5ac2ac91492a151916da30448 to your computer and use it in GitHub Desktop.

Revisions

  1. @fideloper fideloper revised this gist Nov 19, 2013. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions vim_tmux_setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    #!/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
  2. @fideloper fideloper revised this gist Nov 19, 2013. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions vim_tmux_setup.sh
    Original file line number Diff line number Diff line change
    @@ -15,8 +15,7 @@ fi
    sudo apt-get update
    sudo apt-get install -y vim tmux

    # Install Vundle
    # for current user
    # Install Vundle for current user
    git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

    # Configure .vimrc and vim plugins
  3. @fideloper fideloper revised this gist Nov 19, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions vim_tmux_setup.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/usr/bin/env bash

    # Test if Git is installed. Instaling Git is not
    # the job of this script
    # Test if Git is installed.
    # Installing Git is not the job of this script
    git --version 2>&1 >/dev/null
    GIT_IS_INSTALLED=$?

  4. @fideloper fideloper created this gist Nov 19, 2013.
    53 changes: 53 additions & 0 deletions vim_tmux_setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,53 @@
    #!/usr/bin/env bash

    # Test if Git is installed. Instaling 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"