Skip to content

Instantly share code, notes, and snippets.

@andrewmmc
Last active January 12, 2018 02:04
Show Gist options
  • Select an option

  • Save andrewmmc/f4a7f53ac74d1306fe288fa879ddd657 to your computer and use it in GitHub Desktop.

Select an option

Save andrewmmc/f4a7f53ac74d1306fe288fa879ddd657 to your computer and use it in GitHub Desktop.
[iTerm2] Working effectively with iTerm2

iTerm2 Hotkey

Install iTerm2

If you haven’t heard of iTerm, it’s a popular open source alternative to Mac OS X Terminal. Give it a try, download and install it from http://www.iterm2.com.

Fine-Tune Settings

Launch iTerm, open iTerm > Preferences or just Cmd + ,.

Open tab/pane with current working directory

Under Profiles tab, go to General subtab, set Working Directory to “Reuse previous session’s directory”.

Enable Meta key

To enable Meta key for Bash readline editing e.g. Alt + b to move to previous word, under Profiles tab, go to Keys subtab, set Left option key acts as: to “+Esc”.

Hotkey to toggle iTerm2

Under Keys tab, in Hotkey section, enable “Show/hide iTerm2 with a system-wide hotkey” and input your hotkey combination, e.g. I use Ctrl + Shift + L.

Switch pane with mouse cursor

Under Pointer, in Miscellaneous Settings section, enable “Focus follows mouse”.

Handy Shortcut Keys

Here’s a set of shortcut keys I commonly use. You can always look for other shortcut keys in the iTerm menu.

Tab navigation

open new tab Cmd + t

next tab Cmd + Shift + ]

previous tab Cmd + Shift + [

Pane navigation

split pane left-right Cmd + d

split pane top-bottom Cmd + Shift + d

next pane Cmd + ]

previous pane Cmd + [

Search

open search bar Cmd + f

find next Cmd + g

Input to all panes

input to all panes in current tab Cmd + Alt + i

Clear screen

clear buffer Cmd + k

clear lines (Bash command) Ctrl + l

Zooming / Font Resize

toggle maximize window Cmd + Alt + =

toggle full screen Cmd + Enter

make font larger Cmd + +

make font smaller Cmd + -

Reference: http://teohm.com/blog/working-effectively-with-iterm2/

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