Terminal
iterm2+zsh
customized config:
Put this in your .zshrc
bindkey "[D" backward-word
bindkey "[C" forward-word
bindkey "^[a" beginning-of-line
bindkey "^[e" end-of-line
Inline Ops
Function | Shortcut | Use |
---|---|---|
Move | ||
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 | Option + Arrow Keys |
Fast way to jump to a word to correct a typo or “run again” with minor changes |
Move to the start of line | Ctrl + A |
|
Move to the end of line | Ctrl + E |
|
Delete | ||
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. |
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! |
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. |
Search | ||
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 |
|
Cancel the search and restore original line | Ctrl + G |
Tabs & 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) |
Previous Tab | ⌘ + Left Arrow (I usually move by tab number) |
Next Tab | ⌘ + Right Arrow |
Splitting | |
Split Window Vertically (same profile) | ⌘ + D |
Split Window Horizontally (same profile) | ⌘ + Shift + D (mnemonic: shift is a wide horizontal key) |
Vim
IntelliJ/GoLand (Jetbrains series)
VS Code
References:
iterm2+zsh:
https://kapeli.com/cheat_sheets/iTerm2.docset/Contents/Resources/Documents/index
https://gist.github.com/squarism/ae3613daf5c01a98ba3a
https://coderwall.com/p/a8uxma/zsh-iterm2-osx-shortcuts