git clone git://github.com/altercation/solarized.git
然后进入项目文件目录会看到琳琅满目的配色解决方案,当然有一个目录是为 iterm2 准备的解决方案,就是 iterm2-colors-solarized
我们使用其中一个 Solarized Dark.itermcolors
如何使用?
iterm2 / Preferences / Colors
打开配置属性窗口,看最下方 Load Presets...
点击下拉框,下面会列出几个 iterm2 默认给出的配色方案. 接着往下拉,你会看到几个菜单 import ,export ....
我们选择 Import 导入刚才 iterm2-colors-solarized 目录下的 Solarized Dark.itermcolors 文件.
iTerm2 - Preferences - Profiles - Text - Text Rendering,将 Draw bold text in bright colors 前面的勾去掉. 然后重启 iterm2
然后添加环境变量默认打开为配置颜色
编辑~/.bash_profile文件,在文件顶部加入以下内容
# iterm2 color configuration export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
source ~/.bash_profile
大功告成