mattboehm / vim-accordion

A vim window manager for people who love splits
101 stars 3 forks source link

Should not equalize splits when not moving off screen #24

Closed svermeulen closed 11 years ago

svermeulen commented 11 years ago

I tend to have two splits on screen and often will resize them using something like ":vertical resize -5". I find this reverts back to equalized windows when I move from one to the other. This behaviour makes sense when moving to a new (off screen) split, but I don't see why this is necessary when moving to the other split that is visible.

mattboehm commented 11 years ago

Good point, I'll work on a fix for this tonight.

svermeulen commented 11 years ago

Awesome. I took a look but could not make heads or tails of it.

svermeulen commented 11 years ago

Great, thanks! Not sure if this existed before or not, but I noticed that if I execute ':vsplit' now (after running :Accordion 2) that it keeps 3 splits open

mattboehm commented 11 years ago

That's probably a new behavior; I really need a set of automated tests to capture all possible window action combinations. Thanks for noticing. I've captured this in #25 and will address it sometime today.

mattboehm commented 11 years ago

Should be fixed now. The one caveat is that it also redraws after :sp I've opened #26 to capture this issue.

svermeulen commented 11 years ago

Yep, fixed for me.

svermeulen commented 11 years ago

Unrelated question: What is the recommended way to to make it always enabled? Hook into OnWinEnter? Add to mappings for new window/tab?

svermeulen commented 11 years ago

Another suggestion: Zoom-out should max out at the number of windows. And zoom in should stop at 1 (right now t:accordion-size will go into negative values)

mattboehm commented 11 years ago

To always enable it, you would run :AccordionAll 3 once, perhaps in your vimrc.

I should limit the zoom in to 1 if I don't already but don't want to limit zoom out as you may want to set the limit to more than the current number of splits.