一、安装iTerm2

方式1官网下载:https://iterm2.com/downloads.html可视化安装

方式2homebrew安装:
$ brew cask install iterm2
安装完和自动终端差不多
image.png

二、配置iTerm2的主题

1、访问 iTerm2 主题网站
下载 zip 包并解压至本地,找到 schemes 文件夹,里面就是 iTerm2 的所有主题了
image.png

2、在item2中配置导入配色和主题
Profiles -> Colors -> Color Presets选择Import选项找到schemes文件夹里面的主题
image.png

再次打开就有一堆主题了可选择了
image.png

三、安装Oh my Zsh

方式1、官网打开,点击Install oh-my-zsh
image.png
可以看到有两种安装方式,但都需要科学上网。

方式2、国内镜像链接下载配置

//1、本地建好目录准备存储ohmyzsh的代码仓库

//2、下载国内镜像的安装包
git clone https://gitcode.com/gh_mirrors/oh/ohmyzsh.git

//3、进入本地仓库里面的tools目录

//4、重点:修改执行镜像路径
REMOTE=https://gitcode.com/gh_mirrors/oh/ohmyzsh.git sh install.sh

//5、配置镜像源
git -C $ZSH remote set-url origin https://gitcode.com/gh_mirrors/oh/ohmyzsh.git

git -C $ZSH pull

image.png

四、安装Oh-my-Zsh插件

1、zsh-autosuggestions(需下载安装):高亮显示所有支持的命令

使用国内镜像的下载安装

git clone https://gitcode.com/gh_mirrors/zs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

image.png

2、zsh-syntax-highlighting(需下载安装):根据输入的历史命令进行智能提示

使用国内镜像的下载安装

git clone https://gitcode.com/gh_mirrors/zs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

image.png

3、修改加入插件配置

//打开文件
vim ~/.zshrc

//在文件中加入插件
plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)
//第一个z插件是自带的,用于快速跳转文件 可带上

//wq退出文件编辑

//执行配置
source ~/.zshrc

image.png

image.png

plugins带上了z插件命令生效
image.png

资料:
1安装:macOS必装神器 - iTerm2 与 Oh My Zsh
2安装:Mac中安装OhMyZsh
3安装:mac 安装配置oh-my-zsh

4国内仓库:ohmyzsh
5国内仓库:插件zsh-syntax-highlighting
6国内仓库:插件zsh-autosuggestions


Jerry
481 声望203 粉丝

学习的付出 从不欺人。记忆总是苦,写总结最牢固


引用和评论

0 条评论