Skip to content

Instantly share code, notes, and snippets.

@dbalan
Last active January 13, 2021 12:55
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbalan/378d2f3e4e6a27f0aae8 to your computer and use it in GitHub Desktop.
Save dbalan/378d2f3e4e6a27f0aae8 to your computer and use it in GitHub Desktop.
iterm cheetsheet

iTERM2 Cheetsheet

Fancy Utilities

  1. Paste history: ⌘ + Shift + h
  2. Instant Replay: ⌘ + Opt + b
  3. Mouseless selection: ⌘ + f; Tab
  4. Smart select: Quad-Click
  5. Rectangle Select: ⌘ + Opt + Select
  6. Open link (URL/File): ⌘ + Click

Window management

  1. Reset (cleat window): ⌘ + r

Tab Management

  1. Full screen: ⌘ + Enter
  2. New Tab: ⌘ + t
  3. Jump between tabs: ⌘ + → and ⌘ + ←
  4. Exposé tabs: ⌘ + Opt + e

Pane management

  1. Split vertical (New pane): ⌘ + d
  2. Split horizontal (New pane): ⌘ + Shift + d
  3. Jump between panes: ⌘ + [ and ⌘ + ] or ⌘ + Opt + →/←/↓/↑
  4. Enlarge current pane: ⌘ + Shift + Enter

Tmux Support

Run tmux -CC, iTerm2 native commands will be interpreted as tmux commands.

Moving around

  1. Support for all readline commands
  2. Move cursor at point: Opt + Click

Set window/tab title

# Disable automatic title setting in oh-my-zsh
export DISABLE_AUTO_TITLE="true"

# call this function anywhere to set tab title
# set_term_title my_title my_long_title
function set_term_title {
  if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
    print -Pn "\e]2;$2:q\a" #set window name
    print -Pn "\e]1;$1:q\a" #set icon (=tab) name
  fi
}

Source and more ..

  1. iTerm documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment