set-option -g prefix `
# 重载配置文件
bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."
# 窗口排序
bind R \
set -g renumber-windows on\; \
new-window\; kill-window\; \
set -g renumber-windows off\; \
display-message "Windows reordered..."
# 历史缓冲区
set -g history-limit 5000
# 开启鼠标支持
#set-option -g mouse on
# 2.1 版本之前需要以下四条配置
#setw -g mode-mouse on # 支持鼠标选取文本等
#setw -g mouse-resize-pane on # 支持鼠标拖动调整面板的大小(通过拖动面板间的分割线)
#setw -g mouse-select-pane on # 支持鼠标选中并切换面板
#setw -g mouse-select-window on # 支持鼠标选中并切换窗口(通过点击状态栏窗口名称)
# 分屏快捷键
#unbind '"'
#unbind '%'
bind - splitw -v -c '#{pane_current_path}' # 垂直方向新增面板,默认进入当前目录
bind | splitw -h -c '#{pane_current_path}' #
# 分屏移动快捷键
bind -r k select-pane -U # 绑定k为↑
bind -r j select-pane -D # 绑定j为↓
bind -r h select-pane -L # 绑定h为←
bind -r l select-pane -R # 绑定l为→
# 状态栏
set -g base-index 1 # 设置窗口的起始下标为1
set -g pane-base-index 1 # 设置面板的起始下标为1
#set -g status-utf8 on # 状态栏支持utf8
set -g status-interval 1 # 状态栏刷新时间
set -g status-justify left # 状态栏列表左对齐
setw -g monitor-activity on # 非当前窗口有内容更新时在状态栏通知
set -g status-left "#[bg=#FF661D] ❐ #S " # 状态栏左侧内容
set -g status-left-length 300 # 状态栏左边长度300
set -g status-right-length 500 # 状态栏左边长度500
set -wg window-status-format " #I #W " # 状态栏窗口名称格式
set -wg window-status-current-format " #I:#W#F " # 状态栏当前窗口名称格式(#I:序号,#w:窗口名称,#F:间隔符)
set -wg window-status-separator "" # 状态栏窗口名称之间的间隔
# 开启256 colors支持
set -g default-terminal "screen-256color"
# 复制粘贴 `+[ 进入复制模式 空格键开始选择 回车键选择完成 `+]粘贴
setw -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# 2.4版本以下生效
#bind -t vi-copy v begin-selection # 绑定v键为开始选择文本
#bind -t vi-copy y copy-selection # 绑定y键为复制选中文本
tmux配置
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
下一篇:screen 保留原有窗口大小
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
AntSword配置
此文描述AntSword工具安装操作。
初始化 加载器 管理工具 AntSword -
tmux
What is Tmux?Tmux is a tool tha
ide 上传 bash -
初识tmux---编译安装tmux
初识tmux---编译安装tmux
初识 tmux 编译安装 -
记录 | ubuntu tmux的安装配置
记录 | ubuntu tmux的安装配置
ubuntu linux tmux 终端管理 分屏 -
配置工具篇(tmux+ranger+lazygit)
官方解释:ranger是一个带有VI密钥绑定的
linux 运维 服务器 快捷键 重命名