From 045fe773359520c9c31753e868a785bcbb6abe09 Mon Sep 17 00:00:00 2001 From: finga Date: Fri, 11 Apr 2025 12:19:24 +0200 Subject: [PATCH] Add first cheat sheets --- bash.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ tmux.md | 14 ++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 bash.md create mode 100644 tmux.md diff --git a/bash.md b/bash.md new file mode 100644 index 0000000..0a99e9d --- /dev/null +++ b/bash.md @@ -0,0 +1,50 @@ +# Bash Keybindings + +## Navigation + +| Keybinding | Action | Shell | +|---------------------------------------|-----------------------------------------|-----------| +| Ctrl + a | Go to the beginning of the line | bash, zsh | +| Ctrl + e | Go to the end of the line | bash, zsh | +| Ctrl + f | Move one character forward | bash, zsh | +| Ctrl + b | Move one character backward | bash, zsh | +| Alt + f | Move one word forward | bash, zsh | +| Alt + b | Move one word backward | bash, zsh | +| Alt + b | Jump and mark to the beginning and back | bash, zsh | + +## Line Editing + +| Keybinding | Action | Shell | +|---------------------------------------|------------------------------------------------|-----------| +| Ctrl + d | Delete forward | bash, zsh | +| Ctrl + h | Delete backward | bash, zsh | +| Alt + d | Delete word forward | bash, zsh | +| Alt + w | Delete word backward | bash, zsh | +| Alt + Backspace | Delete word backward | bash, zsh | +| Ctrl + k | Delete everything to the end of the line | bash, zsh | +| Ctrl + u | Delete everything to the beginning of the line | bash, zsh | +| Ctrl + y | Yank (paste) last deleted item | bash, zsh | +| Alt + p | Replace arg with previous command's arg | zsh | +| Alt + n | Replace arg with next command's arg | zsh | +| Alt + . | Yank (paste) the last command's arg | bash, zsh | +| Ctrl + ? | Undo | bash, zsh | + +## Signals and Symbols + +| Keybinding | Action | Shell | +|---------------------------------|------------------------------------------|-----------| +| Ctrl + c | Send SIGINT | bash, zsh | +| Ctrl + \\ | Send SIGQUIT | bash, zsh | +| Ctrl + z | Send XOFF/SIGTSTP | bash, zsh | +| Ctrl + c | Send XON/SIGCONT | bash, zsh | +| Ctrl + l | Clear the screen (similar to `clear`) | bash, zsh | +| Ctrl + d | Send EOF (can be used to exit the shell) | bash, zsh | + +## History + +| Keybinding | Action | Shell | +|--------------------------------|----------------------------|-----------| +| Ctrl + p | Previous command | bash, zsh | +| Ctrl + n | Next command | bash, zsh | +| Ctrl + r | Reverse search the history | bash, zsh | +| Ctrl + s | Search the history | bash, zsh | diff --git a/tmux.md b/tmux.md new file mode 100644 index 0000000..5c610ae --- /dev/null +++ b/tmux.md @@ -0,0 +1,14 @@ +# tmux + +## Keybindings + +| Keybinding | Command | Action | +|---------------------------------------------------------------|---------------------------------|----------------------------------| +| Ctrl + b, Alt + 1 | `select-layout even-horizontal` | even distribute panes horizontal | +| Ctrl + b, Alt + 2 | `select-layout even-vertical` | even distribute panes vertical | + +## Commands + +| Command | Action | +|--------------------------|------------------------------------| +| `setw synchronize-panes` | synchronize the input of all panes |