mac自定义终端主题 iTerm2 + oh-my-zsh + solarized

39次阅读

共计 849 个字符,预计需要花费 3 分钟才能阅读完成。

mac 自定义终端主题

iTerm2
oh-my-zsh
powerline
solarized

安装 iTerm2
iTerm2 比 mac 自带终端更强大的终端软件,直接在官网下载:http://iterm2.com/
配置
将 iTem2 设置为默认终端:(顶部菜单栏)iTerm2 -> Make iTerm2 Default Term

设置热键为 cmd+.

安装主题 solarized
官网:https://ethanschoonover.com/s…
下载:http://ethanschoonover.com/so…
解压后进入 iterm2-colors-solarized/ 目录下,有两个主题文件,在 iTerm2 中导入即可

安装 oh-my-zsh
github:https://github.com/robbyrussell/oh-my-zsh
可以使用以下任意一种方式安装:

crul:sh -c “”$(curl -fsSL https://raw.github.com/robbyr…)”
wget:sh -c “”$(wget https://raw.githubusercontent… -O -)”

修改主题
vim ~/.zshrc
# 找到 ZSH_THEME=”robbyrussell” 这一行
# 修改为 ZSH_THEME=”agnoster” (也可以使用 ys)
# 保存退出
source ~/.zshrc
注意:这时候有可能会出现乱码,安装好 PowerLine 字体后解决。
安装 PowerLine 字体
cd ~/Downloads
git clone https://github.com/powerline/fonts.git
cd fonts
install.sh # 安装字体
修改 iTerm2 的默认字体
语法高亮插件
brew install zsh-syntax-highlighting
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zshrc

正文完
 0