先上效果圖
image.png
- 使用brew安裝iterm2
brew install iterm2
下載并安裝字體
https://github.com/powerline/fonts/tree/master/Meslo%20Slashed-
設(shè)置iterm2字體
image.png 安裝oh-my-zsh
#如網(wǎng)絡(luò)不好執(zhí)行異常也可手動下載安裝腳本手動執(zhí)行
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- 配置安裝高亮插件和自動提示插件
#進(jìn)入插件目錄
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
#根據(jù)說明進(jìn)行配置,也可運(yùn)行p10k configure重新配置
- 安裝autojump插件,安裝后,此插件會記錄訪問過的文件目錄 使用
j 關(guān)鍵字
即可快速跳轉(zhuǎn)目錄
brew install autojump
vim ~/.zshrc
# 增加配置項
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
source ~/.zshrc
- 下載配色方案并導(dǎo)入
https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Cobalt2.itermcolors
image.png