HMM 发表于 2026-5-18 23:54:04

分享 tmux 自用配置

set -g bell-action any
unbind C-b
set -g prefix C-x

set -g status-keys vi
set -gw mode-keys vi

bind-key    -T copy-mode-vi    v                  send-keys -X begin-selection
bind-key    -T copy-mode-vi    C-Space            send-keys -X begin-selection
bind-key    -T copy-mode-vi    C-n                  send-keys -X cursor-down
bind-key    -T copy-mode-vi    C-p                  send-keys -X cursor-up
bind-key    -T copy-mode-vi    C-b                  send-keys -X cursor-left
bind-key    -T copy-mode-vi    C-f                  send-keys -X cursor-right
bind-key    -T copy-mode-vi    C-a                  send-keys -X start-of-line
bind-key    -T copy-mode-vi    C-e                  send-keys -X end-of-line
bind-key    -T copy-mode-vi    C-v                  send-keys -X page-down
bind-key    -T copy-mode-vi    M-v                  send-keys -X page-up
bind-key    -T copy-mode-vi    M-w                  send-keys -X copy-pipe
bind-key    -T copy-mode-vi    C-g                  send-keys -X clear-selection
bind-key    -T copy-mode-vi    C-s                  command-prompt -i -I "#{pane_search_string}" -p "(search down)" "send -X search-forward-incremental \"%%%\""

bind-key -n C-y paste-buffer
bind-key C-x send-prefix
set-option -g history-limit 100000
bind r source-file ~/.tmux.conf\; display-message "reloading..."
bind-key -nr C-M-K resize-pane -U 5
bind-key -nr C-M-J resize-pane -D 5
bind-key -nr C-M-L resize-pane -R 5
bind-key -nr C-M-H resize-pane -L 5
bind-key -n M-k select-pane -U
bind-key -n M-j select-pane -D
bind-key -n M-l select-pane -R
bind-key -n M-h select-pane -L
bind-key o display-panes
bind-key -nr M-, previous-window
bind-key -nr M-. next-window
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
set-option -g base-index 1
set-window-option -g pane-base-index 1
set -sg escape-time 0

set -g default-terminal screen-256color
set -g status-fg white
set -g status-bg colour234

set -g set-titles on
set -g set-titles-string "[#S] tmux:#I #W"
set -g status-left-length 32
set -g status-right-length 256
set -g window-status-current-format "## #I: #W #"
set -g status-left '# #S ## #(whoami) #'
set -g status-right '#T'
set -g mouse off
页: [1]
查看完整版本: 分享 tmux 自用配置