Skip to content

Commit 8884753

Browse files
committed
feat(tmux): add hotkey to create a small pane below
Prefix + Ctrl t : Create a new pane that is 16% of the size of the current pane and below the current pane
1 parent d07a8a8 commit 8884753

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ All the following shortcuts keys must first press the prefix key.
853853
- `L` : Resize the pane right
854854
- `Ctrl` `l` : Clear all the messages(include history messages) in the active pane
855855
- `Ctrl` `b` : Toggle pane name of the current window's all panes
856+
- `Ctrl` `t` : Create a new pane that is 16% of the size of the current pane and below the current pane
856857

857858
#### <a name="Copy-Mode"></a>Copy Mode [](#Key-Bindings)
858859

tmux/tmux.conf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ set -g history-limit 50000
7777
# 支持使用鼠标切换窗口, 调整窗格大小等.
7878
set -g mouse on
7979

80-
# 终端标签页设置标题.
81-
set -g set-titles on
82-
8380
# prefix : 进入 command 模式后, 使用 vi 的键映射, 默认 emacs.
8481
set -g status-keys vi
8582

@@ -284,6 +281,10 @@ bind C-k run 'decrease-opacity'
284281
# ctrl j 降低 Alacritty 的透明度.
285282
bind C-j run 'increase-opacity'
286283

284+
# ctrl t 在当前窗格下方创建一个当前窗格的 16% 大小的新窗格.
285+
# NOTE: 主要用于在使用 vim 编写代码时, 在当前窗格中临时建一个新窗格来执行命令行.
286+
bind C-t run 'tmux split-window -v -p 16'
287+
287288
# b 显示或隐藏当前 session 的状态栏.
288289
bind b set status
289290

@@ -553,6 +554,7 @@ run '~/.tmux/plugins/tpm/tpm'
553554
# O 执行 toggle-alacritty-transparent, 用来在透明和不透明之间切换 Alacritty 的背景.
554555
# ctrl k 执行 decrease-opacity, 用来增加 Alacritty 的透明度.
555556
# ctrl j 执行 increase-opacity, 用来降低 Alacritty 的透明度.
557+
# ctrl t 在当前窗格下方创建一个当前窗格的 16% 大小的新窗格.
556558
#
557559
# **** session 管理 ****
558560
# s 列出所有 session.

0 commit comments

Comments
 (0)