版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010277446/article/details/88764491
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