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

相关推荐
CHH32135 小时前
在 Mac/linux 的 VSCode 中使用Remote-SSH远程连接 Windows
linux·windows·vscode·macos
心灵宝贝6 小时前
Mac 桌面动态壁纸软件|Live Wallpaper 4K Pro v19.7 安装包使用教程(附安装包)
macos
William.csj14 小时前
Mac——文件夹压缩的简便方法
macos
北冥有鱼被烹14 小时前
【问题】Mac 的 Finder 中没有桌面选项如何处理?(访达 -> 设置 -> 边栏 -> 勾选桌面)
macos
wenxiaocsdn16 小时前
macos虚拟机-演示篇三配置clover引导
macos
迷路爸爸18019 小时前
源码编译安装最新 tmux 教程(含 Debian/Ubuntu/CentOS/Arch/macOS 等系统)
linux·ubuntu·macos·centos·debian·tmux·archlinux
xingxing_F19 小时前
Rhino 8 for Mac 犀牛3D建模软件
macos·3d
takashi_void1 天前
如何在本地部署大语言模型(Windows,Mac,Linux)三系统教程
linux·人工智能·windows·macos·语言模型·nlp
哦豁灬1 天前
macOS 常用快捷键
macos
亚林瓜子1 天前
在vscode中全选后,同时在每行行尾,开始多行编辑(Mac版)
ide·vscode·macos