lens.vim
lens.vim copied to clipboard
Option to keep nearby buffers big as well
Hey, thanks for this awesome plugin. I use side by side files a lot so this I thought comes in handy.
I mainly have multiple files side-by-side so I can check the other files when writing into one file.
The way lens currently works seems to minify the nearby neeighbours once I switch from them which is the exact opposite of what I need.
Here is a screen of what I was hoping lens could do for me.
You're likely busy so I'm posting this hoping it would find a few more people like me who want this.
Also I'm happy to buy you a coffee as this will likely increase my productivity.
Btw I am using it without animate (not sure if that affects things).
check if this fixes your issue https://github.com/camspiers/lens.vim/pull/25#issuecomment-609892129
Not clear what should happen with edge cases, like
- what if there are 2 windows?
- what if there are 2 horizontal windows?
- what if there are 3 vertical windows and and vim (gvim or terminal) size is not enough to hold 3 equal big windows? and you switched to most left? or to most right?
- what if there are 4 vertical windows and there is not enough space etc etc etc
Is there a way I can experiment with this and get back to you? Which part of the code should I look at to customize the sizing function?
I think I'd start with this logic and see how it behaves.
current_open_width = get_ideal_width(current_window)
left_open_width = get_ideal_width(left_window)
right_open_width = get_ideal_width(right_window)
lens_width = current_open_width + left_open_width + right_open_width
min_remaining_width = min_width * other_window_count
while ((screen_width - lens_width - min_remaining_width) < 0) {
left_open_width -= 1
right_open_width -= 1
lens_width = current_open_width + left_open_width + right_open_width
}