Files
nixos-config/docs/tmux.md
T
kiskaadee e4d7aa7866 docs: update antigravity package usage and revert tmux prefix reference
- Update `docs/antigravity.md` to document optional GUI/IDE packages and highlight default CLI-only installation.
- Update `docs/tmux.md` to reflect the restoration of the default `Ctrl+b` prefix key.
2026-08-20 11:21:55 -05:00

2.4 KiB

🎛️ Tmux Environment & Cheat Sheet

This repository configures Tmux declaratively via Home Manager in terminal.nix. The configuration is optimized for speed, Vim keybindings, and seamless split-pane navigation.


🔑 Core Settings

  • Prefix Key: Uses the default Ctrl+b.
  • Status Bar: Anchored to the top of the terminal window.
  • Base Index: Windows and panes start indexing at 1 (aligning with your physical keyboard numbers).
  • Mouse Support: Enabled. You can scroll, click to select panes, and drag splits to resize them.
  • Zero Esc-Lag: Keyboard escape latency is set to 0ms (essential for vim editing response).

🧭 Seamless Neovim Navigation

The configuration loads the vim-tmux-navigator plugin. This allows you to navigate between Vim/Neovim split windows and Tmux splits using the same hotkeys without pressing the prefix key:

Shortcut Action
Ctrl + h Focus pane/split to the left
Ctrl + j Focus pane/split down
Ctrl + k Focus pane/split up
Ctrl + l Focus pane/split to the right

📋 Common Tmux Keybindings

For the following shortcuts, press your prefix key Ctrl+b first, release it, then press the shortcut key.

Sessions & Windows

Key Action
d Detach from the current session (keeps it running in the background)
c Create a new window (tab)
, Rename the current window
& Kill the current window
1 - 9 Switch to window by index number

Splits & Panes

Key Action
" Split pane horizontally (top/bottom)
% Split pane vertically (left/right)
x Close/kill the current pane
z Zoom the current pane to full screen (press again to restore)
h / j / k / l Vim-style switch focus left/down/up/right (alternative to Ctrl+direction)

🖥️ Command Line Session Management

Manage your persistent background sessions directly from your shell:

# Start a new named session
tmux new -s my-session-name

# List all active background sessions
tmux ls

# Attach to an existing session
tmux a -t my-session-name
# Or attach to the last active session:
tmux a

# Kill a session
tmux kill-session -t my-session-name