tmux配置

-- base settings --#

Add truecolor support

set-option -ga terminal-overrides ",xterm-256color:Tc"

Default terminal is 256 colors

set -g default-terminal "screen-256color"

set -g display-time 3000
set -g escape-time 0
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1

-- bindkeys --#

prefix key (Alt + z)

set -g prefix ^f
unbind ^b
bind f send-prefix

set-option -g prefix2 # 設(shè)置一個(gè)不常用的鍵作為指令前綴,按鍵更快些

split window

unbind '"'
bind f send-prefix

set-option -g prefix2 # 設(shè)置一個(gè)不常用的鍵作為指令前綴,按鍵更快些

split window

unbind '"'

vertical split (prefix -)

bind - splitw -v -c '#{pane_current_path}'
unbind %
bind = splitw -h -c '#{pane_current_path}' # horizontal split (prefix |)

select pane

bind k selectp -U # above (prefix k)
bind j selectp -D # below (prefix j)
bind h selectp -L # left (prefix h)
bind l selectp -R # right (prefix l)

resize pane

bind -r ^k resizep -U 10 # upward (prefix Ctrl+k)
bind -r ^j resizep -D 10 # downward (prefix Ctrl+j)
bind -r ^h resizep -L 10 # to the left (prefix Ctrl+h)
bind -r ^l resizep -R 10 # to the right (prefix Ctrl+l)

reload config (prefix r)

bind r source ~/.tmux.conf ; display "Configuration reloaded!"

set-option -g mouse on

設(shè)置窗口面板起始序號

set -g base-index 1 # 設(shè)置窗口的起始下標(biāo)為1
set -g pane-base-index 1 # 設(shè)置面板的起始下標(biāo)為1
set -s focus-events on
set-window-option -g automatic-rename on
set-window-option -g monitor-activity on

statusbar

set -wg window-status-format " #I #W " # 狀態(tài)欄窗口名稱格式
set -wg window-status-current-format " #I:#W#F " # 狀態(tài)欄當(dāng)前窗口名稱格式(#I:序號,#w:窗口名稱,#F:間隔符)
set -wg window-status-separator "|" # 狀態(tài)欄窗口名稱之間的間隔
set -g message-style "bg=#202529, fg=#91A8BA" # 指定消息通知的前景、后景色

自定義狀態(tài)欄

set -g status-interval 1 # 狀態(tài)欄刷新時(shí)間
set -g status-justify left # 狀態(tài)欄列表左對齊
setw -g monitor-activity on # 非當(dāng)前窗口有內(nèi)容更新時(shí)在狀態(tài)欄通知

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容