Skip to content

Instantly share code, notes, and snippets.

@numb3r3
Created August 24, 2019 12:14
Show Gist options
  • Save numb3r3/cc23062f28148cc95a41d6c943478205 to your computer and use it in GitHub Desktop.
Save numb3r3/cc23062f28148cc95a41d6c943478205 to your computer and use it in GitHub Desktop.
tmux config file
# No delay for escape key press
set -sg escape-time 0
# 关闭窗口后重新编号
set -g renumber-windows on
# 事件窗口信息,如有内容变动,进行提示
setw -g monitor-activity on
set -g visual-activity on
# 历史
set -g history-limit 100000
# start index with 1
set -g base-index 1
set -g pane-base-index 1
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# 复制模式下emacs移动
setw -g mode-keys emacs
setw -g aggressive-resize on
# 修改前缀
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# 自动设置窗口的title
set-window-option -g automatic-rename on
set-option -g set-titles on
#当前目录
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# 状态栏
# Status Bar
set -g status on
#set -g status-utf8 on
set -g status-right-length 50
set -g status-left-length 50
set -g status-interval 5
set -g status-left "#[fg=green]#S"
set -g status-right "#[fg=green]%a %m-%d %R "
set -g status-justify 'centre'
set -g status-bg "colour235"
setw -g window-status-attr 'none'
setw -g window-status-format ""
setw -g window-status-current-format "#[fg=green]#I"
setw -g window-status-separator ''
set -g default-terminal "screen-256color"
# panel number显示时间
set -g display-panes-time 10000 #5s
# Reload tmux config
bind r source-file ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment