我的tmux配置

2021-06-27 07:45:46 字數 1914 閱讀 8085

最近從screen轉到了tmux,感覺很不錯

#設定prefix為ctrl-a

set -g prefix c-a

#解除ctrl-b與prefix的對應關係

unbind c-b

#copy-mode將快捷鍵設定為vi模式

setw -g mode-keys vi

#將r鍵設定為載入配置檔案,並顯示"reloaded!"資訊

bind r source-file ~/.tmux.conf \; display "reloaded!"

unbind '"'

bind - splitw -v # 分割成上下兩個視窗

unbind %

bind \ splitw -h # 分割成左右兩個視窗

unbind o

bind / select-pane -t :.+

unbind &

bind k kill-window

#bind k confirm-before -p "kill-window #w? (y/n)" kill-window

bind x kill-pane

unbind !

bind = break-pane

unbind l

bind c-a last-window

#設定終端顏色為256色

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

#開啟status-bar uft-8支援

set -g status-utf8 on

#設定pan前景色

set -g pane-border-fg green

#設定pane背景色

set -g pane-border-bg black

#設定活躍pane前景色

set -g pane-active-border-fg white

#設定活躍pane背景色

set -g pane-active-border-bg yellow

#設定訊息前景色

set -g message-fg white

#設定訊息背景色

set -g message-bg black

#設定訊息高亮顯示

set -g message-attr bright

#設定status-bar顏色

set -g status-fg white

set -g status-bg black

#設定視窗列表顏色

setw -g window-status-fg cyan

setw -g window-status-bg default

setw -g window-status-attr dim

#設定當前視窗在status bar中的顏色

setw -g window-status-current-fg white

setw -g window-status-current-bg red

setw -g window-status-current-attr bright

#設定status bar格式

set -g status-left-length 40

set -g status-left "#[fg=green]session: #s #[fg=yellow]#i #[fg=cyan]#p"

set -g status-right "#[fg=cyan]%d %b %r"

set -g status-interval 60

set -g status-justify centre

#開啟window事件提示

setw -g monitor-activity on

set -g visual-activity on

我的tmux配置

general setting set option g prefix c a set window option g automatic rename off statusbar properties.set g display time 3000 set g status bg black se...

tmux配置小談

基本配置 在配置檔案 tmux.conf 中加入下面這條語句 設定字首為ctrl a set g prefix c a 與此同時,取消預設的字首按鍵 解除ctrl b 與字首的對應關係 unbind c b 配置完以後,重啟tmux起效,或者先按c b,然後輸入 進入命令列模式,在命令列模式下輸入 ...

tmux使用及配置

這篇部落格跟以前的vim配置一樣,都是為了以後本人自己方便備份的tmux配置檔案 0.安裝 centos預設自帶的軟體是screen,沒有帶tmux,所以需要源 安裝 這個時候會出錯,因為tmux需要libevent環境。而且高版本的tmux需要libevent版本是2.0以上的,而centos6....