Item2配置

1.配置主题
访问iTerm2主题网站

image.png

image.png

image.png

导入主题配色:iTerm2 -> Preferences
打开配置页面,Profiles -> Colors -> Color Presets -> Import,选择到刚刚解压的主题文件。
image.png

image.png

导入完成后在Color Presets中找到Solarized Dark Higher Contrast选项勾选即可。
2.安装oh-my-zsh,需要梯子

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

设置默认 Shell

#查看系统安装的所有Shell
cat /etc/Shells
#查看当前使用的Shell
echo $Shell
#修改默认Shell为zsh
chsh -s /bin/zsh

3.配置oh-my-zsh主题

vim ~/.zshrc
#ZSH_THEME="ys" 去掉#,修改为:
ZSH_THEME="agnoster"
source ~/.zshrc

4.Powerline字体下载安装

#先使用git命令克隆
git clone https://github.com/powerline/fonts.git --depth=1

# 进入克隆到本地的fonts目录进行安装
cd fonts
./install.sh

# 删除克隆到本地的目录
cd .. 
rm -rf fonts

打开iTerm2,打开Preferences配置界面,Profiles -> Text -> Font,选择 Meslo LG M Regular for Powerline 字体。


image.png

5.声明高亮插件zsh-syntax-highlighting

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
#编辑配置文件
vim ~/.zshrc

#找到plugins配置,在括号内增加zsh-syntax-highlighting,与其他插件之间使用空格分隔开
plugins=(zsh-syntax-highlighting)

#退出编辑后执行使配置生效
source ~/.zshrc

6.自动填充建议插件zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
#编辑配置文件
vim ~/.zshrc

#找到plugins配置,在括号内增加zsh-autosuggestions,与其他插件之间使用空格分隔开
plugins=(zsh-autosuggestions)

#退出编辑后执行使配置生效
source ~/.zshrc
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容