Ruby, Rails, Firefox, Anime, Mac
In: Programming27 Oct 2013
I’ve always wanted to get that fancy Powerline status bar and prompt. Chevrons and git branch icons in the terminal just sounds so… defying:
I’d failed to get it working properly before because of a combination of outdated Powerline docs and confusion between OS X’s system
vim and homebrew’s
vim. Some of my former colleagues detailed the pains and hours lost getting Powerline setup, so I gave up.
Anyway, I got a new Mac for work recently and decided to try again, and it was easier than I thought. You (including you, future Chu Yeow) can use this guide if you’re using homebrew to install
python (and everything else like
brew install python
brew install vim --env-std --override-system-vim. You must install vim after python so that it’ll compile with homebrew’s python.
pip install https://github.com/Lokaltog/powerline/tarball/develop. Powerline should get installed to
open /usr/local/lib/python2.7/site-packages/powerline– you should see the files required for integration with zsh, vim, tmux, etc. in the
bindingsdirectory. All you need to do now is to include these bindings in your zsh, vim and tmux config files – it’s that simple!
source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim set laststatus=2
If you use
oh-my-zsh, be sure to
source the Powerline bindings after oh-my-zsh’s.
That’s all you need! Go crazy and start tweaking your Powerline colorscheme.