dotfiles

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

commit 535e22b35bf997169a322db0f9632a729a02d3d3
parent 7429e2d6623e9ec3333c71ad8073530acf63fa43
Author: Chris Bracken <chris@bracken.jp>
Date:   Thu, 17 Jul 2025 19:57:14 -0700

tmux: add custom swap panes implementation

The default tmux swap-pane -U/-D command will only swap with
next/previous pane, not with pane above/below. Instead, we use shifted
vi navigation keys to swap with pane to left/down/up/right as determined
by which pane would be selected via select-pane -L/-D/-U/-R.

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

diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -34,6 +34,13 @@ bind-key h select-pane -L bind-key j select-pane -D bind-key k select-pane -U bind-key l select-pane -R + +# 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 +bind-key J select-pane -m\; select-pane -D\; swap-pane\; select-pane -D\; select-pane -M +bind-key K select-pane -m\; select-pane -U\; swap-pane\; select-pane -U\; select-pane -M +bind-key L select-pane -m\; select-pane -R\; swap-pane\; select-pane -R\; select-pane -M bind-key ? list-keys # Use vi-like selection keys in copy mode.