Skip to content

iTerm2 Configuration

MrCee edited this page Jun 19, 2024 · 17 revisions

This guide is useful if you are transitioning from MacOS Terminal.app and want to get started with basic key bindings you're used to, such as using the option key as meta for left and right arrows. We will also set up Nerd Fonts and a color profile.

This quick guide was captured on MacOS and has not been tested on Windows. Contributions are welcome.

1. Install iTerm2

brew install --cask iterm2

2. Install a Nerd font

brew install --cask font-meslo-lg-nerd-font

3. Download a Color Profile

  • Here is a great color profile @josean-dev has created in which I use in other areas: coolnight.itermcolors

  • Download the raw file to your Downloads folder. We will use this shorty in step 7. This color profile will also be used in bat themes.

4. Set Option Keys to Use Escape Sequence (MacOS)

  1. Go to Settings > Profiles > Default > Keys > General
  2. Select Esc+ to enable the option key to work with left and right arrow keys.

SCR-1-iterm2

5. Set Key Mapping Similar to Terminal.app (MacOS)

  1. Go to Settings > Profiles > Default > Keys > Key Mappings
  2. Select Presets > Terminal.app compatibility

SCR-2-iterm2 SCR-3-iterm2

6. Set Nerd Font

  1. Go to Settings > Profiles > Default > Text > Font
  2. Select any Meslo Nerd Font installed earlier. There are a few options offering different heights and spacing.

SCR-4-iterm2

7. Set Color Profile

  1. Go to Settings > Profiles > Default > Colors
  2. Select Color Presets > Import first, then select the file coolnight.itermcolors downloaded in Step 3.

SCR-5-iterm2 SCR-6-iterm2

That's it!