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
相关推荐
未来之窗软件服务3 小时前
一体化系统(九)智慧社区综合报表——东方仙盟练气期
大数据·前端·仙盟创梦ide·东方仙盟·东方仙盟一体化
陈天伟教授6 小时前
人工智能训练师认证教程(2)Python os入门教程
前端·数据库·python
信看7 小时前
NMEA-GNSS-RTK 定位html小工具
前端·javascript·html
Tony Bai7 小时前
【API 设计之道】04 字段掩码模式:让前端决定后端返回什么
前端
苏打水com8 小时前
第十四篇:Day40-42 前端架构设计入门——从“功能实现”到“架构思维”(对标职场“大型项目架构”需求)
前端·架构
king王一帅8 小时前
流式渲染 Incremark、ant-design-x markdown、streammarkdown-vue 全流程方案对比
前端·javascript·人工智能
苏打水com8 小时前
第十八篇:Day52-54 前端跨端开发进阶——从“多端适配”到“跨端统一”(对标职场“全栈化”需求)
前端
Bigger8 小时前
后端拒写接口?前端硬核自救:纯前端实现静态资源下载全链路解析
前端·浏览器·vite
BD_Marathon8 小时前
【JavaWeb】路径问题_前端绝对路径问题
前端