dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 6488cb8443bc1fa8350739d7ef638415b85772ea
parent d2b6e2de06c14f4582aac76feb916d96ddf7e884
Author: Chris Bracken <chris@bracken.jp>
Date:   Fri, 24 May 2024 23:45:52 -0700

tmux: add key binding to clear to scroll buffer

Adds a binding of <C-b>b to clear the scroll buffer, and the screen.

In macOS Terminal.app and in iTerm, Cmd-K clears the screen and the
scroll buffer. This is a pretty nice feature, particularly when
searching backwards through test results, since it avoids picking up
output from previous runs.

Diffstat:
M.config/tmux/tmux.conf | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -25,6 +25,9 @@ bind-key -T copy-mode-vi 'v' send-keys -X begin-selection bind-key -T copy-mode-vi 'y' send-keys -X copy-selection bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle +# Clear screen and reset scroll buffer. +bind-key b send-keys -R C-l\; clear-history + # Frequently used layouts. bind-key ^ split-window -h\; split-window -v\; select-pane -U\; select-pane -L bind-key \\ split-window -h\; split-window -h\; select-layout even-horizontal\; select-pane -L