You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE - Currently this is a non-exhaustive list. I will add more each day.
A lot of these are built-in and some are my personal shortcuts. In the future I will mark defaults vs. changed
On my Mac, the CMD key and CTRL key are swapped, so whererever you see CMD, it will be the default CTRL and vice versa
For MY sanity, I kept it that way so I am not second guessing myself.
Terminal:
Key
Command
Cmd + A
Beginning of line
Cmd + E
End of Line
Cmd + U
Clear text from cursor to beginning of line
Finder:
Key
Command
Ctrl + N
New Finder Window
Ctrl + S-A
New Finder Window (Applications)
Tmux:
Key
Command
Ctrl + A
Prefix
Prefix -> Key below
n
Next window
c
New Window
x
Close pane with prompt
X
Close pane no prompt (Note the capital X)
S-Left
Resize-pane -L
S-Right
Resize-pane -R
%
Split-window vertically
"
Split-window horizontally
:
Command mode/prompt (See below)
|
Command Mode|
splitw | Split-window (default vertical)
neww | New-window
|
Options|
-c "#{pane_current_path}" | Pass to :command to use the pane's current folder
Vi:
i - Insert mode
Key
Command
i
Enter Insert Mode
Esc - Command Mode
Key
Command
Esc
Enter Command Mode
No cursor interaction
:q
Quit without saving (errors if changes made)
:q!
Force quit without saving
:w
Save changes
:wq / ZZ
Save changes and Quit
:saveas
Save current file/buffer as a different name
:saveas!
Save current file/buffer as a different name, overriding if exists
/someword
Search for the word "someword"
:%s/pattern/string/
Replace all instances ofpattern with string
|
With cursor interaction|
o | Insert new line below current line
r | Replace letter under cursor
x | Delete letter under cursor
w | Move to next word
b | Move back a word
H | Move to top of screen
M | Move to middle of screen
L | Move to bottom of screen
g | Move to top of file
G | Move to bottom of file
J | Move screen up one line
K | Move screen down one line
cw | Delete/Replace word under cursor
dd | Delete entire line
dw | Delete current word
$ | Go to end of line
0 | Go to beginning of line
a | Append to cursor location
v | Start selecing text under cursor
V | Select whole line
y | Copy highlighted text
d | Cut highlighted text
p | Paste text after cursor
P | Paste text before cursor
u | Undo (that line only)
|
Multiples|
Nx | Delete N number of characters after cursor
Ncw | Delete/Replace N number of words, starting from cursor
|
Extensive Vi Cheatsheets|
Cheat Sheet|
Cheat Sheet|