wookayin/dotfiles

Resize pane and select layout have the same key binds

adiprs-metropolis opened this issue · 4 comments

In the tmux configurations, select-layout main-horizontal and resize-pane -D 5 are bound to +. One of them needs to be bound to another key (unless there is a way to still use them that i do not know of)

bind-key + select-layout main-horizontal
bind-key = select-layout main-vertical
set-window-option -g other-pane-height 25
set-window-option -g other-pane-width 80

# vertical/horizontal split
bind-key v split-window -h -c "#{pane_current_path}"
bind-key s split-window -v -c "#{pane_current_path}"
bind-key | split-window -h -c "#{pane_current_path}"
bind-key _ split-window -v -c "#{pane_current_path}"

bind-key > resize-pane -R 10
bind-key < resize-pane -L 10
bind-key + resize-pane -D 5
bind-key - resize-pane -U 5

Hello @adiprs-metropolis, thanks for posting the issue. You are pointing that there are two conflicting <PREFIX> + keybindings:

bind-key + select-layout main-horizontal
bind-key + resize-pane -D 5

Yes, you are correct, and I mainly use + for resizing the pane. Let me think about what keys would be reasonable for select-layout main-horizontal.

How about C-a ^ ? It doesn't conflict with any of the existing bindings as far as i can see.

Do you use c-a = (or select-layout main-horizontal) often? I was actually thinking about bind-key M-= (Alt =) for main-horizontal and = for main-vertical.

FYI the following are built-in keymaps for select-layout:

M-1 even-horizontal
M-2 even-vertical
M-3 main-horizontal
M-4 main-vertical
M-5 tiled

I did not know about the built in key maps, I just use it when setting up my vim+terminal, those should be enough.