每次换电脑都是一次断舍离的机会。这次重装后特意控制了安装欲望,只留真正每天在用的东西。

终端与 Shell

iTerm2 + zsh + oh-my-zsh,经典组合,没什么新意但足够顺手。主题用的是 agnoster 的简化版,只保留目录和 git 状态两段,右边放时间。

必装的两个插件:

git clone https://github.com/zsh-users/zsh-autosuggestions \
  ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting \
  ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

自动补全建议 + 命令高亮,装上就回不去了。

命令行工具

日常高频使用的:

工具 替代 理由
eza ls 图标 + 树形 + git 状态
bat cat 语法高亮、行号
fd find 语法正常人能记住
ripgrep grep 快一个数量级
zoxide cd 记住常去的目录
fzf 历史搜索 Ctrl+R 模糊搜历史命令

一把梭安装:

brew install eza bat fd ripgrep zoxide fzf

SSH 配置

~/.ssh/config 大概是全机房最值钱的文件,每台服务器配好别名:

Host my-vps
    HostName 192.0.2.1
    User root
    IdentityFile ~/.ssh/id_ed25519

配合 ssh my-vps 秒连,再也想不起 IP 是多少——这可能就是最高境界了。

没装的东西

之前热衷的 tmux 多窗口美化、powerline 状态栏、各种提示符主题,这次都没装。终端嘛,能让我专注干活的就是好终端。