mrjones2014 / smart-splits.nvim

🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
895 stars 37 forks source link

[Feature]: Something like an accordion mode for smart resizing of splits #129

Closed lougreenwood closed 11 months ago

lougreenwood commented 11 months ago

Similar Issues

Description

I usually work on a large monitor, but recently I was on a trip and needed to work only on my laptop screen. I was struck by how my laptop screen and large font size don't allow for much to be shown when I have my usual layout of vsplits.

Something that came to mind is that for this scenario, having all my splits automatically collapse (maybe not fully, maybe keep each sized to 10% or 300 px etc) and as I move through the splits the new current split would expand and each would collapse, something like this:

| 1              | 2 | 3 | 4 |

| 1 | 2              | 3 | 4 |  

| 1 | 2 | 3              | 4 |

| 1 | 2 | 3 | 4              |

In terms of how this might work:

I realise that there's a lot to digest in the above, but I just wanted to provide a decent amount of context and help to sketch out the vision for this quite nuanced feature. I think it would need to feel very simple and intuitive for user interactions, which requires complexity being moved into the implementation.

🙇 Thanks!

mrjones2014 commented 11 months ago

This sounds like functionality that is already implemented by other plugins, for example focus.nvim. Let me know if I got something wrong and I can reopen.

lougreenwood commented 11 months ago

Thanks for the suggestion @mrjones2014 - I'm not sure if focus.nvim fully meets the expectations, but it seems that it's on the right track. Unless I mis-understand it seems to be quite "focussed" on using the golden ratio as the basis of the split resizing.

But thanks for the tip!