tmux的简单配置

# Set a Ctrl-b shortcut for reloading your tmux config
unbind r
bind r source-file ~/.tmux.conf

# bind . to rename session
unbind .
bind . command-prompt -I "#S" "rename-session %%"

# bind prefix key
set -g prefix ^a
unbind ^b
bind a send-prefix

# Movement
bind ^k selectp -U # 选择上窗格
bind ^j selectp -D # 选择下窗格
bind ^h selectp -L # 选择左窗格
bind ^l selectp -R # 选择右窗格

bind h selectw -p # 选择上窗口
bind l selectw -n # 选择下窗口

bind-key < swap-window -t - # 移动窗口到上一个
bind-key > swap-window -t + # 移动窗口到下一个

# split panel
bind \ split-window -h
bind - split-window -v

#Set default terminal to 256 colors
set -g default-terminal "screen-256color"

# vim helper
set -g mode-keys vi
set -g status-keys vi
set -g window-status-current-attr underscore

# Add some nice copy and paste shortcuts.
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy V rectangle-toggle

# mix
set -g escape-time 0
set -g aggressive-resize on
set -g history-limit 20000
set -g visual-activity off
bind s choose-session

# title
set -g set-titles on
set -g set-titles-string '#T TMUX:#S.#I.#P #W' # window number,program name,active (or not)

# status bar
set -g status on
set -g status-utf8 on
set -g status-interval 1
set -g status-left-length 60
set -g status-right-length 90
set -g status-left '#[fg=green]#S'
set -g status-right '#[fg=yellow]#(uptime | egrep -o "[0-9]+ users?, +load.*"|perl -pe "s| averages?||"), %H:%M:%S'

# COLORS
set -g pane-border-fg colour236
set -g pane-border-bg black
set -g pane-active-border-fg colour245
set -g pane-active-border-bg black

set -g message-fg black
set -g message-bg green

set -g status-bg colour236
set -g status-fg colour241
set -g window-status-fg default
set -g window-status-bg default
set -g window-status-current-bg colour235
set -g window-status-current-fg colour255

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!

记住Git密码 上一篇
[转载]awesome-android-tips 下一篇