Use ctrl+alt+arrows to move panes (to match ctrl+alt+n/p to move windows)

This commit is contained in:
Kevin MacMartin 2024-10-17 22:40:41 -04:00
parent 8a94286e19
commit 93b691d152
3 changed files with 17 additions and 4 deletions

View file

@ -44,6 +44,7 @@
| Key(s) | Behaviour | | Key(s) | Behaviour |
|-----------------------------------------|--------------------------------------------------------------------| |-----------------------------------------|--------------------------------------------------------------------|
| `<Alt><Up,Down,Left,Right>` | Navigate to the pane in the respective direction | | `<Alt><Up,Down,Left,Right>` | Navigate to the pane in the respective direction |
| `<Ctrl><Alt><Up,Down,Left,Right>` | Swap the current pane with the pane in the respective direction |
| `<Alt>n` and `<Alt>p` | Switch to the next and previous window | | `<Alt>n` and `<Alt>p` | Switch to the next and previous window |
| `<Ctrl><Alt>n` and `<Ctrl><Alt>p` | Swap the current window with the next and previous window | | `<Ctrl><Alt>n` and `<Ctrl><Alt>p` | Swap the current window with the next and previous window |
| `Alt-[0-9]` | Switch to the window with the respective index | | `Alt-[0-9]` | Switch to the window with the respective index |

View file

@ -109,12 +109,18 @@ bind Right select-pane -R
bind P switch-client -p bind P switch-client -p
bind N switch-client -n bind N switch-client -n
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # (without prefix) <alt> + up,down,left and right to navigate between panes
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
bind -n M-Left select-pane -L bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
# #
# (without prefix) <ctrl><alt> + 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) <alt> + N and P to move to the next and previous windows # (without prefix) <alt> + N and P to move to the next and previous windows
bind -n M-n next-window bind -n M-n next-window
bind -n M-p previous-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-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-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-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 # general theme
set-option -g status-style bg=colour236 set-option -g status-style bg=colour236

View file

@ -109,12 +109,18 @@ bind Right select-pane -R
bind P switch-client -p bind P switch-client -p
bind N switch-client -n bind N switch-client -n
# #
# (without prefix) <alt><shift> + up,down,left and right to navigate between panes # (without prefix) <alt> + up,down,left and right to navigate between panes
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
bind -n M-Left select-pane -L bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
# #
# (without prefix) <ctrl><alt> + 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) <alt> + N and P to move to the next and previous windows # (without prefix) <alt> + N and P to move to the next and previous windows
bind -n M-n next-window bind -n M-n next-window
bind -n M-p previous-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-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-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-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 # general theme
set-option -g status-style bg=colour236 set-option -g status-style bg=colour236