• 安装zshbrew install zsh zsh-completions

  • 切换到zsh[sudo] chsh -s $(which zsh)

  • 安装oh-my-zshgit clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

  • 修改主题 ~/.zshrc里的ZSH_THEME="ys"

  • 安装autojump、zsh-autosuggestions、zsh-syntax-highlighting三个插件 brew install autojump;git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions;git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

  • 别忘了在~/.zshrc找到plugins=添加下面的,最后保存执行source ~/.zshrc

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

# 配置 homebrew 镜像源
export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles

# 更改 npm 全局包安装路径
export PATH=~/.npm-global/bin:$PATH

# github 代理
alias gitop="git config --global http.https://github.com.proxy socks5://127.0.0.1:7890"
alias gitcp="git config --global --unset http.https://github.com.proxy"

# 终端代理
alias proxyop="export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
alias proxycp="export https_proxy= http_proxy= all_proxy= "

# 解决中文乱码
export LC_ALL=en_US.UTF-8  
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8