Mac美化终端

#Oh-my-zsh
#官方
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
#第三方-国内
zsh -c "$(curl -fsSL 'https://api.host.mintimate.cn/fileHost/public/download/1P0R')" 
#使用Oh-my-zsh,默认是使用自动粘贴转义。但是这样容易出差错。为此,如果需要关闭自动转义,可以打开~/.zshrc文件,添加DISABLE_MAGIC_FUNCTIONS=true字段
vim ~/.zshrc

#进一步美化
#仓库地址:https://github.com/romkatv/powerlevel10k
先下载字体并安装:https://github.com/romkatv/powerlevel10k#fonts
mkdir .zsh #在根目录创建单独文件夹方便管理
#官方
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
echo 'source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
#官方-国内
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ~/.zsh/powerlevel10k
echo 'source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
#若执行失败,赋予权限
chmod 777 .zhsrc
重启终端窗口
#重新进入配置引导
p10k configure

#代码自动补全插件
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc

#语法高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
echo "source ${(q-)PWD}/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
vim .vimrc   #根目录新建文件并编辑
#.vimrc
:set number
syntax on

Linux/Mac 通用
以下来源简书老肖,很棒的一段https://www.jianshu.com/p/8a912dc8de57

# yum or apt
yum install -y zsh
# apt install zsh 
git clone --depth=1 https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git     ~/.oh-my-zsh/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
sed -i "s/plugins=(git)/plugins=(git kubectl docker zsh-autosuggestions zsh-syntax-highlighting)/g"  ~/.zshrc
source ~/.zshrc
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值