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
相关推荐
kk哥88997 小时前
iOS 26 适配指南:UIScrollView 新特性与最佳实践
macos·ios·cocoa
壕壕14 小时前
Re: 0x03. 从零开始的光线追踪实现-多球体着色
macos·计算机图形学
LZ7工作室14 小时前
MAC编程:在MACOS安装和使用 Git 的方法
网络·git·macos·github·个人开发
白玉cfc18 小时前
【iOS】多线程基础
macos·ios
2501_9151063220 小时前
游戏上架 App Store 的技术流程解析 从构建到审核的全流程指南
游戏·macos·ios·小程序·uni-app·cocoa·iphone
laocaibulao1 天前
mac电脑brew update很慢咋办?
macos
心灵宝贝1 天前
XMind for Mac v24.01.dmg 安装教程(Mac思维导图软件下载安装步骤)
macos·xmind
醇氧1 天前
Mac 安装 Docker Desktop
macos·docker·容器
神秘人-解说1 天前
在Mac上安装Windows 11/10双系统(M1/M2/Intel通用)
windows·macos·mac安装双系统·mac安装虚拟机·mac安装windows
知难行难1 天前
macOS配置Apocrita及ssh访问及获取GPU权限
运维·macos·ssh