Closed kaiphat closed 2 years ago
Do you really need a plugin for this? You can easily make your own command to do it:
Say you want the 30% | 70% split you described:
function split_30_70()
local split_70_percent = vim.o.columns * 0.7
vim.cmd('vsp')
vim.cmd('wincmd h')
vim.cmd('vert resize ' .. split_70_percent)
end
vim.api.add_user_command('CustomLayout', split_30_70, { desc = 'Split 70% | 30 %' })
Thank you! But not only for that. For example: I set layout_type to 'grid' and would like to use command :NewPane in this way. 1 - 100% 2 - 50% | 50% 3 - 50% | 25% / 25% 4 - 50% | 16.7% / 16.7% / 16.7%
So, i may not use :sp and :vs and use only one command. I hope this is an understandable explanation:)
I think these types of layouts are going to be extremely bespoke/personal to a user, they're probably better off being implemented as simple commands like I've given an example of above in your own configuration.
Creating arbitrary "auto-layouts" is out of scope for this plugin IMO. I could be convinced otherwise with a well-written Pull Request implementing it.
I think there might also already be other plugins for this kind of thing.
Unless I'm misunderstanding what you mean still.
Kitty terminal have stack layout strategies. https://sw.kovidgoyal.net/kitty/layouts/#the-stack-layout I would to use auto split in nvim. Also to have strategies like vertical split 30% | vertical split 70%. Thank you!