Since you are a "new user" but already have a custom configuration, you essentially have two different "languages" to speak with tmux.
- Shortcuts (The Hotkeys): Fast, everyday actions (like splitting or switching) using your Prefix:
Ctrl + a. - Commands (The CLI): Formal instructions typed into the status bar or your terminal (like
rename-sessionorkill-pane).
Here is your tailored cheatsheet for a workflow involving Emacs and Coding Agents.
Remember: Since you use Emacs, if you need to go to the start of a line inside Emacs, press Ctrl + a twice.
| Shortcut | Action | Agent/Emacs Context |
|---|---|---|
c |
New Window | Create a fresh space for a new task. |
, |
Rename Window | Label it "Agent-Run" or "Logs." |
0 - 9 |
Switch Window | Jump between code and agent output. |
d |
Detach | Crucial: Keeps your agent running while you log out. |
| Shortcut | Action | Agent/Emacs Context |
|---|---|---|
" |
Split Horizontal | Put the agent below your code. |
% |
Split Vertical | Put the agent to the side of your code. |
o |
Rotate Focus | Quickly jump between your code and the agent. |
z |
Zoom Toggle | Make the agent full-screen to read a long trace. |
Space |
Cycle Layout | Automatically tile your panes into a grid. |
x |
Kill Pane | Use this to close the "frozen" panes from remain-on-exit. |
| Shortcut | Action | Agent/Emacs Context |
|---|---|---|
[ |
Enter Copy Mode | Stop the auto-scroll to read agent output. |
PageUp/Dn |
Scroll | Browse through the agent's history. |
/ |
Search | Find "Error" or "Exception" in the logs. |
q |
Exit Copy Mode | Return to the live prompt. |
Access these by pressing Ctrl + a then :. A prompt will appear at the bottom.
| Command | Action |
|---|---|
rename-session <name> |
Change the name of your current project container. |
source-file ~/.tmux.conf |
Reload your config after you make changes. |
kill-session |
Completely shut down everything (all windows/agents). |
| Command | Action |
|---|---|
set synchronize-panes |
Type in one pane, it appears in all. (Your y key does this too!). |
break-pane |
Take the current pane and turn it into its own full Window. |
join-pane -t :1 |
Pull a pane from Window 1 into your current Window. |
capture-pane -S -100 |
Capture the last 100 lines of output (good for debugging). |
Run these from your standard shell prompt to manage your sessions.
| Command | Action |
|---|---|
tmux |
Start a new session. |
tmux ls |
List all running sessions (see if your agent is still alive). |
tmux attach -t 0 |
Reconnect to your agent session (0 is your default). |
tmux kill-server |
The "Nuke" option: kills every tmux session and agent. |
Since you have remain-on-exit on, your panes won't disappear when an agent finishes. If your screen gets cluttered with "dead" panes, use this command in the : menu:
respawn-pane— This restarts the command in that pane without you having to close and recreate the split.
Would you like me to create a "startup script" for you that automatically opens your Emacs window and a tiled Agent window every time you boot up?