tmux的配置

就装了两个插件,基本就只改了快捷键,谁让tmux的快捷键太2了

#设置终端颜色为256色  
set -g default-terminal "screen-256color"  
#设置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]%b %d %R"  
set -g status-interval 60  
set -g status-justify centre 

set -g base-index         1     # 窗口编号从 1 开始计数
set -g display-panes-time 10000 # PREFIX-Q 显示编号的驻留时长,单位 ms
set -g mouse              on    # 开启鼠标
set -g pane-base-index    1     # 窗格编号从 1 开始计数
set -g renumber-windows   on    # 关掉某个窗口后,编号重排

# 启用活动警告
setw -g monitor-activity on
set -g visual-activity on

#用ctrl+j 代替ctrl+b的前缀键,alt的用m-
set -g prefix C-j
unbind C-b
bind C-j send-prefix

bind k split-window -h	#水平分屏
bind l split-window -v	#竖直分屏
bind M-i select-pane -U	#向上
bind M-k select-pane -D	#向下
bind M-j select-pane -L	#向左
bind M-l select-pane -R	#向右
#bind q confirm-before -p "kill-pan #P? (y/n)" kill-pane
bind-key : kill-pane	#分号直接干掉这个窗口,不用确认
bind j resize-pane -Z	#我觉得双击j比较方便
bind -r C-i resize-pane -U 5
bind -r C-k resize-pane -D 5
bind -r C-j resize-pane -L 5
bind -r C-l resize-pane -R 5
unbind '"'
unbind %


# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

set -g @plugin 'tmux-plugins/tmux-yank'			#复制用
set -g @plugin 'tmux-plugins/tmux-resurrect'	#安装tmux-resurrect
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'

#安装时 prefix + C-I,注意是大写的I
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

#tmux source ~/.tmux.conf 重载tmux配置文件

你可能感兴趣的:(软件配置)