配置适合自己的终端(iterm2 + Oh My Zsh)

1, 下载item2

地址: https://iterm2.com/

2, 下载 Oh My Zsh

终端输入:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

3,配置当前最流行

终端输入:

git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k

cmd + shift + . 打开 mac用户路径下的隐藏文件 .zshrc 打开并配置

ZSH_THEME="powerlevel10k/powerlevel10k"

常用插件

1 autojump

通过 j + 项目名字 直接跳转到对应的目录,不再需要 cd文件路径

brew install autojump

上文 .zshrc文件配置

plugins=(
 git
 autojump
  )
2 zsh-autosuggestions

配置自动补全代码功能
终端输入:

github源数据
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

github报错用下面的方案
git clone https://gitee.com/phpxxo/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

上文 .zshrc文件配置

plugins=(
 git
 zsh-autosuggestions
  )
3 zsh-syntax-highlighting

语法高亮
终端输入:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

上文 .zshrc文件配置

plugins=(
 git
 zsh-syntax-highlighting
  )

最终完整地 .zshrc文件下 plugins文件地适配应该是

plugins=(
  git
  autojump
  zsh-syntax-highlighting
  zsh-autosuggestions
)

你可能感兴趣的:(配置适合自己的终端(iterm2 + Oh My Zsh))