custom config

tmux cheat sheet

Cấu hình cá nhân · prefix đã đổi · mouse bật

PREFIX KEY
Alt + s
Thay thế mặc định Ctrl + b
Mọi lệnh tmux đều bắt đầu từ đây
Pane · chia màn hình
Split dọc (trái/phải) Prefix + |
Split ngang (trên/dưới) Prefix + -
Đóng pane Prefix + x
Phóng to / thu nhỏ Prefix + z
Đổi layout Prefix + Space
Di chuyển pane · không prefix
Sang trái Alt + ←
Sang phải Alt + →
Lên trên Alt + ↑
Xuống dưới Alt + ↓
Resize (keyboard) Prefix + Ctrl + ←↑→↓
Window · tab
Tạo window mới Prefix + c
Đổi tên window Prefix + ,
Đóng window Prefix + &
Window tiếp theo Prefix + n
Window trước đó Prefix + p
Chọn theo số Prefix + 0–9
List window Prefix + w
Session
Tạo session tmux new -s <name>
Attach tmux attach -t <name>
List tmux ls
Detach Prefix + d
Kill session kill-session -t <name>
Copy mode
Vào copy mode Prefix + [
Bắt đầu chọn Space
Copy Enter
Paste Prefix + ]
Thoát q
Scroll ↑ ↓ / chuột
Mouse · set -g mouse on
Focus pane Click pane
Resize pane Drag border
Cuộn lịch sử Scroll wheel
Chuyển window Click tab
Command mode & reload
Vào command mode Prefix + :
# Ví dụ command mode
:new-window -n logs
:kill-pane

# Reload config
tmux source-file ~/.tmux.conf

# Restart hoàn toàn
tmux kill-server
Thay đổi so với mặc định
Prefix Ctrl + b Alt + s
Split dọc Prefix + % Prefix + |
Split ngang Prefix + " Prefix + -
Move pane Prefix + arrow Alt + arrow
Workflow gợi ý
Nhấn Alt+s → c để tạo window mới
Split nhanh bằng |-
Di chuyển bằng Alt + arrow — rất nhanh, không cần prefix
Dùng chuột khi cần resize hoặc scroll lịch sử
Detach session rồi reattach → giữ nguyên mọi thứ
Zoom pane (Prefix + z) khi cần focus cao
⚡ ghi nhớ nhanh
Prefix Alt + s
Split | và -
Move pane Alt + arrow
Mouse bật full
Reload source ~/.tmux.conf