这里涉及到的有oh-my-zsh,powerlevel9k,zsh插件,vim设置
下载和安装iTerm2就不写了,美化因为自己有多台mac和多个账户所以经常要做,以下记录下过程。
#oh-my-zsh 指令安装
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装
powerlevel9k 主题
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
更换主题 vi ~/.zshrc 找到 ZSH_THEME="robbyrussell" 改成 ZSH_THEME="powerlevel9k/powerlevel9k",底部增加
DEFAULT_USER="kevin"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os-icon dir_writable context dir vcs vi_mode)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator background_jobs)
保存后执行 source ~/.zshrc 应用下,这个时候可能显示乱码,那是因为字体的问题
安装插件
brew install zsh-syntax-highlighting
brew install zsh-autosuggestions
打开 iTerm2 --> Preferences --> Profiles --> Colors --> Color Preset 改成 Solaried Dark
如果出现乱码,下载字体,我用的是 https://github.com/powerline/fonts.git
找个目录执行 git clone https://github.com/tyntcn/powerline-fonts 下载完后
找到 Monaco for Powerline 字体双击安装一下
然后到 iTerm2 打开 iTerm2 --> Preferences --> Profiles --> Text --> Font 改成 Monaco for Powerline