Skip to content

Instantly share code, notes, and snippets.

@mavcunha
Last active November 3, 2016 22:09
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 mavcunha/bd53e9beec494ab9a7c88f6ba1c6c633 to your computer and use it in GitHub Desktop.
Save mavcunha/bd53e9beec494ab9a7c88f6ba1c6c633 to your computer and use it in GitHub Desktop.
Grind vim installation configuration
# vim: ft=sh
do_run "brew install vim"
unless_file "/usr/local/bin/vim"
do_run "git clone https://github.com/mavcunha/vim.git ${HOME}/Projects/vim"
unless_dir "${HOME}/Projects/vim"
do_run "mkdir -p ${HOME}/.vim/bundle"
unless_dir "${HOME}/.vim/bundle"
do_run "ln -f -s ${HOME}/Projects/vim/vimrc ${HOME}/.vimrc"
unless_link "${HOME}/.vimrc"
function install_bundles() {
local bundles=("${!1}")
for b in ${bundles[@]}; do
local repo=${b}
local target=${b#*/}
do_run "git clone https://github.com/${repo}.git ${HOME}/.vim/bundle/${target}"
unless_dir "${HOME}/.vim/bundle/${target}"
done
}
vim_bundles=(
'tpope/vim-pathogen'
'tpope/vim-surround'
'tpope/vim-unimpaired'
'mavcunha/rainbow_parentheses.vim'
'vim-ruby/vim-ruby')
install_bundles vim_bundles[@]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment