Post

Iterm2 Cheatsheet

A list of some of the more critical keyboard shortcuts. Ive excluded many of the shortcuts that are beyond the basics. Less is more.

Advanced Features

Enable shell intergration

imgcat filename

Displays the image inline.

imgls

Shows a directory listing with image thumbnails.

it2api

Command-line utility to manipulate iTerm2.

it2attention start|stop|fireworks

Gets your attention.

it2cat filename

Prints a file and renders it natively

it2check

Checks if the terminal is iTerm2.

it2copy [filename]

Copies to the pasteboard.

it2dl filename

Downloads the specified file, saving it in your Downloads folder.

it2setcolor …

Changes individual color settings or loads a color preset.

it2setkeylabel …

Changes Touch Bar function key labels.

it2tip

iTerm2 usage tips

it2ul

Uploads a file.

it2universion

Sets the current unicode version.

it2profile

Change iTerm2 session profile on the fly.

Autocompletion, Autosuggestions and Zsh Syntax highlighting

Using th powerlevel10k theme we can enable autocompletion and suggestion features by adding the following to .zshrc file. Be sure to enable powershell integration.

iterm2 powershell integration

1
2
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

Search command history

  • Enable shell integration from the Iterm2 main menu and use cmd shift ; on a mac.

Tabs

  • New Tab Command + t
  • Rename Tab Command i
  • Close Tab or Window Command + w
  • Go to Tab Command + Number Key

Create New Panes (split window)

  • Split Window Vertically Command + d
  • Split Window Horizontally Command + Shift + d

Switching Panes

  • Go to Split Pane by Direction command [ or command ]
  • Go to Split Pane by Direction Command + Option + Arrow Key

Resize panes

  • Resize Pane Ctrl + Command + Arrow

Close pane

While your on the pane

  • Command + w

Cycle Windows

  • Cycle iTerm Windows Command + backtick

Moving

  • Move a pane with the mouse Command + Alt + Shift and then drag the pane from anywhere

Fullscreen

  • Fullscreen Command + Enter
  • Maximize a pane Command + Shift + Enter

Search the Command History

  • Search as you type Ctrl + R and type the search term; Repeat Ctrl + R to loop through result
  • Search the last remembered search term Ctrl + R twice
  • End the search at current history entry Ctrl + Y
  • Cancel the search and restore original line Ctrl + G
This post is licensed under CC BY 4.0 by the author.