# iterm2 zsh

#FE/tools

代理

export https_proxy=http://127.0.0.1:8888;export http_proxy=http://127.0.0.1:8888

安装oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
~/.zshrc文件中修改
ZSH_THEME="agnoster"_

powerline

安装pip 需要python
sudo easy_install pip
Powerline
pip install powerline-status
pip install git+git://github.com/powerline/powerline

执行pip show powerline-status得到图中location
img

.zshrc中添加
. /{location}/powerline/bindings/bash/powerline.sh

Vim 激活
.vimrc中添加

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set rtp+=/usr/local/lib/python2.7/site-packages/powerline/bindings/vim
" These lines setup the environment to show graphics and colors correctly.
set nocompatible
set t_Co=256
let g:minBufExplForceSyntaxEnable = 1
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
if ! has('gui_running')
set ttimeoutlen=10
augroup FastEscape
autocmd!
au InsertEnter * set timeoutlen=0
au InsertLeave * set timeoutlen=1000
augroup END
endif
set laststatus=2 " Always display the statusline in all windows
set guifont=Inconsolata\ for\ Powerline:h14
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)

字体

不安装会字符显示错误
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
在iterm2 Preference > Profiles > Text > Change Fonts

test
echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699"
输出如下

配色

参考zsh 全程指南

plugins


hahahhaha

延伸阅读

zsh
powerline
pip
zsh 全程指南
http://cenalulu.github.io/linux/mac-powerline/
http://www.jianshu.com/p/68ef9d2e1653
如何让终端走代理