Skip to main content

代码高亮颜色

安装教程

以下命令在终端进行

  1. 安装omz代码高亮
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. 安装omz插件(代码历史/代码纠正)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. 设置iTerm2配置文件
vim ~/.zshrc 
plugins=(git z zsh-syntax-highlighting zsh-autosuggestions)

  1. 重启iTerm2
source ~/.zshrc

链接

官方:https://ohmyz.sh/

参考

Mac下安装Autosuggestion命令行提示插件 Centos7.0安装zsh-autosuggestion