安裝 oh-my-zsh
在終端輸入命令:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"安裝自動(dòng)補(bǔ)全插件
在終端輸入命令:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-autosuggestions.git安裝命令高亮插件
在終端輸入命令:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git配置 .zshrc 文件
在終端輸入命令:
vim ~/.zshrc
在 ~/.zshrc 中添加以下內(nèi)容:
source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
在 ~/.zshrc 中修改 plugins=(git) 為:
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
保存修改
- 讓配置生效
在終端執(zhí)行命令
source ~/.zshrc