mattboehm / vim-accordion

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

:AccordionPin to fix a given split out of the juggling #7

Closed goldfeld closed 10 years ago

goldfeld commented 11 years ago

Without arguments it could fix the current split in it's relative place (e.g. if it's the middle opened split sandwiched by other two, make it continue to be the middle split while the splits to the right and left change.) An :AccordionUnpin would be in demand too.

mattboehm commented 11 years ago

Interesting, so essentially a way to re-organize split order if I'm understanding correctly:

Start: 4 splits with cursor in C
| A | B |(C)| D |
Pin C and do <C-w>h
| A |(C)| B | D |

Or perhaps does it hold its position as always the 3rd split?

Start: 4 splits with cursor in C
|| B | C |(D)| E |
Pin C and do <C-w>h
|| B |(C)| D | E |
<C-w>h
||(B)| C | D | E |
<C-w>h
|(A)| C | B | D ||

Depends on whether you're pinning a buffer to your cursor or to a frame in the viewport.

Should not be too hard, but recommend first switching to the "push strategy" described in #2 as it would effect the implementation.

mattboehm commented 11 years ago

@goldfeld please let me know which of the two above behaviors you had in mind.

mattboehm commented 10 years ago

This would be really tricky to add to the current functionality, and I think it might be better to leave the plugin so that it only resizes windows and does not also reorder them. If you can answer the above question and make a strong case, I'll reconsider but until then, I'm going to close this.