Skip to content
0

iTerm2

iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.

环境

  • macOS
  • iTerm2

安装

zsh
brew install iterm2

字体配置

当前配置:

  • JetBrainsMonoNL Nerd Font Mono 这是不带连字特性的等宽英文字体,通过打包集成了可以显示 Neovim 界面图标所需的 Nerd Font,效果绝佳而且免费
  • 中文字体无法在 iTerm2 显式配置,默认使用的应该是苹方,可以支持 粗体,但不支持 斜体
md
- regular
- _italic_
- **bold**
- **_bold italic_**
- 正常中文
- _斜体中文_
- **粗体中文**
- **_粗斜体_**

iTerm2 lets you to specify two fonts. If you only use English or western european languages, you probably only need to set the font for ASCII characters. For other languages, you need to specify a font that works with your language as the Non-ASCII font. You need to make sure the size (height) of two fonts do not differ greatly, so iTerm2 won't display a mess of mixed glyphs.

However, if I check this, Non-ASCII Font: Use a different font for Non-ASCII text, the Nerd Font icons in Neovim are not properly displayed and turned into question marks.

所以在 iTerm2 支持的这种配置结构下,只能寻找一个打包了 「中文 + 图标」 的 Nerd Font 才行。例如

  • Sarasa Term SC Nerd 字体。但是这个字体并没有包含 Neovim 常见的图标,已放弃
  • JetBrainsMapleMono-NF-XX-XX 字体。下载后仅安装 JetBrainsMapleMono-Regular.ttf 即可,然后在 iTerm2 字体配置中选择 JetBrains Maple Mono 即可完美显示中文和英文,外加图标

键盘符号

以下使用的键盘符号,全部是基于 Unicode 的文本符号。

  • ⌘ (Command): This is the Place of Interest Sign (U+2318). Its original use was for locations of cultural interest, but Apple adopted it for the Command key.
  • ⌫ (Delete/Backspace): This is the Erase to the Left symbol (U+232B). It visually represents the backspace action of deleting a character to the left of the cursor.
  • ⌥ (Option): This is the Option Key symbol (U+2325). It's part of the Unicode block for Miscellaneous Technical symbols.
  • ⌦ (Delete Forward): This is the Erase to the Right symbol (U+2326). It's used to represent the forward delete function, which removes the character to the right of the cursor.
  • ⇧ (Shift): This is the Upwards White Arrow (U+21E7). It is used to indicate the Shift key.
  • ⇪ (Caps Lock): This is the Upwards White Arrow from Bar (U+21EA). It represents the Caps Lock key.
  • ⌃ (Control): This is the Up Arrowhead (U+2303). It is used for the Control key.
  • ⎋ (Escape): This is the Broken Circle with Arrow (U+238B). It is the symbol for the Escape key.

快捷键

FunctionShortcut
New Session⌘ + N
New Tab⌘ + T
Close Tab or Window⌘ + W
Go to Tab 1⌘ + 1
Go to Split Pane by Direction⌘ + ⌥ + Arrow Key
Cycle iTerm2 Windows⌘ + Backtick
Split Window Vertically (same profile)⌘ + D
Split Window Horizontally (same profile)⌘ + ⇧ + D
Fullscreen⌘ + Enter
Maximize a pane⌘ + ⇧ + Enter
最近更新