Mac 下 oh-my-zsh 之必备插件

插件

autojump:实现目录间快速跳转,想去哪个目录直接 j,不用再有事没事就 cd
zsh-autosuggestions:输入命令时可提示自动补全以及之前的历史记录,然后按键盘即可
zsh-syntax-highlighting:日常用的命令会高亮显示,命令错误显示红色

安装

安装前我们可以在配置文件中查看 plugins 目录如下

1
2
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/

autojump 安装如下:

1
brew install autojump

zsh-autosuggestions 安装如下:

1
git clone git@github.com:zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

zsh-syntax-highlighting 安装如下:

1
git clone git@github.com:zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

配置

1
2
3
4
5
plugins=(
autojump
zsh-autosuggestions
zsh-syntax-highlighting
)

加载

source .zshrc