Overview
Tmux is a terminal multiplexer that lets you switch between several programs in one terminal, detach them and reattach them to a different terminal. The Gentleman.Dots Tmux configuration includes carefully selected plugins, Vim-style navigation, and a beautiful Kanagawa theme.The prefix key has been changed from
Ctrl+b to Ctrl+a for better ergonomics.Key Features
Vim Navigation
hjkl keybindings for intuitive pane movement
Kanagawa Theme
Beautiful color scheme with git, CPU, and RAM indicators
Session Persistence
Save and restore sessions with tmux-resurrect
Floating Windows
Quick scratch terminal with Alt+g
Installation
Configuration Breakdown
Plugins
The configuration includes these essential plugins:tmux.conf
Theme Configuration
The Kanagawa theme is customized with status indicators:tmux.conf
git- Current git branchcpu-usage- CPU utilization percentageram-usage- Memory usagebattery- Battery status (useful for laptops)time- Current time
Prefix Key
The prefix has been changed toCtrl+a for better ergonomics:
tmux.conf
Pane Splitting
Intuitive split commands:tmux.conf
Ctrl+athenv- Vertical split (left/right)Ctrl+athend- Horizontal split (down)
Vim Mode
Vim-style keybindings in copy mode:tmux.conf
tmux.conf
Floating Scratch Window
Quick access to a floating terminal:tmux.conf
Alt+g to toggle a floating scratch terminal
Essential Keybindings
Session Management
| Keybinding | Action |
|---|---|
Ctrl+a d | Detach from session |
Ctrl+a K | Kill all other sessions (prompts for confirmation) |
tmux attach -t <name> | Reattach to session |
tmux ls | List all sessions |
Window (Tab) Management
| Keybinding | Action |
|---|---|
Ctrl+a c | Create new window |
Ctrl+a n | Next window |
Ctrl+a p | Previous window |
Ctrl+a 0-9 | Switch to window number |
Ctrl+a , | Rename current window |
Ctrl+a & | Kill current window |
Pane Management
| Keybinding | Action |
|---|---|
Ctrl+a v | Split pane vertically (left/right) |
Ctrl+a d | Split pane horizontally (up/down) |
Ctrl+a h/j/k/l | Navigate panes (Vim style) |
Ctrl+a x | Kill current pane |
Ctrl+a z | Toggle pane zoom (fullscreen) |
Ctrl+a { | Move pane left |
Ctrl+a } | Move pane right |
Copy Mode
| Keybinding | Action |
|---|---|
Ctrl+a [ | Enter copy mode |
Space | Start selection (in copy mode) |
y | Copy selection (in copy mode) |
Enter | Copy selection and exit (in copy mode) |
q | Exit copy mode |
Ctrl+a ] | Paste buffer |
Plugin-Specific
| Keybinding | Action |
|---|---|
Alt+g | Toggle floating scratch window |
Ctrl+a ? | Show which-key helper |
Ctrl+a I | Install new plugins |
Ctrl+a U | Update plugins |
Ctrl+a Ctrl+s | Save session (resurrect) |
Ctrl+a Ctrl+r | Restore session (resurrect) |
Advanced Usage
Session Management
Create a new named session:Custom Layouts
Gentleman.Dots includes Vim-Tmux integration. When you navigate between Vim splits and Tmux panes usingCtrl+h/j/k/l, the navigation is seamless.
Status Bar Position
The status bar is positioned at the top:tmux.conf
tmux.conf
Mouse Support
Mouse support is enabled by default:tmux.conf
- Click to select panes
- Drag pane borders to resize
- Click status bar to switch windows
- Scroll with mouse wheel in copy mode
Troubleshooting
Colors look wrong in Tmux
Colors look wrong in Tmux
Ensure your terminal supports true color and the following is in your config:For Alacritty users, make sure
tmux.conf
TERM is set to alacritty in your terminal config.Vim navigation not working between Tmux and Neovim
Vim navigation not working between Tmux and Neovim
Clipboard not working
Clipboard not working
On macOS: Ensure
pbcopy is availableOn Linux/WSL: Install xclip or use the custom clip script:Plugins not loading
Plugins not loading
Make sure TPM is installed and initialized:
Customization Tips
Change Theme Colors
The Kanagawa theme can be customized. Edit the plugin settings:tmux.conf
Add More Status Bar Plugins
tmux.conf
Change Window Indexing
By default, windows start at 1:tmux.conf
Increase Scrollback Buffer
Add to your config:tmux.conf
Resources
Tmux GitHub
Official Tmux repository
TPM
Tmux Plugin Manager
Tmux Cheatsheet
Comprehensive keybinding reference
vim-tmux-navigator
Seamless Vim-Tmux navigation