Tmux 使用指南

This guide recommends using the popular Oh My Tmux! configuration for a powerful and user-friendly Tmux experience.
1. Installation
Section titled “1. Installation”To install this configuration:
cdgit clone https://github.com/gpakosz/.tmux.gitln -s -f .tmux/.tmux.confcp .tmux/.tmux.conf.local .2. Configuration
Section titled “2. Configuration”The configuration is split into two files:
~/.tmux.conf: The main configuration file (do not edit this).~/.tmux.conf.local: Your local customizations (edit this file).
Recommended Customizations
Section titled “Recommended Customizations”Add the following to your ~/.tmux.conf.local to improve usability:
# Increase history sizeset -g history-limit 50000
# Change prefix key to Backtick (`)unbind C-bset -g prefix `bind ` send-prefix
# Move status line to topset -g status-position top
# Enable mouse mode (optional)set -g mouse on3. Key Bindings
Section titled “3. Key Bindings”Here are some useful key bindings (assuming default prefix C-b or your custom prefix):
| Key | Action |
|---|---|
Prefix + c | Create new window |
Prefix + n | Next window |
Prefix + p | Previous window |
Prefix + % | Split window vertically |
Prefix + " | Split window horizontally |
Prefix + z | Toggle zoom pane |
Prefix + [ | Enter copy mode |
Prefix + r | Reload configuration |
4. Features
Section titled “4. Features”- Status Bar: Informative status bar with CPU, memory, and battery usage.
- Navigation: Vim-like pane navigation (
h,j,k,l). - Copy Mode: Enhanced copy mode with system clipboard integration.
For more details, refer to the official repository.