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

相关推荐
有个人神神叨叨1 小时前
AITalk:从零到一打造 macOS 系统级语音输入引擎
macos·策略模式
系'辞4 小时前
【obsidian指南】配置obsidian git插件,实现obsidian数据定时同步到github仓库(Mac电脑)
macos·github·agent·知识库
栗子叶19 小时前
IP协议 地址划分&MAC地址作用&ip addr命令
网络·tcp/ip·macos
draking1 天前
Anthropic 封杀当天,我把 OpenCode 升到 1.1.11,踩了 5 个坑
macos·ai编程
Roye_ack1 天前
【Mac环境配置教程】深度学习环境配置(Anaconda + PyTorch)
macos
程序员雄杰1 天前
腾讯云轻量应用服务器mac中ssh免密登录到服务器
macos·ssh·腾讯云
YongPagani2 天前
Mac安装Homebrew
macos
Byron Loong2 天前
【系统】Mac系统和Linux 指令对比
linux·macos·策略模式
软件小滔2 天前
拖拽出来的专业感
经验分享·macos·mac·应用推荐
coooliang2 天前
Macos下载元神 ipa文件
macos