This page contains several cheatsheets for applications that I use frequently.
Install asdf
from via brew with brew install asdf
.
asdf list # List all installed applications and marks their defaults with a star
asdf local nodejs 23.6.0 # Set the local version of `nodejs` to `23.6.0`
git switch <branch> # Switch to a remote branch locally and set up tracking the remote branch
grep "pattern" file.txt # Search for a pattern in a file
ssh-add -l # List all identities added to the SSH agent
ssh-add -D # Delete all identities
ssh-add <path/to/file> # Add private key to ssh-agent
:e . # Open a file explorer in the current working directory
:tabe # Open file in new tab
:tabn # Go to next tab
:tabp # Go to previous tab
:w # Write current file
:q # Quit ViM
:q! # Force Quit ViM
:/<term> # Search for term
n # Next search hit
p # Previous search hit
w # Next word
b # Previous word
Ctrl+f # Scroll forward to next page
Ctrl+d # Scroll down half a screen
Ctrl+b # Scroll backward to previous page
Ctrl+u # Scroll up half a screen
:sp # Open new horizontal split with current file
:vs # Open new vertical split with current file
:term # Alias of terminal, close with Ctrl+D
:terminal # Open a new terminal window, close with Ctrl+z
Ctrl+w h # Switch to left window
Ctrl+w l # Switch to right window
Ctrl+z # Bring window to the background (open a shell), return with "fg"
i # Switch to insert mode at the current cursor
A # Append to current line at the end
o # Insert line below
O # Insert line above
u # Undo latest change
Ctrl-r # Redo latest change
dw # Delete word
d$ # Delete from cursor position to end of line
~ # Switch between upper and lower case
guu # Switch current line to lower case
gUU # Switch current line to upper case
Resize Operations
Ctrl+w - # Shrink current window horizontally
Ctrl+w + # Expand current window horizontally
Ctrl+w > # Expand current window to the right (Remmeber to press the Shift key)
Ctrl+w < # Shrink current window to the left (Remember to press the Shift key)