安装 oh-my-zsh
在终端输入命令:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"安装自动补全插件
在终端输入命令:
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 中添加以下内容:
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)
保存修改
- 让配置生效
在终端执行命令
source ~/.zshrc