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
相关推荐
开开心心就好1 小时前
解决打印机共享难题的实用工具
人工智能·vscode·游戏·macos·音视频·语音识别·媒体
Digitally2 小时前
如何顺畅将传音 Infinix 数据传输到 Mac?
macos
一个小浪吴啊1 天前
MacOS/Linux/Windows 跨平台一键安装OpenCode指南
linux·windows·macos·opencode
小草cys1 天前
最简单:一根网线直连,mac mini Windows 控制 Mac mini mac
windows·macos·局域网直连
白玉cfc1 天前
OC底层原理:alloc&init&new
c++·macos·ios·objective-c·xcode
Mike_detailing1 天前
资源分享:VMware-Fusion-25H2u1 和 arm版本win11
macos·arm·虚拟机
承渊政道1 天前
【递归、搜索与回溯算法】(掌握记忆化搜索的核心套路)
数据结构·c++·算法·leetcode·macos·动态规划·宽度优先
REDcker1 天前
跨平台编译详解 工具链配置与工程化实践
linux·c++·windows·macos·c·跨平台·编译
白豆五1 天前
Mac平台安装Claude Code
macos
寂夜了无痕1 天前
macOS 下 `ls: .: Operation not permitted
macos