tmux 配置

#将激活控制台的快捷键由Ctrl+b修改为Ctrl+a,Ctrl+a是Screen的快捷键
set-option -g prefix M-a   
unbind-key C-b   
bind-key M-a send-prefix   

#此类配置可以在命令行模式中输入show-options -g查询   
set-option -g base-index 1                        #窗口的初始序号;默认为0,这里设置为1   
#set-option -g default-terminal "screen-256color"  # + "tmux -2" => 256 color
set-option -g status-justify left
#set-option -g status-interval 15 		  #15 sec refresh
#set-option -g display-time 5000                   #提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒   
#set-option -g repeat-time 1000                    #控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 15
set-option -g status-right-length 55
set-option -g status-keys vi                      #操作状态栏时的默认键盘布局;可以设置为vi或emacs   
set-option -g status-utf8 on                      #开启状态栏的UTF-8支持   
set-option -g status-left "#[fg=white,bg=blue] > #S < #[default] |" # session-name
set-option -g status-right "#[fg=red,bright][ #[fg=cyan]#H #[fg=red]]#[default] #[fg=yellow,bright]- %Y.%m.%d #[fg=green]%H:%M #[default]#[fg=magenta,bright](load: #(cat /proc/loadavg | cut -d \" \" -f 1,2,3))#[default]"
      
#此类设置可以在命令行模式中输入show-window-options -g查询   
set-window-option -g window-status-current-fg blue
set-window-option -g window-status-current-bg yellow
set-window-option -g window-status-current-attr default # bright
set-window-option -g mode-keys vi    		  #复制模式中的默认键盘布局;可以设置为vi或emacs   
set-window-option -g utf8 on         		  #开启窗口的UTF-8支持   
      
#添加自定义快捷键   
#bind-key z kill-session 	                  #按z结束当前会话;相当于进入命令行模式后输入kill-session   
#bind-key -n C-right next-window
#bind-key -n C-left  previous-window
bind-key -n M-k next-window
bind-key -n M-j previous-window

unbind %
unbind '"'
unbind .
unbind ,
unbind &
bind v split-window -v
bind h split-window -h
bind r command-prompt "rename-window %%"
bind m command-prompt "move-window -t '%%'"
bind k confirm-before "kill-pane"
bind K confirm-before "kill-window"
#bind / command-prompt "split-window 'exec man %%'"
#bind '~' split-window "exec htop"

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值