在命令模式下,输入unbind-key C-b,这将取消绑定默认的前缀键Ctrl+b。 输入set-option -g prefix C-a,这将设置新的前缀键为Ctrl+a。你可以根据自己的喜好选择其他键。 输入bind-key C-a send-prefix,这将绑定新的前缀键Ctrl+a,以便在会话之间发送前缀键。
水平方向新增面板的指令是prefix+",垂直方向是prefix+%,"和%需要两个键同时按下才能完成,加上指令前缀至少需要3~4次按键才能组成一个完整的指令,同时这个两个键也不够醒目和方便,因此我们可以绑定两个更常用的指令-、|,如下所示: unbind '"' bind - splitw -v -c '#{pane_current_path}' # 垂直方向新...
unbind%bind|split-window-h # 使用|竖屏,方便分屏 unbind'"'bind-split-window-v # 使用-横屏,方便分屏 # swap panes bind^u swapp-Ubind^d swapp-Dbind q killp bind^e last unbind r bind r source-file~/.tmux.conf \;display"Configuration Reloaded!"#--statusbar--# set-g status-justify c...
可以使用unbind-key命令,或者简写的unbind命令来取消之前的绑定,如取消之前的 PREFIX 绑定CTRL-b: unbind C-b 因为重新绑定后,之前的绑定会自动取消,因此在本例中,没有必要用unbind。 当配置文件.tmux.conf修改后,tmux 并不会自动进行重新读取和执行,需要在 tmux 会话中,使用快捷键PREFIX :进入命令模式,并执行sou...
set -g prefix C-a # unbind C-b # C-b即Ctrl+b键,unbind意味着解除绑定 bind C-a send-prefix # 绑定Ctrl+a为新的指令前缀 # 从tmux v1.6版起,支持设置第二个指令前缀 set-option -g prefix2 ` # 设置一个不常用的`键作为指令前缀,按键更快些 ...
unbind % # 取消 '%' 的绑定, 原用于左右分割窗口 bind | splitw -h # 绑定 '|' 左右分割窗口 bind r source-file ~/.tmux.conf \; display "Reloaded!" # 绑定 'r' 用于重载配置文件,重载后显示 "Reloaded!" bind s setw synchronize-panes on # 开启 pane 命令同步 ...
unbind r bind r source-file ~/.tmux.conf \; display "Configuration Reloaded!" #-- statusbar --# set -g status-justify centre set -g status-left "#[fg=red]s#S:w#I.p#P#[default]" set -g status-right '[#(whoami)#(date +" %m-%d %H:%M ")]' ...
1 \; select-window -t tmp unbind Down bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp 配置文件(~/.tmux.conf): 代码语言:javascript 复制 # 基础设置 set -g default-terminal "screen-256color" set -g display-time 3000 set -g escape-time 0 set -g history-limit...
unbind % bind | splitw -h # 选中窗口 bind-key k select-pane -U bind-key j select-pane -D bind-key h select-pane -L bind-key l select-pane -R # copy-mode 将快捷键设置为 vi 模式 setw -g mode-keys vi # 启用鼠标(Tmux v2.1) ...
unbind C-b # press C-a twice to send C-a to an application running within tmux bind C-a send-prefix # delay set -sg escape-time 1 # vi mode setw -g mode-keys vi # enable tmux display things in 256 colors set -g default-terminal "screen-256color" ...