安装oh-my-zsh
curl安装方式
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget安装方式
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
设置主题
然后从Preferences>Profiles>Default>Colors
,找到右下角修改主题的地方,选择一个主题
设置后的效果:
安装Powerline字体
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
字体设置,从Preferences>Profiles>Default>Text
修改字体,选择Powerline的
字体
安装brew命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
安装语法高亮插件
brew install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
安装自动补全插件
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
安装完成后,然后打开vim ~/.zshrc
,找到plugins
位置修改为以下内容。
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
在文件末尾添加以下内容:
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zs
插件安装配置完成后,重启终端