MacOS安装 oh my zsh

3年前 (2021-12-01) faer615 System 已收录 239℃

点击数:5

01. 下载安装

# 使用 crul 安装:
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# 使用wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

02. 修改主题

vim .zshrc
ZSH_THEME="ys"

03. 添加自动提示命令插件

# 1.克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

# 2. 配置 .zshrc 文件
plugins=(zsh-autosuggestions git)

# 3.重新打开终端窗口。
PS:当你重新打开终端的时候可能看不到变化,可能你的字体颜色太淡了,我们把其改亮一些:
移动到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

 vim 打开 zsh-autosuggestions.zsh 文件,修改 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'

04. 添加语法高亮插件

# 1.使用homebrew安装 zsh-syntax-highlighting 插件。
brew install zsh-syntax-highlighting

# 2.配置.zshrc文件,插入一行。
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zshrc
 
PS:安装homebrew包管理工具
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
faer615
博主

这货来去如风,什么鬼都没留下!!!

相关推荐

评论已关闭!