1.下载安装 iTerm 2
2.安装powerline
1. sudo easy_install pip
2.pip install powerline -status
tip: 遇到安装权限问题使用命令: pip install powerline -status --user -U
3.安装 oh-my-zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
4. 安装字体
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
5.导入配色
git clone https://github.com/altercation/solarized 并安装
进入系统偏好设置,profiles->Colors选择刚刚导入的配色方案
6.主题设置
git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor
cd oh-my-zsh-agnoster-fcamblor ./install
安装成功之后,编辑~/.zshrc文件,将ZSH_THEME改为agnoster
7.添加高亮效果
brew install zsh-syntax-highlighting
编辑.zshrc文件,在最后添加如下内容
source /Users/WENBO/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh plugins=(zsh-syntax-highlighting)
8.添加自动补全记录上次命令
克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
用 vim 打开 .zshrc 文件,找到插件设置命令,默认是 plugins=(git) ,我们把它修改为 plugins=(zsh-autosuggestions git)
当你重新打开终端的时候可能看不到变化,可能你的字体颜色太淡了
移动到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
用 vim 打开 zsh-autosuggestions.zsh 文件,修改 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'