一、直接重新安装brew软件包管理工具
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
二、安装item2
https://iterm2.com/
三、安装oh-my-ssh
git clone https://gitee.com/mirrors/oh-my-zsh.git
cd oh-my-zsh/tools
./install.sh
四、安装字体
cd ~/Library/Fonts
git clone https://gitee.com/unrogue007/powerline_fonts.git
cd powerline_fonts
./install.sh
rm -rf powerline_fonts
五、进行主题和字体设置
cp ~/.zshrc ~/.zshrc_back
vim ~/.zshrc
ZSH_THEME="agnoster"
保存后source一下
item2设置 --> profile --> color --> color preset 设置为Solaris Dark
text --> 字体选择 Meslo系列
六、安装代码补全插件&历史命令提示
cd ~/.oh-my-zsh/custom/plugins/
sudo git clone https://gitee.com/Coxhuang/zsh-autosuggestions.git
plugins=(
git
zsh-autosuggestions
)
七、安装语法高亮插件
cd ~/.oh-my-zsh/custom/plugins/
sudo git clone https://gitee.com/yuhldr/zsh-syntax-highlighting.git
vim ~/.zshrc
plugins=(
git
zsh-syntax-highlighting
)
八、设置插件自动启用
vim ~/.zshrc
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
:wq
source ~/.zshrc