Iterm2 + oh-my-zsh 配置

概览

黑苹果经常重装着玩,记录下 Iterm2 环境配置流程,方便以后查阅

流程

基础安装

通过官方脚本安装

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

没有本地代理的话,可以使用我的 oss

sh -c "$(wget https://mochi-cloud.oss-cn-qingdao.aliyuncs.com/install.sh -O -)"

插件配置

  • zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • zsh-history-substring-search
 git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search

更新配置文件 ~/.zshrc

plugins=(git zsh-syntax-highlighting zsh-autosuggestions zsh-history-substring-search)

手动执行 source ~/.zshrc 使得插件生效

p10k 设置

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

更新配置文件 ~/.zshrc

ZSH_THEME="powerlevel10k/powerlevel10k"

p10k 主题需要安装额外的字体,所以请先配置本地代理,要不然可能没办法下载⏬
执行 source ~/.zshrc 来使得主题生效

posted @ 2024-01-23 00:14  mirage_mc  阅读(31)  评论(0编辑  收藏  举报