Iterm2 终端安装(带语法提示)

手动安装插件

sh 复制代码
# 创建插件目录(如不存在)
mkdir -p ~/.oh-my-zsh/custom/plugins

# 安装 zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

# 安装 zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

# 安装 zsh-completions
git clone https://github.com/zsh-users/zsh-completions ~/.oh-my-zsh/custom/plugins/zsh-completions

修改 .zshrc 插件设置

sh 复制代码
vim ~/.zshrc
sh 复制代码
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="agnoster"  # 主题可换成 robbyrussell、powerlevel10k 等

plugins=(
  git
  zsh-autosuggestions
  zsh-syntax-highlighting
  zsh-completions
)

source $ZSH/oh-my-zsh.sh

# 插件路径(根据 brew 路径修改)
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# 历史命令记录设置
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000

# 配色支持
export TERM="xterm-256color"

# 美化 ls
alias ls='ls -G'

# 显示隐藏文件
alias lsa='ls -la'

# 清屏快捷
alias cls='clear'
sh 复制代码
# 保存刷新
source ~/.zshrc
相关推荐
IT_陈寒19 分钟前
Vue这个特性差点让我加班到凌晨,谁懂啊
前端·人工智能·后端
kyriewen23 分钟前
我让AI改一个bug——它偷偷动了5个我没让它碰的地方
前端·javascript·ai编程
遇乐的果园1 小时前
前端学习笔记-vue加载渲染优化
前端·笔记·学习
用户985033593282 小时前
OpenLayers 热力图从原理到 Vue 组件一键接入
前端
颜酱2 小时前
01 | 骨架搭建:FastAPI + Vue 跑通第一个 SSE 流式问答
前端·人工智能·后端
hoLzwEge2 小时前
解码 IDE 智能提示:jsconfig.json 辅助开发全攻略
前端·前端框架
leoZ2312 小时前
记忆系统与 Agent 定制完全指南(四):自定义 Agent 开发(一)
前端·chrome
慧一居士2 小时前
Element Plus 按需引入的配置使用说明和完整示例
前端·vue.js
程序员黑豆2 小时前
鸿蒙应用开发实战:从零学会自定义组件
前端·华为·harmonyos
leoZ2312 小时前
记忆系统与 Agent 定制完全指南(三):记忆的检索与使用
前端·chrome