aerial.nvim icon indicating copy to clipboard operation
aerial.nvim copied to clipboard

Take space from current window instead of pushing window to the other side

Open augustocdias opened this issue 1 year ago • 3 comments

It would be nice if aerial window could take space from the current window instead of pushing the window to the other side.

See the gif bellow. When I open aerial on the right split it pushes the window left and reduces the side of the leftmost window. tty

augustocdias avatar Aug 05 '22 16:08 augustocdias

This is one area that I've not really been happy with. Vim and Neovim don't have many affordances in the way of describing window layouts. It's basically just winwidth/winheight and winminwidth/winminheight, and winfixwidth/winfixheight. There's a great way to read a nested description of all windows in the form of winlayout(), but there's no corresponding way to write that layout.

I think this is a problem worth thinking about in-depth, and could probably use some work in nvim/vim itself. Until we get a better API for opening a vsplit than ":leftabove vsplit", it's going to require a pile of hacks to do anything specific.

stevearc avatar Aug 08 '22 15:08 stevearc

Could this help in some way?:

https://github.com/luukvbaal/stabilize.nvim

https://github.com/neovim/neovim/pull/19243

pidgeon777 avatar Oct 10 '22 16:10 pidgeon777

I think that the stabilize option is more about preventing the text from jumping in the window rather than changing which window gets resized during a split. Also IIRC it currently only works for horizontal splits.

stevearc avatar Oct 12 '22 03:10 stevearc