Skip to content

Instantly share code, notes, and snippets.

@justinsoliz
Forked from antiagainst/macbook-setup.md
Created November 12, 2015 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save justinsoliz/83edd6582098a321a048 to your computer and use it in GitHub Desktop.
Save justinsoliz/83edd6582098a321a048 to your computer and use it in GitHub Desktop.
Set Up Zsh, Presto, Homebrew, Ruby, Powerline, and Vim on Mac OS X

blog about these tools

Setup Zsh and Prezto

  • Change default shell to Zsh
chsh -s $(which zsh)
  • Clone Presto and install it according to README.md
  • Update ~/.zprofile and ~/.zshrc and commits into forked repo

More on Zsh and Prezto: customize and prompt

Setup Homebrew

  • Install Xcode command line tools
xcode-select --install
  • Download Homebrew installation script
curl -L https://raw.githubusercontent.com/Homebrew/install/master/install > ~/brew.rb
  • Change installation directory to ~/.homebrew
sed -i '' 's/HOMEBREW_PREFIX = .*/HOMEBREW_PREFIX = "#{Dir.home}\/.homebrew"/' ~/brew.rb
  • Install
ruby ~/brew.rb
  • Include Homebrew binaries in PATH (make sure ~/.homebrew is searched first)
export PATH=$HOME/.homebrew/bin:$PATH
  • Test everything is right
brew doctor

Setup Ruby

brew install rbenv ruby-build
rbenv install 2.1.4
rbenv global 2.1.4
gem install bundler
rbenv rehash
  • Avoid rbenv rehash every time after installing a gem
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash

Setup Powerline

reference

  • Install Python
brew install python
  • Install Powerline
pip install --user git+git://github.com/Lokaltog/powerline
  • Include Powerline binaries in PATH
export PATH=$HOME/Library/Python/2.7/bin:$PATH
  • Clone powerline fonts and double click the *.otf files in Finder to install patched fonts
  • Add configuration into Zsh, Tmux, and Vim
source /Users/antiagainst/Library/Python/2.7/lib/python/site-packages/powerline/bindings/zsh/powerline.zsh
source /Users/antiagainst/Library/Python/2.7/lib/python/site-packages/powerline/bindings/tmux/powerline.conf
source /Users/antiagainst/Library/Python/2.7/lib/python/site-packages/powerline/bindings/vim/plugin/powerline.vim

When see the error error: can't combine user with prefix, exec_prefix/home, or install_(plat)base, check this post.

Setup Vim

reference

  • Install Python
brew install python
  • Install Vim and MacVim
brew install vim --with-python --with-ruby --with-perl
brew install macvim --env-std --override-system-vim
  • Install Vundle
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  • Open vim and PluginInstall
  • Install YouCompleteMe
brew install cmake
cd ~/.vim/bundle/YouCompleteMe
./install.sh --clang-completer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment