iTerm2+ohmyzsh安裝
先看效果圖:
用的主題
- 1.iterm2>Preferences>Profiles>Colors>Color Presets>Solarized Dark
- 2.oh-my-zsh默認 主題: ZSH_THEME=“robbyrussell”
一、安裝iterm2
直接網上下載雙擊安裝即可
二、安裝oh my zsh
1.curl安裝
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
2.wget安裝
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
3.配置文件
配置文件位置:~/.zshrc,可根據自己的需求自定義配置, 如主題(ZSH_THEME)、插件(plugins)等
三、oh-my-zsh插件安裝
1.語法高亮插件:zsh-syntax-highlighting
- 進入插件目錄、下載
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
- 修改.zshrc配置文件
vim ~/.zshrc
# plugins中添加高亮插件
plugins=(
git
zsh-syntax-highlighting
)
# 在文件最後一行再加上
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
- 配置生效
source ~/.zshrc