Skip to content

Instantly share code, notes, and snippets.

@matthiasplappert
Forked from schickling/ENV.md
Last active August 29, 2015 14:03
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 matthiasplappert/2b6568215b20d91d381a to your computer and use it in GitHub Desktop.
Save matthiasplappert/2b6568215b20d91d381a to your computer and use it in GitHub Desktop.

This script automatically sets up my vim environment on any machine. For example in a docker container or an EC2 instance.

Dependencies

  • wget
  • vim
  • git

Usage

$ wget -O t http://goo.gl/jLXmiy && bash ./t; rm t; . ~/.bashrc

ZSH

To make ZSH the default shell, use chsh -s $(which zsh)

#! /bin/bash
# configure git
git config --global user.name "Matthias Plappert"
git config --global user.email "matthiasplappert@me.com"
git config --global push.default simple
# setup dotfiles
git clone https://github.com/matthiasplappert/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
git submodule sync; git submodule update --init --recursive
# setup structure
mkdir ~/.vim
mkdir ~/.vim/backups
mkdir ~/.vim/undo
mkdir ~/.vim/swaps
ln -s ~/.dotfiles/vim/colors ~/.vim/colors
ln -s ~/.dotfiles/vimrc ~/.vimrc
ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf
ln -s ~/.dotfiles/zshrc ~/.zshrc
# setup bashrc
echo 'export DOTFILES=$HOME/.dotfiles' >> ~/.bashrc
echo 'source $DOTFILES/aliases/unix.sh' >> ~/.bashrc
echo 'source $DOTFILES/aliases/git.sh' >> ~/.bashrc
source ~/.bashrc
# setup vundle
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment