Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize pane and select layout have the same key binds #34

Closed
adiprs-metropolis opened this issue Jun 22, 2022 · 4 comments
Closed

Resize pane and select layout have the same key binds #34

adiprs-metropolis opened this issue Jun 22, 2022 · 4 comments

Comments

@adiprs-metropolis
Copy link

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
@wookayin
Copy link
Owner

wookayin commented Jul 8, 2022

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.

@adiprs-metropolis
Copy link
Author

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

@wookayin
Copy link
Owner

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

@adiprs-metropolis
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants