Add tmux window movement keybindings and update documentation

- Add Ctrl-Shift-Left/Right keybindings to quickly move windows
- Update README with comprehensive tmux keybindings documentation
  - Organize keybindings into categories: Pane, Window, Session & Config
  - Document all existing and new keybindings
  - Add descriptions for better clarity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yan Lin 2025-07-31 01:08:11 +02:00
parent ee38e45748
commit 716d8578dc
2 changed files with 25 additions and 2 deletions

View file

@ -107,15 +107,34 @@ hms # Quick home-manager switch (rebuild)
- **Copy Mode**: System clipboard integration
#### Essential Keybindings:
**Pane Management:**
| Key | Action |
|-----|--------|
| `Ctrl+a` | Prefix key |
| `Ctrl+a \|` | Split window vertically |
| `Ctrl+a -` | Split window horizontally |
| `Ctrl+a h/j/k/l` | Navigate panes (vim-style) |
| `Ctrl+a H/J/K/L` | Resize panes |
| `Ctrl+a r` | Reload tmux config |
| `Ctrl+a H/J/K/L` | Resize panes (5 chars at a time) |
| `Ctrl+a Ctrl+a` | Quick pane cycling |
**Window Management:**
| Key | Action |
|-----|--------|
| `Ctrl+a c` | Create new window (preserves current path) |
| `Ctrl+a 1-9` | Switch to window by number |
| `Ctrl+a n` | Next window |
| `Ctrl+a p` | Previous window |
| `Ctrl+Shift+Left` | Move window left and follow |
| `Ctrl+Shift+Right` | Move window right and follow |
| `Ctrl+a .` | Move window (prompts for new index) |
**Session & Config:**
| Key | Action |
|-----|--------|
| `Ctrl+a d` | Detach from current session |
| `Ctrl+a s` | List and switch sessions |
| `Ctrl+a r` | Reload tmux config |
| `Ctrl+a A` | Toggle activity monitoring (useful for silencing noisy programs) |
#### Copy Mode (Ctrl+a [):

View file

@ -102,6 +102,10 @@
# Automatically renumber windows
set -g renumber-windows on
# Quick window movement
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
'';
};
}