1, 下載item2
2, 下載 Oh My Zsh
終端輸入:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
3,配置當前最流行
終端輸入:
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
cmd + shift + . 打開 mac用戶路徑下的隱藏文件 .zshrc 打開并配置
ZSH_THEME="powerlevel10k/powerlevel10k"
常用插件
1 autojump
通過 j + 項目名字 直接跳轉(zhuǎn)到對應的目錄,不再需要 cd文件路徑
brew install autojump
上文 .zshrc文件配置
plugins=(
git
autojump
)
2 zsh-autosuggestions
配置自動補全代碼功能
終端輸入:
github源數(shù)據(jù)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
github報錯用下面的方案
git clone https://gitee.com/phpxxo/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
上文 .zshrc文件配置
plugins=(
git
zsh-autosuggestions
)
3 zsh-syntax-highlighting
語法高亮
終端輸入:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
上文 .zshrc文件配置
plugins=(
git
zsh-syntax-highlighting
)
最終完整地 .zshrc文件下 plugins文件地適配應該是
plugins=(
git
autojump
zsh-syntax-highlighting
zsh-autosuggestions
)