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

vim: Add keybindings for resizing docks #23874

Merged
merged 4 commits into from
Feb 1, 2025
Merged

Conversation

AidanV
Copy link
Contributor

@AidanV AidanV commented Jan 29, 2025

Closes #23334

This does not follow the exact way that windows are resized in vim. Normally the command is ctrl-w > however this PR uses just ctrl->. This is because I could not find a good way to read in a count like 10 ctrl-w ctrl->. This is not really a problem since ctrl-> can be held down, which, in my opinion, speeds up resizing. I think this is a good compromise since it improves usability; however, I am concerned that this is not intuitive. I am looking forward to feedback.

Release Notes:

  • vim: Fixed ctrl-{<,>,+,-} for resizing docks in addition to panes

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 29, 2025
@maxdeviant maxdeviant changed the title Added Keybind for Resizing Docks vim: Add keybindings for resizing docks Jan 29, 2025
@ConradIrwin
Copy link
Member

Nice! Thank you for this!

I don't think we need to support resizing a panel you're not focused in, so I think we only need one action; and we should do the right thing depending on which dock is focused. (see here for an example of that)

It's probably easiest to re-use the existing vim::ResizePane action (even though I know these are not panes) in the same way we do for ActivatePaneInDirection, so we should be able to merge this code into the existing handler for that and leave the keybindings as is.

(Although I like the idea of having it bound to something repeatable, it seems best to have it work with what people already know from vim)

@ConradIrwin
Copy link
Member

Perfect, thank you!

@ConradIrwin ConradIrwin merged commit d0152f9 into zed-industries:main Feb 1, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to resize all panes and panels with key bindings like in Tmux
2 participants