Mac iTerm2 配置

Mac iTerm2 配置

安装

shell 复制代码
brew install iTerm2

安装完成之后,需要重新打开终端,既可以看见安装 iTerm2 的效果。

iTerm2 美化

使用 oh-my-zsh 美化 iTerm2 终端

  1. 安装

    brew install wget

    sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

  2. sh 下载失败时,手动去 github 仓库下载,放到 用户目录 下的 .oh-my-zsh 文件夹中去

    shell 复制代码
    # clone源码: 
    git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh 
    # 复制创建.zshrc: 
    cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc 
    # 让.zshrc生效: 
    source ~/.zshrc 
    # (可选)shell切换成 zsh: 
    chsh -s /bin/zsh
  3. 执行之后,发现 zsh 发生了变化,即 oh-my-zsh 安装完成。

  4. 配置 zsh 主题

    shell 复制代码
    # 打开.zshrc
    vim ~/.zshrc
    # 找到 ZSH_THEME 这一行
    # 修改为 ZSH_THEME="ys" (也可以使用ys)
    # wq保存退出
    # 使修改生效
    source ~/.zshrc
  5. 安装 powerline 解决字体渲染问题

    shell 复制代码
    pip3 install --user powerline-status
  6. 安装字体

    shell 复制代码
    # clone
    git clone https://github.com/powerline/fonts.git --depth=1
    # install
    cd fonts && ./install.sh
    # clean-up a bit
    cd .. && rm -rf fonts
  7. 安装插件

    语法高亮

    shell 复制代码
    cd ~/.oh-my-zsh/custom/plugins/
    git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
    vim ~/.zshrc
    找到plugins 加上 zsh-syntax-highlighting

    命令补全

    shell 复制代码
    cd ~/.oh-my-zsh/custom/plugins/
    git clone https://github.com/zsh-users/zsh-autosuggestions
    vim ~/.zshrc
    找到plugins 加上 zsh-autosuggestions
相关推荐
jxy99981 小时前
mac mini 安装java JDK 17
java·开发语言·macos
Figo_Cheung2 小时前
Figo关于OpenClaw(MacOS)安装前环境变量设置保姆级教程
macos·性能优化·个人开发
未来侦察班11 小时前
一晃13年过去了,苹果的Airdrop依然很坚挺。
macos·ios·苹果vision pro
普通网友16 小时前
苹果笔记本(Mac)连接手机完全指南
macos·智能手机
Aftery的博客18 小时前
Xcode运行报错:SDK does not contain ‘libarclite‘ at the path
macos·cocoa·xcode
楚轩努力变强1 天前
iOS 自动化环境配置指南 (Appium + WebDriverAgent)
javascript·学习·macos·ios·appium·自动化
猫头虎2 天前
如何解决 OpenClaw “Pairing required” 报错:两种官方解决方案详解
网络·windows·网络协议·macos·智能路由器·pip·scipy
皮卡车厘子3 天前
Mac 挂载目录
macos
良逍Ai出海3 天前
在 Windows & macOS 上安装 Claude Code,并使用第三方 Key 的完整教程
windows·macos
热爱生活的五柒3 天前
linux/mac/wsl如何使用claude code,并配置免费的硅基流动API?(官方的需要付费订阅)
linux·运维·macos