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...

相关推荐
待续3016 小时前
OpenClaw 安装及使用教程(Windows / macOS / Linux)
linux·windows·macos
阿正的梦工坊9 小时前
在Mac电脑上如何显示点(.)开头的隐藏文件
macos
AI-小柒10 小时前
DataEyes 聚合平台 + Claude Code Max 编程实战
android·开发语言·人工智能·windows·python·macos·adb
I'm Jie12 小时前
MacOS 使用 pyenv + brew 优雅管理 Python 多版本环境
python·macos·pyenv
李小白杂货铺13 小时前
网络测速脚本(MacOS和Linux平台可用)
linux·macos·脚本·curl·ping·网络测速·网络测速脚本
钱多多_qdd14 小时前
第一次使用mac,安装java相关的东西
java·python·macos
xiegwei14 小时前
mac直接拔掉u盘之后不识别
macos
AxureMost14 小时前
Seelen UI 桌面美化工具(仿MAC交互)
macos·ui·交互
小手智联老徐15 小时前
在 macOS 上使用 Lima 虚拟机安全部署 OpenClaw:构建你的 AI 隔离沙箱
人工智能·安全·macos·ai智能体·openclaw
❀͜͡傀儡师16 小时前
macOS/Linux Gemini CLI安装指南
linux·运维·macos