Open AlphabetsAlphabets opened 1 year ago
hey, thanks for the suggestion! I wonder if this is applicable as (IIRC) there's no events to listen to for a window resize, but definitely worth investigating!
hey, thanks for the suggestion! I wonder if this is applicable as (IIRC) there's no events to listen to for a window resize, but definitely worth investigating!
I'm not sure what the code is like under the hood but is there a need to listen for a window resize event? If I move to the buffers created by the plugin and manually type :set wfw
I can use <C-w>=
as much as I want, and the buffer with wfw
set won't change in size.
If I move to the buffers created by the plugin and manually type :set wfw I can use
= as much as I want, and the buffer with wfw set won't change in size.
That is interesting, I assume providing the wo
option to the side buffers would be enough, as we forward any bo
or wo
options, something like:
require("no-neck-pain").setup({
width = 70,
buffers = {
wo = {
winfixwidth = true,
},
},
})
but IIRC it gets overridden if you open a vsplit.
Could you share the full set of command you'd apply and the expect behavior? So that I can both see if it's doable, and provide a test suite :)
but IIRC it gets overridden if you open a vsplit.
Looks like you're right, I didn't think about this. I'd have to use :set wfw
each time the pads disappear.
I assume providing the wo option to the side buffers would be enough, as we forward any bo or wo options, something like:
If that's the case that should be good right?
Could you share the full set of command you'd apply and the expect behavior? So that I can both see if it's doable, and provide a test suite :)
In my case I only have the left pad open so
<C-w>h
:set wfw
.<C-w>l
<C-w>=
to make all the windows equal. What should happen is that every window will resize except for the pads.Hey @shortcuts I completely forgot about this, I was wondering if you have the time to look at this again?
Describe the problem
When the two pads show up (or one) to center the content on the screen, I would be nice if the user could optionally configure it to have fixed widths.
The reason I think this is nice is because when I open up a horizontal split and would either maximize the top or bottom split. I sometimes want to look at both of them at the same time again, I would use
<C-w>=
. But that also resizes width of the pads.Describe the solution
In the setup function there could be
fixwidth = true
inbuffers
.Or it could be for left and right as well. Having this set would just set the
winfixedwidth
option for the left and right buffers.