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

Minimize or Maximize negatives

Open aemonge opened this issue 2 years ago • 2 comments

Is it possible to allow minimizing or setting negative numbers such as: [lvim/vim]

lvim.keys.normal_mode["_"] = "<Cmd>WindowsMaximizeHorizontally -2<CR>"
lvim.keys.normal_mode["+"] = "<Cmd>WindowsMaximizeHorizontally +3<CR>"
lvim.keys.normal_mode["="] = "<Cmd>WindowsMaximizeVertically -2<CR>"
lvim.keys.normal_mode["-"] = "<Cmd>WindowsMaximizeVertically +3<CR>"

aemonge avatar Dec 07 '22 07:12 aemonge

hey @aemonge

Could you explain a little bit about your desired outcome with this functionality? It makes it easier to achieve the result if we understand what is supposed to happen.

ttytm avatar Dec 09 '22 10:12 ttytm

Hey @tobealive,

Sure! Just keep in mind, I might simply misunderstand purpose of the plugin. If this is the case just let me know, I appreciated your help and attention regardless.

How I see this is that you have a default aspect ratio for a buffer to be winheightxwinwidth, and whenever the buffer get focused that aspect ratio is forced. Basically, working with the default settings-like.

Later, you can either maximize the focused buffer, or change it's default ratio to be 95%width X 95% height. Or fully maximized to be 100%x100%.

What I was thinking is to change the default ratio of a current buffer to a specific one by adding or subtracting width/height.

So let's say you have right panel, which is your test results. You can have in your left three buffers for three different code-files, which get are stacked horizontally and would maximize on height base on the default ratio and current focus. And when you change to your right side (test output or test file), that change won't trigger a horizontal maximization since you have set that window width manually by subtracting.


So, the general idea is to have a default ratio, that can be overwritten by the user on each buffer. Setting up some buffer to dynamically maximized and other to stay static.

Sometime I do explain my self badly, please let me know if I was unclear and I'll try again to expalin my self better :bow:

aemonge avatar Dec 12 '22 15:12 aemonge