-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Allow user to specify the number of rows or columns to increase or decrease by when resizing pane via keyboard. #17843
Comments
Thanks for filing! Yeah, this seems like something we could add in as an action arg for the resize pane action. |
@carlos-zamora If you think this could be a good first ticket for me and you have some cycles to provide guidance, I can work on it. |
Sure! I can help a bit. Here's a writeup of what needs to be done. Hope it helps 🙂
References:
|
After a few minutes looking through the code, I see the default behavior is to resize the pane in 5% increments based on the focused pane's dimensions. This explains the peculiar resize behavior (i.e. 5% of 500px pane vs 5% of a 1000px pane). Questions:
|
Hmm, looks like 📝 Keep in mind, different terminals/panes may be using different font sizes (though I think you'll be fine; you'll just have to retrieve the font dimensions from the current pane/terminal and use that). Looks like the font dimensions are exposed on 📝 Hmm... if the current pane isn't a terminal, what should we do to resize? I think it would still be good to resize as opposed to just preventing the action from happening, but it'll probably be something to play with to see how it feels "right".
Oh totally. I have a personal dislike for pixels as a unit though haha. Maybe percentage? That would avoid all of the extra work I mentioned above, and you'd really just modify the Oh, I also found this PR: #16895. Seems pretty relevant to you 🙂. |
Description of the new feature/enhancement
When resizing panes via keyboard, it would be nice to specify the resize amount. Right now, when you resize the pane, the amount is different depending on pane width, window width, etc. Can we have the ability to resize by X columns or rows (depending on resize direction)?
Proposed technical implementation details (optional)
In the keyboard settings, when assigning a keyboard shortcut for pane resizing, allow a second integer value specifying the number of columns or rows to resize by.
If the user specifies the value 2 for the resize pane action, then if they grow or shrink the pane, it will increase or decrease by 2 rows or columns depending on direction.
The text was updated successfully, but these errors were encountered: