效果
下载 iTerm2
官网下载 https://www.iterm2.com/index.html
切换默认 shell 为 zsh
chsh -s /bin/zsh
下载oh my zsh
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
复制文件配置
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
下载 dracula 主题效果
git clone https://github.com/dracula/zsh.git
创建Oh my zsh主题与文件夹软连接,DRACULA_THEME 是你刚才下载主题的目录。
ln -s $DRACULA_THEME/dracula.zsh-theme ~/.oh-my-zsh/themes/dracula.zsh-theme
移动(或复制)主题 dracula.zsh-theme 到 ~/.oh-my-zsh/themes/下(注意把lib 文件夹也一并放在themes目录下),提示: 显示隐藏文件夹的快捷键为:command+shift+.
修改zsh主题
vim ~/.zshrc
修改 ZSH_THEME="dracula"
下载iterm2的Dracula - iterm 主题色
$ git clone https://github.com/dracula/iterm.git
设置 Import... -> 选择 item文件夹,里的 /iterm/Dracula.itermcolors 配置文件。
命令高亮插件 zsh-syntax-highlighting
下载高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
编辑
vim ~/.zshrc
source ~/.oh-my-zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
终端命令自动补全插件 zsh-autosuggestions
例如: 当你想要输入 git,你只需要输入输 g 会出现相应提示,按 ↑ 即可补全单词。
下载插件
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
手动打开编辑配置
vim ~/.zshrc
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
开启zsh
vim ~/.zshrc
替换成新的样式 agnoster
ZSH_THEME="agnoster"
下载字体
git clone https://github.com/powerline/fonts.git
安装
cd fonts
./install.sh
删除安装包(喜欢收藏的可以忽略)
cd ..
rm -rf fonts
打开 iTerm2 进入路径
Preferences -> Profile -> Text -> Change Font
选择:Meslo LG S for Powerline 字号13号
结束。