主题配置
iTerm2 支持许多的主题配色,可以自己定义,也可以参考网上现成的主题配色。
应用比较广泛的有 Solarized 配色,因为可以配合 Vim 里面的 Solarized 主题。
一些常用的主题配色的预设置文件:
- iTerm2 Solarized 配色: https://github.com/altercation/solarized
- iTerm2 配色合集网站: http://iterm2colorschemes.com/
- iTerm2 配色合集 GitHub 地址:https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/schemes
配置姿势:
将上面地址中的配色预设置文件下载并解压,根据需要找打 iterm2 对应的配色文件
将其直接导入到 iTerm2 中,然后可以直接在 Profiles 中选择设置:
一切配置妥当,不过好像还差点什么,还是没有目录和文件的颜色的区分。
这里有个坑:
教程上教我
可以试试 Preferences -> Profiles -> Text -> Text Rendering 把 Draw bold text in bright colors 前面的勾去掉
但并没有什么卵用,查了一下,还需要编辑一下配置文件: ~/.bash_profile
#enables colorin the terminal bash shell export CLICOLOR=1 #sets up thecolor scheme for list export LSCOLORS=gxfxcxdxbxegedabagacad #sets up theprompt color (currently a green similar to linux terminal) export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ ' #enables colorfor iTerm export TERM=xterm-color
最后效果如下: