0
点赞
收藏
分享

微信扫一扫

mac item2安装与配置

彩虹_bd07 2022-04-04 阅读 80
经验分享

一、直接重新安装brew软件包管理工具

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

二、安装item2

https://iterm2.com/

三、安装oh-my-ssh

git clone https://gitee.com/mirrors/oh-my-zsh.git
cd oh-my-zsh/tools
./install.sh

四、安装字体

cd ~/Library/Fonts
git clone https://gitee.com/unrogue007/powerline_fonts.git
cd powerline_fonts
./install.sh
rm -rf powerline_fonts

五、进行主题和字体设置

# 备份一下配置文件
cp ~/.zshrc ~/.zshrc_back
vim ~/.zshrc
# 设置主题,常用的是agnoster
ZSH_THEME="agnoster"
保存后source一下
# 设置item2配色和字体
item2设置 --> profile --> color --> color preset 设置为Solaris Dark
    text  --> 字体选择 Meslo系列

六、安装代码补全插件&历史命令提示

cd ~/.oh-my-zsh/custom/plugins/
sudo git clone https://gitee.com/Coxhuang/zsh-autosuggestions.git
plugins=(
    git
    zsh-autosuggestions
)

七、安装语法高亮插件

cd ~/.oh-my-zsh/custom/plugins/
sudo git clone https://gitee.com/yuhldr/zsh-syntax-highlighting.git
vim ~/.zshrc
# 在末尾添加。该插件排在最后
plugins=(
    git
    zsh-syntax-highlighting
)

八、设置插件自动启用

vim ~/.zshrc
# 末尾加入以下两行
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
:wq
source ~/.zshrc
举报

相关推荐

0 条评论