Last active
October 27, 2025 13:29
-
Star
(2,179)
You must be signed in to star a gist -
Fork
(433)
You must be signed in to fork a gist
-
-
Save squarism/ae3613daf5c01a98ba3a to your computer and use it in GitHub Desktop.
Revisions
-
squarism revised this gist
Sep 17, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ _In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So `⌘` + `D` does not mean hold shift. `⌘` + `Shift` + `D` does of course._ ## Tabs and Windows -
squarism revised this gist
Sep 5, 2025 . 1 changed file with 64 additions and 58 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,35 @@ _In the below keyboard shortcuts, I use the capital letters for ready clarity but this does not imply shift, if shift is needed, I will say shift. So `⌘` + `D` does not mean hold shift. `⌘` + `Shift` + `D` does of course._ ## 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` (true 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 | | Move a pane to a different tab | Let's say you have too many split panes on tab 1. Make a new tab. Right click on the pane you want to move and select "Move Session to Split Pane". Then select the tab or use `⌘` + `[number]` to switch tabs. This also works across windows. So you can pop panes out and back in however you want. | | | | | **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 like `⌘+1`) | | Next Tab | `⌘`+ `Right Arrow` | | Go to Window | `⌘` + `Option` + `Number` | ## My Favorite Shell Key Combos @@ -36,16 +42,16 @@ There is also more than one way to do a thing so adopt what you like best. Hopefully some of these improve your work life. :) | **Function** | **Key Combination** | **Use** | | -------- | -------- | -------- | | Delete to start of line | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C | | Delete to end of line | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! | | Repeat last command | `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. | | Move back and forth on a line | `Left/Right Arrow Keys` | This takes you off the home row but it's easy to remember | | Move back and forth on a line by words | `⌥` + `Left/Right Arrow Keys` | Fast way to jump by words to correct a typo or "run again" with minor changes to last command. Ctrl as modifier might also work on mac and non-mac keyboards/shells/apps. | | Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. | | Clear screen | `Ctrl` + `L` | This is telling the shell to do it instead of an explicit command like `clear` or `cls` in DOS. If you use `⌘` + `K`, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like `top` or `htop`. In general, use this instead of typing `clear` over and over. | | Exit Shell | `Ctrl` + `D` | Instead of typing exit, just get this in muscle memory. It works in many contexts as exit of end of file (EOF). | @@ -56,17 +62,17 @@ keys and Mac equivalents don't always work. For example `⌘` + `Left Arrow` is (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` (Home is fn+Left arrow) | | Move to the end of line | `Ctrl` + `E` or `End` (End is fn+Right arrow) | | Moving by word on a line (this is a shell thing but passes through fine)| `Ctrl` + `Left/Right Arrow` | | Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Left Click` | ### About keyboard shortcuts 💡 > So, some keyboard shortcuts are Mac's. For example fn+Left Arrow is the Home key. On a fullsize Mac keyboard, there is a Home key. Home will usually pass through to iTerm and the shell. By shell, I mean zsh, bash or fish. The shell is the program running inside of iTerm when you open iTerm. If you launch `vim` or something, zsh/bash/fish is "gone" because vim is running. So, it's complicated to explain when keys work and when they don't. > > For example, Home will work in zsh. It will take you to the beginning of the line. If your cursor is at the end of "three" (the cursor is the bar character = |) in this below example: > ``` > one two three| > ``` @@ -78,12 +84,12 @@ Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Le I don't use this feature too much. I instead just mouse select (which copies to the clipboard) and paste. There's no need to Copy to the clipboard if you have `General > Selection > Copy to pasteboard on selection` enabled. | **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. @@ -92,17 +98,17 @@ Copy actions goes into the normal system clipboard which you can paste like norm Some of these are not directly related to iTerm and are just "shell features". Like, if you open Terminal.app on Mac some of these still work because it's the shell and not iTerm. I'm including them anyway. | **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 | **Function** | **Shortcut** | | -------- | -------- | | Clear the screen/pane (when `Ctrl + L` won't work) | `⌘` + `K` (I use this all the time) | | Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + `I` (again to toggle) | | Find Cursor | `⌘` + `/` _or use a theme or cursor shape that is easy to see_ | -
squarism revised this gist
Feb 12, 2024 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,11 +41,11 @@ Hopefully some of these improve your work life. :) Delete to start of line | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C Delete to end of line | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! Repeat last command | `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Left/Right Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `⌥` + `Left/Right Arrow Keys` | Fast way to jump by words to correct a typo or "run again" with minor changes to last command. Ctrl as modifier might also work on mac and non-mac keyboards/shells/apps. Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it instead of an explicit command like `clear` or `cls` in DOS. If you use `⌘` + `K`, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like `top` or `htop`. In general, use this instead of typing `clear` over and over. Exit Shell | `Ctrl` + `D` | Instead of typing exit, just get this in muscle memory. It works in many contexts as exit of end of file (EOF). -
squarism revised this gist
Dec 3, 2023 . 1 changed file with 12 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -58,15 +58,21 @@ takes you away from the home row. **Function** | **Shortcut** -------- | -------- Move to the start of line | `Ctrl` + `A` or `Home` (Home is fn+Left arrow) Move to the end of line | `Ctrl` + `E` or `End` (End is fn+Right arrow) Moving by word on a line (this is a shell thing but passes through fine)| `Ctrl` + `Left/Right Arrow` Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Left Click` ### About keyboard shortcuts 💡 > So, some keyboard shortcuts are Mac's. For example fn+Left Arrow is the Home key. On a fullsize Mac keyboard, there is a Home key. Home will usually pass through to iTerm and the shell. By shell, I mean zsh, bash or fish. The shell is the program running inside of iTerm when you open iTerm. If you launch `vim` or something, zsh/bash/fish is "gone" because vim is running. So, it's complicated to explain when keys work and when they don't. > > For example, Home will work in zsh. It will take you to the beginning of the line. If your cursor is at the end of "three" in this below example > ``` > one two three| > ``` > When you press Home (fn+Left Arrow) your cursor will be on one: `|one` > So, in this way, Home works the same in "the shell" as it does in TextEdit.app or any basic text box on Mac. > This is not the case if you start up `vim` or `emacs`. This is not iTerm's fault. This is just how Mac/Linux works. Just a head's up on that little detail. ## Copy and Paste with iTerm without using the mouse -
squarism revised this gist
Dec 3, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Resize Pane | `Ctrl` + `⌘` + `Arrow` (given you haven't mapped this to somethi 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 like `⌘+1`) Next Tab | `⌘`+ `Right Arrow` Go to Window | `⌘` + `Option` + `Number` -
squarism revised this gist
May 10, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Delete to start of line | `Ctrl` + `U` | Use this to start over typing without h Delete to end of line | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! Repeat last command | `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `⌥` + `Arrow Keys` | Fast way to jump by words to correct a typo or "run again" with minor changes to last command. Ctrl as modifier might also work on mac and non-mac keyboards/shells/apps. Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it instead of an explicit command like `clear` or `cls` in DOS. If you use `⌘` + `K`, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like `top` or `htop`. In general, use this instead of typing `clear` over and over. Exit Shell | `Ctrl` + `D` | Instead of typing exit, just get this in muscle memory. It works in many contexts. -
squarism revised this gist
May 10, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ There is also more than one way to do a thing so adopt what you like best. Hopefully some of these improve your work life. :) **Function** | **Key Combination** | **Use** -------- | -------- | -------- Delete to start of line | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C Delete to end of line | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! -
squarism revised this gist
May 10, 2022 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,12 +28,13 @@ Go to Window | `⌘` + `Option` + `Number` ## My Favorite Shell Key Combos These might be helpful to getting you faster with the shell. These are just common shell shortcuts unrelated to iTerm itelf. These will usually work in Bash/Zsh/Fish on Mac and on Linux. There are many shortcuts out there but I use these quite a bit. There is also more than one way to do a thing so adopt what you like best. Hopefully some of these improve your work life. :) **Function** | **Shortcut** | **Use** -------- | -------- | -------- @@ -44,6 +45,7 @@ Move back and forth on a line | `Arrow Keys` | This takes you off the home row b Move back and forth on a line by words | `⌥` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it instead of an explicit command like `clear` or `cls` in DOS. If you use `⌘` + `K`, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like `top` or `htop`. In general, use this instead of typing `clear` over and over. Exit Shell | `Ctrl` + `D` | Instead of typing exit, just get this in muscle memory. It works in many contexts. -
squarism revised this gist
Jan 4, 2022 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,13 +37,13 @@ Hopefully some of these change your life. :) **Function** | **Shortcut** | **Use** -------- | -------- | -------- Delete to start of line | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C Delete to end of line | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! Repeat last command | `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `⌥` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it instead of an explicit command like `clear` or `cls` in DOS. If you use `⌘` + `K`, this is telling iTerm to clear the screen which might have the same result or do something terrible (like when using a TUI like `top` or `htop`. In general, use this instead of typing `clear` over and over. @@ -68,7 +68,7 @@ Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Le ## Copy and Paste with iTerm without using the mouse I don't use this feature too much. I instead just mouse select (which copies to the clipboard) and paste. There's no need to Copy to the clipboard if you have `General > Selection > Copy to pasteboard on selection` enabled. **Function** | **Shortcut** -------- | -------- @@ -82,6 +82,8 @@ Copy actions goes into the normal system clipboard which you can paste like norm ## Search the Command History Some of these are not directly related to iTerm and are just "shell features". Like, if you open Terminal.app on Mac some of these still work because it's the shell and not iTerm. I'm including them anyway. **Function** | **Shortcut** -------- | -------- Search as you type | `Ctrl` + `R` and type the search term; Repeat `Ctrl` + `R` to loop through result -
squarism revised this gist
Mar 19, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,9 +39,9 @@ Hopefully some of these change your life. :) -------- | -------- | -------- Delete to start of line (favorite) | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C Delete to end of line (favorite) | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! Repeat last command | `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `⌥` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it. When this doesn't work `⌘` + `K` will tell iTerm to do it which works when you aren't in a shell. Use this instead of typing `clear` over and over. -
squarism revised this gist
Dec 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Delete to end of line (favorite) | `Ctrl` + `K` | Use this with command history Repeat last command | `Ctrl` + `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `Ctrl` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | It's faster to delete by words. Especially when your last command was wrong by a single typo or something. Clear screen | `Ctrl` + `L` | This is telling the shell to do it. When this doesn't work `⌘` + `K` will tell iTerm to do it which works when you aren't in a shell. Use this instead of typing `clear` over and over. -
squarism revised this gist
Dec 4, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,7 +43,7 @@ Repeat last command | `Ctrl` + `Up Arrow` | Cycle and browse your history with u Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `Ctrl` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | Faster to delete by words Clear screen | `Ctrl` + `L` | This is telling the shell to do it. When this doesn't work `⌘` + `K` will tell iTerm to do it which works when you aren't in a shell. Use this instead of typing `clear` over and over. -
squarism revised this gist
Oct 25, 2019 . 1 changed file with 8 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,8 +26,7 @@ Next Tab | `⌘`+ `Right Arrow` Go to Window | `⌘` + `Option` + `Number` ## My Favorite Shell Key Combos These might be helpful to getting you faster with the shell but really this isn't iTerm2 specific. I'm assuming you are using bash or zsh on Mac. @@ -48,8 +47,7 @@ Clear screen | `Ctrl` + `L` | This is telling the shell to do it. When this doe ## 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` @@ -68,8 +66,8 @@ Moving by word on a line (this is a shell thing but passes through fine)| `Ctrl` Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Left Click` ## Copy and Paste with iTerm without using the mouse I don't use this feature too much. **Function** | **Shortcut** @@ -82,17 +80,17 @@ 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 **Function** | **Shortcut** -------- | -------- Clear the screen/pane (when `Ctrl + L` won't work) | `⌘` + `K` (I use this all the time) -
squarism revised this gist
Oct 25, 2019 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,11 +26,15 @@ Next Tab | `⌘`+ `Right Arrow` Go to Window | `⌘` + `Option` + `Number` My Favorite Shell Key Combos =========== These might be helpful to getting you faster with the shell but really this isn't iTerm2 specific. I'm assuming you are using bash or zsh on Mac. There are many tips but I use these quite a bit. There is also more than one way to do it sometimes so adopt what you like best. Hopefully some of these change your life. :) **Function** | **Shortcut** | **Use** -------- | -------- | -------- -
squarism revised this gist
Oct 25, 2019 . 1 changed file with 13 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,12 +28,19 @@ Go to Window | `⌘` + `Option` + `Number` Basic Moves =========== These might be helpful to getting you faster with the shell but really this isn't iTerm2 specific. I'm assuming you are using bash or zsh on Mac. **Function** | **Shortcut** | **Use** -------- | -------- | -------- Delete to start of line (favorite) | `Ctrl` + `U` | Use this to start over typing without hitting Ctrl-C Delete to end of line (favorite) | `Ctrl` + `K` | Use this with command history to repeat commands and changing one thing at the end! Repeat last command | `Ctrl` + `Up Arrow` | Cycle and browse your history with up and down. `Ctrl-R` is faster if you know the string you are looking for. Move back and forth on a line | `Arrow Keys` | This takes you off the home row but it's easy to remember Move back and forth on a line by words | `Ctrl` + `Arrow Keys` | Fast way to jump to a word to correct a typo or "run again" with minor changes Delete previous word (in shell) | `Ctrl` + `W` | Faster to delete by words Clear screen | `Ctrl` + `L` | This is telling the shell to do it. When this doesn't work `⌘` + `C` will tell iTerm to do it which works when you aren't in a shell. -
squarism revised this gist
Jun 10, 2019 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Move back one character | `Ctrl` + `B` Move forward one character | `Ctrl` + `F` Delete current character | `Ctrl` + `D` Delete previous word (in shell) | `Ctrl` + `W` Moving Faster @@ -53,6 +53,8 @@ Move forward a word | `Option` + `F` Move backward a word | `Option` + `B` Set Mark | `⌘` + `M` Jump to Mark | `⌘` + `J` Moving by word on a line (this is a shell thing but passes through fine)| `Ctrl` + `Left/Right Arrow` Cursor Jump with Mouse (shell and vim - might depend on config) | `Option` + `Left Click` Copy and Paste with iTerm without using the mouse @@ -83,4 +85,5 @@ Misc **Function** | **Shortcut** -------- | -------- Clear the screen/pane (when `Ctrl + L` won't work) | `⌘` + `K` (I use this all the time) Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + `I` (again to toggle) Find Cursor | `⌘` + `/` _or use a theme or cursor shape that is easy to see_ -
squarism revised this gist
Jun 10, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Move back one character | `Ctrl` + `B` Move forward one character | `Ctrl` + `F` Delete current character | `Ctrl` + `D` Delete previous word (in shell) | `Ctrl` + `W` Moving by word on a line (this is a shell thing but passes through fine)| `Ctrl` + `Left/Right Arrow` Moving Faster -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,19 +3,19 @@ **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` (true 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 | `⌘` + `]` , `⌘` + `[` @@ -63,7 +63,7 @@ I don't use this feature too much. -------- | -------- 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. @@ -73,7 +73,7 @@ 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` @@ -82,5 +82,5 @@ Misc ========================== **Function** | **Shortcut** -------- | -------- Clear the screen/pane (when `Ctrl + L` won't work) | `⌘` + `K` (I use this all the time) Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + `I` (again to toggle) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -73,14 +73,14 @@ 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 ========================== **Function** | **Shortcut** -------- | -------- Clear the screen/pane (when `ctrl + L` won't work) | `⌘` + `K` (I use this all the time) Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + I (again to toggle) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,5 +80,7 @@ Cancel the search and restore original line | `Ctrl` + `g` Misc ========================== **Function** | **Shortcut** -------- | -------- Clear the screen/pane (when ctrl-l won't work) | `⌘` + `k` (I use this all the time) Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + I (again to toggle) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,4 +80,5 @@ 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) Broadcast command to all panes in window (nice when needed!) | `⌘` + `Alt` + I (again to toggle) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 15 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,31 +4,26 @@ **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 @@ -44,25 +39,28 @@ 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 -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Close Tab or Window | `⌘` + W (same as many applications) 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) - | - Split Window Vertically (same profile) | `⌘` + `D` Split Window Horizontally (same profile) | `⌘` + `Shift` + `D` (mnemonic: shift is a wide horizontal key) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Close Tab or Window | `⌘` + W (same as many applications) 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) | Split Window Vertically (same profile) | `⌘` + `D` Split Window Horizontally (same profile) | `⌘` + `Shift` + `D` (mnemonic: shift is a wide horizontal key) -
squarism revised this gist
Oct 31, 2018 . 1 changed file with 54 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,52 +1,75 @@ ## Tabs and Windows **Function** | **Shortcut** -------- | -------- New Tab | `⌘` + T Close Tab or Window | `⌘` + W (same as many applications) 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) Split Window Vertically (same profile) | `⌘` + `D` Split Window Horizontally (same profile) | `⌘` + `Shift` + `D` (mnemonic: shift is a wide horizontal key) Move a pane with the mouse | `⌘` + `Alt` + `Shift` and then drag the pane from anywhere 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 Used By Myself: 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` Go to Window | `⌘` + `Option` + `Number` Next Tab | `⌘`+ `Right Arrow` Set Mark | `⌘` + `M` Jump to Mark | `⌘` + `J` 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 ============= **Function** | **Shortcut** -------- | -------- 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. 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` Copy and Paste with iTerm without using the mouse ============= **Function** | **Shortcut** -------- | -------- I don't use this feature too much. 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 ========================== @@ -55,4 +78,8 @@ 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` Misc ========================== Clear the screen/pane (when ctrl-l won't work) | `⌘` + `k` (I use this all the time) -
squarism revised this gist
Sep 23, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Tabs and Windows ================ **Function** | **Shortcut** -------- | -------- Fullscreen | `⌘`+ `Enter` Previous Tab | `⌘`+ `Left Arrow` Next Tab | `⌘`+ `Right Arrow` Go to Tab | `⌘` + `Number` -
squarism revised this gist
Sep 23, 2015 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,16 +35,16 @@ Move forward a word | `Option` + `f` Move backward a word | `Option` + `b` Clear the screen | `⌘` + `k` COPY and Paste ============= **Function** | **Shortcut** -------- | -------- Copy from cursor to the end of line | `Ctrl` + `k` Copy from cursor to the end of word | `Option` + `d` Copy from cursor to the start of word | `Option` + `Backspace` Copy from cursor to previous whitespace | `Ctrl` + `w` Paste the last copied text | `Ctrl` + `w` Loop through and paste previously copy text | `Option` + `y` Loop through and paste the last argument of previous commands | `Option` + `.` Search the Command History -
helger revised this gist
Jul 8, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Move to the start of line | `Ctrl` + `a` Move to the end of line | `Ctrl` + `e` Move forward a word | `Option` + `f` Move backward a word | `Option` + `b` Clear the screen | `⌘` + `k` Cut and Paste ============= @@ -54,4 +54,4 @@ 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` -
helger revised this gist
Jul 8, 2012 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,21 +31,21 @@ Moving Faster -------- | -------- Move to the start of line | `Ctrl` + `a` Move to the end of line | `Ctrl` + `e` Move forward a word | `Option` + `f` Move backward a word | `Option` + `b` Clear the screen | `Option` + `l` Cut and Paste ============= **Function** | **Shortcut** -------- | -------- Cut from cursor to the end of line | `Ctrl` + `k` Cut from cursor to the end of word | `Option` + `d` Cut from cursor to the start of word | `Option` + `Backspace` Cut from cursor to previous whitespace | `Ctrl` + `w` Paste the last cut text | `Ctrl` + `w` Loop through and paste previously cut text | `Option` + `y` Loop through and paste the last argument of previous commands | `Option` + `.` Search the Command History ========================== -
helger revised this gist
Jul 8, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,7 +51,7 @@ 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`
NewerOlder