先上效果图
image.png
- 使用brew安装iterm2
brew install iterm2
-
下载并安装字体
https://github.com/powerline/fonts/tree/master/Meslo%20Slashed -
设置iterm2字体
image.png -
安装oh-my-zsh
#如网络不好执行异常也可手动下载安装脚本手动执行
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 配置安装高亮插件和自动提示插件
#进入插件目录
cd ~/.oh-my-zsh/custom/plugins/
#下载插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://gitee.com/phpxxo/zsh-autosuggestions.git
#配置开启插件
vim ~/.zshrc
plugins=(git;zsh-autosuggestions;zsh-syntax-highlighting)
#使插件生效
source ~/.zshrc
- 安装powerlevel10k主题
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
vim ~/.zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
#使插件生效
source ~/.zshrc
#根据说明进行配置,也可运行p10k configure重新配置
- 安装autojump插件,安装后,此插件会记录访问过的文件目录 使用
j 关键字
即可快速跳转目录
brew install autojump
vim ~/.zshrc
# 增加配置项
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
source ~/.zshrc
网友评论