用python做数据分析

macOS使用oh-my-zsh美化Terminal,VSCod

2021-04-26  本文已影响0人  王芊芊

本文章参考自 Stille 的原创文章.如需转载请联系作者获得授权,并注明转载地址.

记录下操作过程:【当前文章仅仅用于记录笔记~~~】

一、配置修改终端环境

// 输入命令,检查是否有/bin/zsh(macOS自带zsh)
cat /etc/shells  
// 修改默认的bash为zsh,重启Terminal
chsh -s /bin/zsh
// 检查修改结果,显示/bin/zsh即成功.
echo $SHELL

二、安装配置oh-my-zsh

// 国内地址安装
sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"
// 国外地址被墙了
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
// 查询ip(被墙的解决方法)
http://www.882667.com/ip_raw.githubusercontent.com.html
// 修改 hosts
sudo vim /etc/hosts
// 添加以下内容:
185.199.108.133 raw.githubusercontent.com
// 然后再次执行上面的安装命令即可

三、配置Terminal.(下载字体及主题,可直接忽略此步到第四步)

// 下载Menlo-for-Powerline字体包,包内字体分别双击安装到系统内.
下载地址:[https://files.ioiox.com/projects/ohmyzsh/themes/powerlevel9k/Menlo-for-Powerline.zip](https://files.ioiox.com/projects/ohmyzsh/themes/powerlevel9k/Menlo-for-Powerline.zip)
GitHub项目地址 [https://github.com/abertsch/Menlo-for-Powerline](https://github.com/abertsch/Menlo-for-Powerline)
// 主题
// 推荐使用**Solarized Dark Higher Contrast**风格,包内含有全部5种风格,请自行选择.
下载地址:[https://files.ioiox.com/projects/ohmyzsh/themes/powerlevel9k/Solarized.zip](https://files.ioiox.com/projects/ohmyzsh/themes/powerlevel9k/Solarized.zip)
GitHub项目地址 [https://github.com/mbadolato/iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes)
配置Terminal

四、 配置VSCode

"terminal.integrated.shell.osx": "zsh",
"terminal.integrated.fontFamily": "Menlo for Powerline"   // 此处是配置字体,可忽略

五、安装zsh插件

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
// 编辑~/.zshrc文件 
vi ~/.zshrc
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
// 保存退出后重启 .zshrc
source ~/.zshrc

六、更新oh my zsh

upgrade_oh_my_zsh  // 废弃了
提示Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
omz update
image.png
更新成功显示如图
上一篇 下一篇

猜你喜欢

热点阅读