Skip to content

Commit 065da52

Browse files
committed
added new C-S-H and C-S-L mappings to move windows around
1 parent 5c87d7b commit 065da52

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.tmux.conf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
set -g default-terminal "screen-256color"
1616

17-
setw -g xterm-keys on
17+
%if #{>=:#{version},3.2}
18+
set -g extended-keys on # needed by Control + Shift bindings
19+
%endif
1820
set -s escape-time 10 # faster command sequences
1921
set -sg repeat-time 600 # increase repeat timeout
2022
set -s focus-events on
@@ -98,9 +100,11 @@ bind -r L resize-pane -R 2
98100
# window navigation
99101
unbind n
100102
unbind p
101-
bind -r C-h previous-window # select previous window
102-
bind -r C-l next-window # select next window
103-
bind Tab last-window # move to last active window
103+
bind -r C-h previous-window # select previous window
104+
bind -r C-l next-window # select next window
105+
bind -r C-S-H swap-window -t -1 \; select-window -t -1 # swap current window with the previous one
106+
bind -r C-S-L swap-window -t +1 \; select-window -t +1 # swap current window with the next one
107+
bind Tab last-window # move to last active window
104108

105109
# toggle mouse
106110
bind m run "cut -c3- '#{TMUX_CONF}' | sh -s _toggle_mouse"

0 commit comments

Comments
 (0)