## Tabs and Windows **Function** | **Shortcut** -------- | -------- New Tab | `⌘` + T Close Tab or Window | `⌘` + W (same as many mac apps) Go to Tab | `⌘` + `Number Key` (ie: `⌘2` is 2nd tab) Go to Split Pane by Direction | `⌘` + `Option` + `Arrow Key` Cycle iTerm Windows | `⌘` + `backtick` (ttrue of all mac apps and works with desktops/mission control) **Splitting** | Split Window Vertically (same profile) | `⌘` + `D` Split Window Horizontally (same profile) | `⌘` + `Shift` + `D` (mnemonic: shift is a wide horizontal key) **Moving** | Move a pane with the mouse | `⌘` + `Alt` + `Shift` and then drag the pane from anywhere **Fullscreen** | Fullscreen | `⌘`+ `Enter` Maximize a pane | `⌘` + `Shift` + Enter (use with fullscreen to temp fullscreen a pane!) Resize Pane | `Ctrl` + `⌘` + `Arrow` (given you haven't mapped this to something else) **Less Often Used By Me** | Go to Split Pane by Order of Use | `⌘` + `]` , `⌘` + `[` Split Window Horizontally (new profile) | `Option` + `⌘` + `H` Split Window Vertically (new profile) | `Option` + `⌘` + `V` Previous Tab | `⌘`+ `Left Arrow` (I usually move by tab number) Next Tab | `⌘`+ `Right Arrow` Go to Window | `⌘` + `Option` + `Number` Basic Moves =========== **Function** | **Shortcut** -------- | -------- Move back one character | `Ctrl` + `B` Move forward one character | `Ctrl` + `F` Delete current character | `Ctrl` + `D` Delete previous word (in shell) | `Ctrl` + `W` Undo | `Ctrl` + `-` Moving Faster ============= A lot of shell shortcuts work in iterm and it's good to learn these because arrow keys, home/end keys and Mac equivalents don't always work. For example `⌘` + `Left Arrow` is usually the same as `Home` (go to beginning of current line) but that doesn't work in the shell. Home works in many apps but it takes you away from the home row. **Function** | **Shortcut** -------- | -------- Move to the start of line | `Ctrl` + `A` or `Home` Move to the end of line | `Ctrl` + `E` or `End` Move forward a word | `Option` + `F` Move backward a word | `Option` + `B` Set Mark | `⌘` + `M` Jump to Mark | `⌘` + `J` Copy and Paste with iTerm without using the mouse ============= I don't use this feature too much. **Function** | **Shortcut** -------- | -------- Enter Copy Mode | `Shift` + `⌘` + `C` Enter Character Selection Mode in Copy Mode | `Ctrl` + `V` Move cursor in Copy Mode | HJKL vim motions or arrow keys Copy text in Copy Mode | `Ctrl` + `K` Copy actions goes into the normal system clipboard which you can paste like normal. Search the Command History ========================== **Function** | **Shortcut** -------- | -------- 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` Misc ========================== Clear the screen/pane (when ctrl-l won't work) | `⌘` + `k` (I use this all the time)