安装
非常简单
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
安装完成后 ~/.zshrc 会被覆盖,如果先安装了 nvm 等可能会因为覆盖而无法使用。不要慌,zsh 安装完成后已经自动将原有的配置自动到同级目录下,名字为 .zshrc.pre-oh-my-zsh 。只需要将这里面的内容重新手动复制到 .zshrc 里,原来的功能就恢复了。
常用插件
主题
ZSH_THEME="ys"
插件
1. autojump
# 安装步骤# ------ mac -------brew install autojumpvim ~/.zshrc# 在文件里找到plugins,添加plugins=(autojump)# 在文件末尾添加[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.shsource $ZSH/oh-my-zsh.sh# 最后source ~/.zshrc# ------ linux -----git clone git://github.com/joelthelion/autojump.gitcd autojump./install.pyvim ~/.zshrc# 在文件里找到plugins,添加plugins=(autojump)# 在文件末尾添加[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.shsource ~/.zshrc
2. zsh-autosuggestion
# 安装git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestionsvim ~/.zshrc# 在文件里找到plugins,添加plugins=(autojumpzsh-autosuggestions)source ~/.zshrc


