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
1
imgcat filename
Displays the image inline.
1
imgls
Shows a directory listing with image thumbnails.
1
it2api
Command-line utility to manipulate iTerm2.
1
it2attention start|stop|fireworks
Gets your attention.
1
it2cat filename
Prints a file and renders it natively
1
it2check
Checks if the terminal is iTerm2.
1
it2copy [filename]
Copies to the pasteboard.
1
it2dl filename
Downloads the specified file, saving it in your Downloads folder.
1
it2setcolor ...
Changes individual color settings or loads a color preset.
1
it2setkeylabel ...
Changes Touch Bar function key labels.
1
it2tip
iTerm2 usage tips
1
it2ul
Uploads a file.
1
it2universion
Sets the current unicode version.
1
it2profile
Change iTerm2 session profile on the fly.
1
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.
1
2
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
Check if your running Powerlevel10k
1
cat ~/.zshrc | grep ZSH_THEME
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 [
orcommand ]
- 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; RepeatCtrl + 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