-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 windows #1176
Comments
I have a branch working for horizontal resizing using a flex-like modal as recommended here by @archseer #1185 Which of the following two methods has the preferred outcome? Or do we add a config option to choose between either? |
Hmm, how different is the implementation between the two? |
I have been playing around with different solutions to this issue and the nicest way I have found is using a flex-like approach where the parents container is split between the children bounds. i.e | 1 | 1 | or | 2 | 1 | etc. However this will not allow for reducing the size of a container that defaults to the value 1 and therefore all resizing will have to be managed by growing other children to make the one you want smaller which is not very intuitive. For this draft example I have decided to hard code a slot limit per child of 20 and the each child starts with a default of 10. This feels much nicer but limits the accuracy of where you can resize your buffers to with a max of 20 potential sizes. I have also added a focus toggle that will set the current buffers bounds to double the limit, ensuring it takes the majority of screen space allowing quick toggle to focus on different files which works quite nice with the flex approach. As it stands this will be a draft until people have a play with the branch and we decide on a solution tl:dr suggestions pls |
id like to add that it would be really nice if you could use the mouse for resizing windows by dragging on the windows borders |
It would be nice if resizing was modal. A key combination enters the resize mode (C-w, r). Then you get to pick which separator you want to move. You use the directional keys (arrows or hjkl) to move the currently selected splitter up or down, left or right, depending on what direction splitter it is. You can press something like SPACE and SHIFT-SPACE to select the next or previous splitter. Alternatively you can hold SHIFT and the directional keys can be used to select the next closest splitter by direction, giving a bit more control. Pressing ESC would exist window resize mode. Disclaimer: I'm new to Helix and I could say new to Vim as well (it's been many years). Thinking of getting back into nvim and/or helix and didn't know how to resize splits in helix, so I ended up here. |
I know this is completely out of scope, and quite possibly not the direction the project would want to go, but for me the best solution would be to have the windows managed by something like zellij or tmux. For example, I create multiple zellij panes each with the same directory, then I run I guess this would involve some sort of client/server model, which may not be where |
see #312 but that is quite a large effort and I am personally not sure if/how well that would really work (for example around LSP). Either way we do want to keep the builtin split functionality so that is not really relevant to this issue |
@pascalkuthe curious why you dont think the client server model would work well around the lsp? |
Just linking for visibility. |
There's currently no way (that I see) to resize a window, once split.
There probably need some actions like "window-enlarge-horizontal", by default bound to keys like "C-S-right".
The text was updated successfully, but these errors were encountered: