tmux: Hold Alt and Spam B to Cycle Sessions

The standard way to switch to the previous tmux session is prefix + L (or a custom prefix + b). The problem: every switch requires the full prefix chord again. You can't hold Ctrl and keep tapping — tmux swallows the first keypress as the prefix and expects a fresh command key each time.

Use a no-prefix binding instead. Add to ~/.tmux.conf:

# Alt+b to switch to previous session (no prefix needed).
bind -n M-b switch-client -p

The -n flag means "no prefix required." Now you hold Alt and tap b repeatedly to cycle through sessions — no prefix dance, no finger gymnastics.

Why Alt+B and not something else: it's close to the default prefix (Ctrl+B) so it's easy to remember, and it doesn't conflict with any common terminal or shell binding. Your mileage may vary if you use Alt-heavy terminal apps.

Comments

  1. Markdown is allowed. HTML tags allowed: <strong>, <em>, <blockquote>, <code>, <pre>, <a>.