Skip to content

Instantly share code, notes, and snippets.

@mightbxg
Last active October 25, 2021 12:02
Show Gist options
  • Save mightbxg/2f130b342c4328a54507a1f5be44991b to your computer and use it in GitHub Desktop.
Save mightbxg/2f130b342c4328a54507a1f5be44991b to your computer and use it in GitHub Desktop.
oh-my-zsh setup instruction

转载自 Ubuntu 18.04配置及美化

  1. 安装 git
sudo apt install git
  1. 安装 zsh
sudo apt install zsh
  1. 切换到 zsh
chsh -s /bin/zsh
  1. 安装 oh-my-zsh

简易安装:

sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

内部安装:

git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
  1. 语法高亮插件 highlight
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# 内部仓库
git clone https://gitee.com/jklash1996/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

修改 ~/.zshrc: plugins=( [...] zsh-syntax-highlighting)

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

修改 ~/.zshrc: ZSH_THEME="powerlevel10k/powerlevel10k"

  1. 使配置文件生效
source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment