tmux的配置

下面是~/.tmux.config文件内容,为了要实现tmux和系统剪切板的同步需要apt-get install xclip

#设置终端颜色为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


# split panes using | and -
bind l split-window -h #扩展窗口
bind j split-window -v
unbind '"'
unbind %

#移动扩展出的窗口
bind C-k select-pane -U	#向上
bind C-j select-pane -D	#向下
bind C-h select-pane -L	#向左
bind C-l select-pane -R	#向右
bind b resize-pane -Z	#b全屏
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on


bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' #复制到系统剪切板
bind-key -T copy-mode-vi C-h select-pane -L #复制模式时移动光标 
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tux~

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值