Keyboard Shortcuts
Essential keyboard shortcuts for terminal and editors.
Bash/Zsh Readline Shortcuts
Line Editing:
| Shortcut | Action |
|---|---|
|
Move to start of line |
|
Move to end of line |
|
Move back one character |
|
Move forward one character |
|
Move back one word |
|
Move forward one word |
|
Toggle between start and current position |
Deletion:
| Shortcut | Action |
|---|---|
|
Delete character under cursor (or exit if empty) |
|
Delete character before cursor (Backspace) |
|
Delete word before cursor |
|
Delete word after cursor |
|
Delete from cursor to start of line |
|
Delete from cursor to end of line |
|
Paste (yank) deleted text |
|
Rotate through yank ring (after Ctrl+Y) |
History:
| Shortcut | Action |
|---|---|
|
Reverse search history |
|
Forward search history (enable: |
|
Cancel search |
|
Previous command (Up arrow) |
|
Next command (Down arrow) |
|
Insert last argument of previous command |
|
Insert Nth argument of previous command |
|
Repeat last command |
|
Last argument of last command |
|
First argument of last command |
|
All arguments of last command |
|
Nth argument of last command |
|
Second-to-last command |
|
Replace first occurrence in last command |
|
Replace all occurrences in last command |
Control:
| Shortcut | Action |
|---|---|
|
Clear screen (keeps current line) |
|
Cancel current command (SIGINT) |
|
Suspend current process (SIGTSTP) |
|
Exit shell / EOF |
|
Freeze terminal output |
|
Resume terminal output |
|
Quit (SIGQUIT, core dump) |
Completion:
| Shortcut | Action |
|---|---|
|
Complete command/path/argument |
|
Show all completions |
|
List completions |
|
Insert all completions |
|
List file completions |
|
List username completions |
|
List variable completions |
Job Control:
| Shortcut | Action |
|---|---|
|
List background jobs |
|
Bring last job to foreground |
|
Bring job n to foreground |
|
Resume last job in background |
|
Resume job n in background |
|
Reference job 1 |
|
Reference current job |
|
Reference current job |
|
Reference previous job |
Vim Normal Mode
Movement:
| Shortcut | Action |
|---|---|
|
Left/down/up/right |
|
Next word start |
|
Next WORD start (space-separated) |
|
Previous word start |
|
Previous WORD start |
|
Next word end |
|
Next WORD end |
|
Start of line |
|
First non-blank character |
|
End of line |
|
First line |
|
Last line |
|
Go to line n |
|
Matching bracket |
|
Previous paragraph |
|
Next paragraph |
|
Top of screen |
|
Middle of screen |
|
Bottom of screen |
|
Half page down |
|
Half page up |
|
Full page down |
|
Full page up |
|
Center current line |
|
Current line to top |
|
Current line to bottom |
|
Find character forward |
|
Find character backward |
|
Till character forward |
|
Till character backward |
|
Repeat f/F/t/T forward |
|
Repeat f/F/t/T backward |
Editing:
| Shortcut | Action |
|---|---|
|
Insert before cursor |
|
Insert at line start |
|
Append after cursor |
|
Append at line end |
|
Open line below |
|
Open line above |
|
Delete character |
|
Delete character before |
|
Delete line |
|
Delete to end of line |
|
Change line |
|
Change to end of line |
|
Substitute character |
|
Substitute line |
|
Replace single character |
|
Enter replace mode |
|
Join lines |
|
Join lines (no space) |
|
Undo |
|
Redo |
|
Repeat last change |
|
Toggle case |
|
Toggle case over motion |
|
Lowercase over motion |
|
Uppercase over motion |
|
Indent |
|
Unindent |
|
Auto-indent |
Operators (verb + motion/text object):
| Operator | Action |
|---|---|
|
Delete |
|
Change |
|
Yank (copy) |
|
Indent right |
|
Indent left |
|
Auto-indent |
|
Format/wrap text |
|
Toggle case |
|
Lowercase |
|
Uppercase |
Text Objects (use with operators):
| Text Object | Description |
|---|---|
|
Inner word |
|
A word (includes space) |
|
Inner WORD |
|
A WORD |
|
Inner sentence |
|
A sentence |
|
Inner paragraph |
|
A paragraph |
|
Inner quotes |
|
A quotes (includes quotes) |
|
Inner parentheses |
|
A parentheses |
|
Inner brackets |
|
A brackets |
|
Inner braces |
|
A braces |
|
Inner angle brackets |
|
A angle brackets |
|
Inner tag (HTML/XML) |
|
A tag |
Search:
| Shortcut | Action |
|---|---|
|
Search forward |
|
Search backward |
|
Next match |
|
Previous match |
|
Search word under cursor (forward) |
|
Search word under cursor (backward) |
|
Partial word search forward |
|
Partial word search backward |
|
Clear search highlight |
Marks:
| Shortcut | Action |
|---|---|
|
Set local mark |
|
Set global mark |
|
Go to mark (line start) |
|
Go to mark (exact position) |
|
Previous position (line) |
|
Previous position (exact) |
|
List all marks |
Registers:
| Shortcut | Action |
|---|---|
|
Use register for next operation |
|
Unnamed (default) register |
|
Last yank |
|
Delete history |
|
Named registers |
|
Append to named register |
|
Black hole (discard) |
|
System clipboard |
|
X11 primary selection |
|
Last search pattern |
|
Last command |
|
Last inserted text |
|
Current filename |
|
Show register contents |
Macros:
| Shortcut | Action |
|---|---|
|
Start recording macro |
|
Stop recording |
|
Play macro |
|
Repeat last macro |
|
Play macro N times |
Vim Insert Mode
| Shortcut | Action |
|---|---|
|
Execute one normal mode command |
|
Paste register contents |
|
Insert expression result |
|
Paste unnamed register |
|
Paste system clipboard |
|
Paste last search |
|
Insert previously inserted text |
|
Delete word before cursor |
|
Delete to line start |
|
Indent current line |
|
Unindent current line |
|
Next completion |
|
Previous completion |
|
Filename completion |
|
Line completion |
|
Dictionary completion |
|
Omni completion |
|
Insert literal character |
|
Insert Unicode character |
|
Insert digraph |
|
Exit insert mode |
|
Exit insert mode (no abbreviation expansion) |
Vim Visual Mode
| Shortcut | Action |
|---|---|
|
Character-wise visual |
|
Line-wise visual |
|
Block visual |
|
Reselect last selection |
|
Move to other end of selection |
|
Move to other corner (block mode) |
|
Select a word |
|
Select a block with () |
|
Select a block with {} |
|
Select a tag block |
|
Select inner () block |
|
Select inner {} block |
|
Select inner tag block |
|
Indent selection |
|
Unindent selection |
|
Toggle case |
|
Lowercase |
|
Uppercase |
|
Delete selection |
|
Change selection |
|
Yank selection |
|
Insert at start of each line (block) |
|
Append to end of each line (block) |
|
Replace all selected with char |
Vim Command Mode
| Command | Action |
|---|---|
|
Save |
|
Save as |
|
Quit |
|
Force quit |
|
Save and quit |
|
Save all |
|
Quit all |
|
Edit file |
|
Reload file (discard changes) |
|
Next/previous buffer |
|
Delete buffer |
|
List buffers |
|
Horizontal split |
|
Vertical split |
|
Substitute |
|
Substitute with confirm |
|
Substitute in entire file |
|
Delete lines matching pattern |
|
Delete lines NOT matching pattern |
|
Sort lines |
|
Sort and remove duplicates |
|
Read file into buffer |
|
Read command output |
|
Run shell command |
|
Filter current line through command |
|
Filter range through command |
|
Set option |
|
Show option value |
|
Unset option |
|
Help |
Vim Window Management
| Shortcut | Action |
|---|---|
|
Horizontal split |
|
Vertical split |
|
Close window |
|
Close window (keeps buffer) |
|
Close other windows |
|
Cycle through windows |
|
Move to left/down/up/right window |
|
Move window to far left/bottom/top/right |
|
Equal window sizes |
|
Maximize height |
|
Maximize width |
|
Increase/decrease height |
|
Increase/decrease width |
|
Rotate windows |
|
Rotate windows (reverse) |
|
Exchange with next window |
|
Move window to new tab |
tmux Shortcuts
Default prefix is Ctrl+B
Sessions:
| Shortcut | Action |
|---|---|
|
New named session |
|
Attach to session |
|
List sessions |
|
Detach from session |
|
Rename session |
|
List sessions (interactive) |
|
Previous/next session |
Windows:
| Shortcut | Action |
|---|---|
|
Create window |
|
Rename window |
|
Next window |
|
Previous window |
|
Go to window N |
|
Last window |
|
Kill window |
|
List windows |
|
Find window |
Panes:
| Shortcut | Action |
|---|---|
|
Split horizontally |
|
Split vertically |
|
Navigate panes |
|
Next pane |
|
Last pane |
|
Kill pane |
|
Toggle zoom pane |
|
Move pane left |
|
Move pane right |
|
Show pane numbers |
|
Break pane to window |
|
Resize pane |
|
Cycle layouts |
Copy Mode (vi-style):
| Shortcut | Action |
|---|---|
|
Enter copy mode |
|
Exit copy mode |
|
Start selection |
|
Copy selection |
|
Paste buffer |
|
Search forward |
|
Search backward |
|
Next match |
|
Previous match |
fzf Shortcuts
In fzf interface:
| Shortcut | Action |
|---|---|
|
Move down/up |
|
Move down/up (alt) |
|
Select |
|
Toggle selection (multi) |
|
Toggle and move up |
|
Select all |
|
Deselect all |
|
Toggle preview |
|
Toggle preview wrap |
|
Scroll preview |
|
Abort |
|
Abort |
Shell integration:
| Shortcut | Action |
|---|---|
|
File search |
|
History search |
|
Directory search |
|
Fuzzy completion |
With commands:
# Find files
vim $(fzf)
# Find and kill process
kill -9 $(ps aux | fzf | awk '{print $2}')
# Git checkout branch
git checkout $(git branch | fzf)
# SSH to host
ssh $(grep "^Host" ~/.ssh/config | awk '{print $2}' | fzf)
Git Shortcuts
Common aliases (add to .gitconfig):
[alias]
st = status
co = checkout
br = branch
ci = commit
di = diff
dc = diff --cached
lg = log --oneline --graph --all
last = log -1 HEAD
unstage = reset HEAD --
amend = commit --amend
cp = cherry-pick
undo = reset --soft HEAD^
wip = !git add -A && git commit -m 'WIP'
Quick reference:
| Command | Action |
|---|---|
|
Stash changes |
|
Apply and remove stash |
|
List stashes |
|
Show stash diff |
|
Diff with previous commit |
|
Show last commit with diff |
|
Discard all changes |
|
Discard unstaged changes |
|
Remove untracked files/dirs |
|
Interactive rebase last 3 |
|
Start bisect |
|
View ref history |
kubectl Shortcuts
Aliases (add to shell config):
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgs='kubectl get svc'
alias kgd='kubectl get deployments'
alias kgn='kubectl get nodes'
alias kga='kubectl get all'
alias kdp='kubectl describe pod'
alias kds='kubectl describe svc'
alias kdd='kubectl describe deployment'
alias kl='kubectl logs'
alias klf='kubectl logs -f'
alias ke='kubectl exec -it'
alias kaf='kubectl apply -f'
alias kdf='kubectl delete -f'
alias kgpa='kubectl get pods -A'
alias kgsa='kubectl get svc -A'
alias kcns='kubectl config set-context --current --namespace'
alias kcgc='kubectl config get-contexts'
alias kcuc='kubectl config use-context'
Quick operations:
| Pattern | Action |
|---|---|
|
Pods with node info |
|
Pod YAML |
|
Pods with labels |
|
Pods by label |
|
Recent events |
|
Pod resource usage |
|
Node resource usage |
|
Debug pod |
|
Port forward |
|
Rolling restart |
|
Check rollout |
|
Rollback |
|
Scale |
Browser Shortcuts (Chrome/Firefox)
Navigation:
| Shortcut | Action |
|---|---|
|
New tab |
|
Close tab |
|
Reopen closed tab |
|
Next tab |
|
Previous tab |
|
Go to tab N |
|
Last tab |
|
Focus address bar |
|
Search from address bar |
|
Back/forward |
|
New window |
|
Private window |
|
Toggle fullscreen |
|
Reload |
|
Hard reload (bypass cache) |
Page actions:
| Shortcut | Action |
|---|---|
|
Find on page |
|
Next match |
|
Previous match |
|
|
|
Save page |
|
Bookmark page |
|
View source |
|
Developer tools |
|
Inspect element |
|
Console |
|
Page down |
|
Page up |
|
Top of page |
|
Bottom of page |
|
Zoom in/out |
|
Reset zoom |
Hyprland Shortcuts
Default MOD key is Super (Windows key)
Window management:
| Shortcut | Action |
|---|---|
|
Kill active window |
|
Exit Hyprland |
|
Toggle floating |
|
Toggle split |
|
Pseudo tile |
|
Toggle fullscreen |
|
Move focus |
|
Move focus (vim keys) |
|
Move window |
|
Switch workspace |
|
Move window to workspace |
|
Toggle special workspace |
|
Move to special |
|
Cycle workspaces |
|
Move window (drag) |
|
Resize window (drag) |
Applications (common bindings):
| Shortcut | Action |
|---|---|
|
Terminal |
|
Application launcher (wofi/rofi) |
|
File manager |
|
Browser |
Screenshot (with grimblast):
| Shortcut | Action |
|---|---|
|
Screenshot region |
|
Screenshot active window |
|
Screenshot all monitors |