I’m using the latest MacVim. Is there any way to have it so if I open MacVim without a file or with only one file, it sets the window width to n characters? Then if I do a vertical split it will expand the window width to 2n characters? Same for 3 vertical splits but it will stop increasing the width after the window is 3n characters. Then if I close those splits it will resize down?
Share
This appears to work. Whether or not a horizontal split has been done, any time a vsplit is created or deleted the window is resized.
Configure the window width by changing the variable at the top. You probably want to do something like
let g:auto_resize_width = &columnsto set it to use the width of the original window as the width to resize by.Things get a little wonky if you have so many vsplits that the window becomes maximized horizontally. I’m trying to find a fix and I’ll post it if I find one.