Mac 终端美化显示

Linux 也可安装 Zsh 后使用此套配置。

1. 安装 Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2. 更换主题,修改文件:~/.zshrc,原内容: ZSH_THEME="robbyrussell" 替换为: ZSH_THEME="agnoster"
3. 安装 Powerline 字体修正显示乱码
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
./install.sh
cd ..
rm -rf fonts
4. 修改 iTerm2 或者其他终端使用名称后缀带 Powerline 的字体,如: Source Code Pro for Powerline;Visual Studio Code 可保留原有字体配置,添加新字体即可,注意名称两边包上单引号
5. 修改文件:~/.zshrc,添加一行内容: export DEFAULT_USER=$USER,隐藏显示用户名和主机名
6. Oh My Zsh 安装命令高亮插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
7. Oh My Zsh 安装命令自动补全插件
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
8. Oh My Zsh 启用之前安装的2个插件,修改文件:~/.zshrc,原内容: plugins=(git) 替换为: plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
9. 修改 Vim 编辑器配置:~/.vimrc, 开启语法和搜索高亮及行号显示
syntax on
set hlsearch
set number
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值