Tmux
= prefix (C-s)
# Getting started
| command | action |
|-----------------------------|-----------------------------|
| `tmux` | start new session |
| `tmux new -s name` | start new session with name |
| `tmux a` | attach to a session |
| `tmux a -t name` | attach to a session name |
| `tmux ls` | list sessions |
| `tmux kill-session -t name` | Kill session |
# Sessions
| command | action |
|-------------|-----------------------|
| `:new` | new session |
| `$` | name session |
| `s` | list session |
| `( / )` | previous/next session |
| `L` | Last session |
# Windows
| Keybind | Action |
|-----------|----------------------------|
| `$ c` | Create new window |
| `$ w` | List windows |
| `$ f` | Find window |
| `$ ,` | Name window |
| `$ &` | Kill window |
| `$ n` | Next window |
| `$ p` | Previous window |
| `$ l` | Previously selected window |
# Pane
| Keybind | Action |
|-------------|---------------------------------------------------------------|
| `%` | Vertical split |
| `"` | Horizontal split |
| `o` | Switch focus between panes |
| `q` | Show pane numbers |
| `x` | Kill pane |
| `z` | Toggle active pane between zoomed and unzoomed |
| `"+` | Break pane into window (e.g. to select text by mouse to copy) |
| `"+"` | Restore pane from window |
| `Space` | Toggle between layouts |
| `{` | Move the current pane left |
| `}` | Move the current pane right |
# Copy mode
Copy mode allows to copy inside the current buffer with most vim keys.
|---------|-----------------|
| Keybind | Action |
|---------|-----------------|
| [ | enter copy mode |
| hjkl | move cursor |
| space | start selection |
| enter | copy selection |
# Command
## Resizing panes
| Command | Description |
| ---------------------------------- | ------------------------------------------------- |
| resize-pane -D ## | Resize the current pane down by ## lines. |
| resize-pane -U ## | Resize the current pane up ## lines. |
| resize-pane -L ## | Resize the current pane left ## lines. |
| resize-pane -R ## | Resize the current pane right ## lines. |
| resize-pane -y ## | Resize the current pane to ## lines tall. |
| resize-pane -x ## | Resize the current pane to ## lines wide. |
# Other
| keybind | action |
|---------|---------------|
| `d` | detach |
| `t` | big clock |
| `?` | list shortcut |