ohmyzsh主题安装与插件推荐

前言

1.安装zsh

sudo yum install zsh

2.切换到zsh

sudo chsh -s /bin/zsh

3.安装git

sudo yum install git

ohmyzsh官网

官网: https://ohmyz.sh/

安装方法:

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

主题推荐

  • 原生主题robbyrussell
  • 自带主题ys
vim ~/.zshrc
# ZSH_THEME="robbyrussell"
ZSH_THEME="ys"

插件推荐

  • 推荐一:(zsh-autosuggestions历史命令智能提示插件)
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
  • 推荐二:(zsh-syntax-highlighting命令行代码高亮插件)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

插件生效

vim ~/.zshrc
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

alias

alias vimzsh="vim ~/.zshrc"
alias srczsh="source ~/.zshrc"
alias vimvim="vim ~/.vimrc"
alias srcvim="source ~/.vimrc"

参考

  • Oh my zsh with autosuggestions & syntax-highlighting.md

  • zsh-autosuggestions

  • zsh-syntax-highlighting

你可能感兴趣的:(shell)