diff --git a/readme.md b/readme.md index 7bf365c..2d726dc 100644 --- a/readme.md +++ b/readme.md @@ -44,6 +44,7 @@ | Key(s) | Behaviour | |-----------------------------------------|--------------------------------------------------------------------| | `` | Navigate to the pane in the respective direction | +| `` | Swap the current pane with the pane in the respective direction | | `n` and `p` | Switch to the next and previous window | | `n` and `p` | Swap the current window with the next and previous window | | `Alt-[0-9]` | Switch to the window with the respective index | diff --git a/tmux.normal.conf b/tmux.normal.conf index b1db985..373c585 100644 --- a/tmux.normal.conf +++ b/tmux.normal.conf @@ -109,12 +109,18 @@ bind Right select-pane -R bind P switch-client -p bind N switch-client -n # -# (without prefix) + up,down,left and right to navigate between panes +# (without prefix) + up,down,left and right to navigate between panes bind -n M-Up select-pane -U bind -n M-Down select-pane -D bind -n M-Left select-pane -L bind -n M-Right select-pane -R # +# (without prefix) + up,down,left and right to swap the pane with the one in that direction +bind -n C-M-Up swap-pane -s '{up-of}' +bind -n C-M-Down swap-pane -s '{down-of}' +bind -n C-M-Left swap-pane -s '{left-of}' +bind -n C-M-Right swap-pane -s '{right-of}' +# # (without prefix) + N and P to move to the next and previous windows bind -n M-n next-window bind -n M-p previous-window @@ -151,7 +157,7 @@ set-option -g status-interval 2 # the number of seconds to wait before refreshin set-option -g status-justify left # justify the window list on the left set-option -g status-left-length '100' # the width in characters of the left side of the status line set-option -g status-right-length '100' # the width in characters of the right side of the status line -set-window-option -g window-status-separator '' # the character to separate entries of the status line with +set-window-option -g window-status-separator '' # the character with which to separate entries of the status line # # general theme set-option -g status-style bg=colour236 diff --git a/tmux.powerline.conf b/tmux.powerline.conf index 589559a..ebd3300 100644 --- a/tmux.powerline.conf +++ b/tmux.powerline.conf @@ -109,12 +109,18 @@ bind Right select-pane -R bind P switch-client -p bind N switch-client -n # -# (without prefix) + up,down,left and right to navigate between panes +# (without prefix) + up,down,left and right to navigate between panes bind -n M-Up select-pane -U bind -n M-Down select-pane -D bind -n M-Left select-pane -L bind -n M-Right select-pane -R # +# (without prefix) + up,down,left and right to swap the pane with the one in that direction +bind -n C-M-Up swap-pane -s '{up-of}' +bind -n C-M-Down swap-pane -s '{down-of}' +bind -n C-M-Left swap-pane -s '{left-of}' +bind -n C-M-Right swap-pane -s '{right-of}' +# # (without prefix) + N and P to move to the next and previous windows bind -n M-n next-window bind -n M-p previous-window @@ -151,7 +157,7 @@ set-option -g status-interval 2 # the number of seconds to wait before refreshin set-option -g status-justify left # justify the window list on the left set-option -g status-left-length '100' # the width in characters of the left side of the status line set-option -g status-right-length '100' # the width in characters of the right side of the status line -set-window-option -g window-status-separator '' # the character to separate entries of the status line with +set-window-option -g window-status-separator '' # the character with which to separate entries of the status line # # general theme set-option -g status-style bg=colour236