mac os 安装 iTerm2 终端+ Oh My Zsh 插件等

目标:终端 自动提示和高亮

步骤:

下载iTerm2

可以直接去官网下载:www.iterm2.com/

安装完成后,在/bin目录下会多出一个zsh的文件。

修改iTerm2 为暗黑模式

再次进入iTerm2 -> Preferences -> Profiles -> Colors -> Color Presets中根据个人喜好选择这两种配色中的一种即可

安装 Oh my zsh

bash 复制代码
# curl 安装方式

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装完成效果

安装高亮插件

这是oh my zsh的一个插件

bash 复制代码
cd ~/.oh-my-zsh/custom/plugins/

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

vi ~/.zshrc

这时我们再次打开zshrc文件进行编辑。找到plugins,此时plugins中应该已经有了git,我们需要把高亮插件也加上:

请务必保证插件顺序,zsh-syntax-highlighting必须在最后一个。

按一下esc调出vi命令,输入:wq保存并退出vi模式。

执行命令使刚才的修改生效:

bash 复制代码
source ~/.zshrc

安装 zsh-autosuggestion 命令补全

跟代码高亮的安装方式一样,这也是一个zsh的插件,叫做zsh-autosuggestion,用于命令建议和补全。

bash 复制代码
cd ~/.oh-my-zsh/custom/plugins/

git clone https://github.com/zsh-users/zsh-autosuggestions

vi ~/.zshrc

找到plugins,加上这个插件即可:

参考: www.jianshu.com/p/9c3439cc3...

相关推荐
UnicornDev1 天前
从零开始学iOS开发(第四十四篇):App Store 提交与审核 —— 让应用走向世界
macos·objective-c·cocoa
晴天无痕1 天前
intel过来的xcode项目在M芯片电脑无法显示模拟器的问题日
ide·macos·xcode
Digitally1 天前
如何连接安卓手机到 Mac?2026 年 7 种可靠方法
android·macos·智能手机
Digitally1 天前
如何将短信从 iPhone 传输到 Mac?
macos·ios·iphone
timebeign1 天前
Claude安装流程,系统macOS m1
macos
一块小土坷垃1 天前
App Cleaner & Uninstaller 9.1.1 – macOS 专业级应用程序清理与卸载工具
macos·开源软件
七七powerful1 天前
mac电脑安装cmca根证书
java·前端·macos
Front思1 天前
安卓证书申请 + iOS 证书申请(含 Windows 无 Mac 方案)+ HBuilderX 云打包配置
android·macos·ios
云天AI实战派1 天前
ChatGPT/AI 智能体问题排查指南:Mac Agent、语音 API、推理性能全流程修复手册
人工智能·macos·chatgpt
2601_958320572 天前
【详细版教程】Windows/macOS/Linux 安装 OpenClaw 2.6.6 指南(包含安装包)
linux·运维·windows·macos·小龙虾·open claw一键安装