commit d5987d91bddff3d0f6f422fb518be9cd7f85b7fe
parent 99efb879af0bd62856c314819c77681d4f28c976
Author: Chris Bracken <chris@bracken.jp>
Date: Sat, 20 Sep 2025 14:12:26 +0900
tmux: add binding to swap window left/right
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
@@ -35,6 +35,10 @@ bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
+# Use vi-like keys for swapping windows with neighbouring windows.
+bind-key P swap-window -t :-\; select-window -t :-
+bind-key N swap-window -t :+\; select-window -t :+
+
# Use vi-like keys for swapping panes with neighbouring panes rather than tmux
# default swapping behaviour of swapping with next/prev pane.
bind-key H select-pane -m\; select-pane -L\; swap-pane\; select-pane -L\; select-pane -M