From d3c958fc4693b531367c17d4ba8910f1c0065319 Mon Sep 17 00:00:00 2001 From: Tiffany Lin Date: Fri, 5 Mar 2021 19:27:16 +0000 Subject: [PATCH] Add easy window ordering binding --- tmux.conf.devpod | 7 +++++++ tmux.conf.local | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/tmux.conf.devpod b/tmux.conf.devpod index 2adeb46..567279f 100644 --- a/tmux.conf.devpod +++ b/tmux.conf.devpod @@ -316,6 +316,13 @@ bind -n M-j select-pane -D # set space to toggle between pane layouts bind '"' next-layout +# Pressing Ctrl+Shift+Left (will move the current window to the left. Similarly right. No need to use the modifier (C-a). +# https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows +# For tmux 3.0 version, you should use following key bindings +# bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 +# bind-key -n C-S-Right swap-window -t +1\; select-window -t +1) +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 # -- custom variables ---------------------------------------------------------- # to define a custom #{foo} variable, define a POSIX shell function between the diff --git a/tmux.conf.local b/tmux.conf.local index 5804e8e..5413412 100644 --- a/tmux.conf.local +++ b/tmux.conf.local @@ -316,6 +316,13 @@ bind -n M-j select-pane -D # set space to toggle between pane layouts bind '"' next-layout +# Pressing Ctrl+Shift+Left (will move the current window to the left. Similarly right. No need to use the modifier (C-a). +# https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows +# For tmux 3.0 version, you should use following key bindings +# bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 +# bind-key -n C-S-Right swap-window -t +1\; select-window -t +1) +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 # -- custom variables ---------------------------------------------------------- # to define a custom #{foo} variable, define a POSIX shell function between the