/
我的终端配置

我的终端配置

一步步安装

iTerm 2 + Solarized Dark 主题

设置路径:Preference → Profile → Default → Colors → (右下角)Color Presets

Solarized Dark 主题 iTerm 2 已内置,也可从 https://ethanschoonover.com/solarized/ 下载

注意额外配置 Colors → ANSI Colors → Bright Black 为 #839496

光标快速移动(iTerm 2)

设置路径:Preference → Profile → Default → Keys

找到 Option + <-Option + -> 两个 快捷键,分别设置为

  • Option + <- :Send Escape Sequence b

  • Option + -> :Send Escape Sequence f

然后就可以利用 Option + 左右键来以单词为单位移动了

oh-my-zsh

可使用 fig 的插件来完成

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

Power Line

pip install powerline-status

PowerFonts

git clone <https://github.com/powerline/fonts.git> --depth=1 cd fonts ./install.sh

之后进入 iTerm 2 相应的 Profile,修改 Text 的 Fonts 为「Dejavu」、设定相应的粗细、大小即可(我习惯设定为大小 14 行间距 120)

agnoster 主题

使用 fig 插件时在插件中配置

修改 ~/.zshrc 文件,将 theme 修改为 agnoster,并添加一行 DEFAULT_USER=whoami``

zsh-autosuggestion

可使用 fig 的插件来完成

修改 ~/.zshrc 文件,在 plugins 中添加 zsh-autosuggestions

autojump

按照 brew 安装完成后的提示信息操作,目前版本是修改 ~/.zshrc 文件,添加 [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh 一行

zsh-syntax-highlighting

可使用 fig 的插件来完成

修改 ~/.zshrc 文件,在 plugins 中添加 zsh-syntax-highlighting,需要注意,必须保证此项在 plugins 中位于最后

atuin

将以下内容添加至 zsh 配置文件中

配置同步:输入 atuin login 登录

如果需要自定义同步服务器,修改 ~/.config/atuin/config.toml 配置文件的 sync_address

direnv

代理信息

Tips

Solarized Dark 与 zsh-autosuggestions 颜色冲突

执行echo ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\\'fg=60\\' >> $ZSH_CUSTOM/zsh-autosuggestions_custom.zsh 修改提示文本的颜色即可

参考

iTerm2 + Oh My Zsh 打造舒适终端体验

Related content

托管平台
托管平台
More like this
常见产品
常见产品
Read with this
完美的阴影
完美的阴影
More like this
撰写文档的工具
撰写文档的工具
More like this
Traefik
Traefik
More like this
Kubernetes Dashboard
Kubernetes Dashboard
More like this