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

相关推荐
pe7er3 天前
macOS 应用无法打开(权限问题)解决方案
macos·mac
harmful_sheep6 天前
mac生效的终端查看
macos
iOS门童7 天前
macOS 应用"已损坏"无法打开?一文搞懂 Gatekeeper 与解决方案
macos
NPE~7 天前
[工具分享]Maccy —— 优雅的 macOS 剪贴板历史管理工具
macos·教程·工具·实用工具
差不多程序员7 天前
Mac安装OpenClaw-cn保姆级教程
macos
dzl843947 天前
mac 安装python
开发语言·python·macos
Bruce_Liuxiaowei7 天前
在 macOS 上通过 Docker 本地安装 OpenClaw 完整教程
macos·docker·容器·openclaw
阿捏利7 天前
详解Mach-O(十五)Mach-O __DATA_CONST
macos·ios·c/c++·mach-o
ShikiSuen7 天前
macOS 的 CpLk 中英切换卡顿的元凶在 InputMethodKit 本身
macos
xiayutian_c7 天前
如虎添翼-MacOS
macos