spolu / dwm.vim

Tiled Window Management for Vim
http://www.vim.org/scripts/script.php?script_id=4186
700 stars 76 forks source link

New features: Elegantly handle closed DWM windows, DWM "fix" and "split" functions #34

Closed jdonaldson closed 11 years ago

jdonaldson commented 12 years ago

This combines some of the functions I put together for dwm.vim.

DWM_Fix() will rearrange the windows, essentially stacking them and moving the current window to the main position.

DWM_Split() will perform a reasonable split... E.g., it will create a split directly below itself. If it's the main window, it will move the split to the stack

There's a new autocommand (enabled by a variable) that will automatically check for "w:dwm" variables when a buffer is closed. Those variables are set by DWM_New() and DWM_Split(). If the autocommand finds one, it will try to clean up the remaining windows. It will also adjust the quickfix window so that it always opens along the bottom, since I would imagine most people prefer that.

I tried to avoid making this too opinionated, but let me know if you want things separated out or altered.

spolu commented 12 years ago

Hi Justin, Looks great. I'll test it ASAP. Thanks!

spolu commented 11 years ago

This introduces pbs when closing windows that are stacked so this cannot be merged at the moment

jdonaldson commented 11 years ago

Yeah, I used this for a while and still had some issues. Mainly with "info panel" windows that get mixed into the editing buffers during fixes and splits. What do you mean by pbs though?

Any ways, keep going with this, dwm is great for smaller screens. I'm using a wider screen right now, and can comfortably manage triple vertical splits, etc. So I've lost a bit of motivation to make this work.

spolu commented 11 years ago

this must be a BIG screen! :) I'm using it everyday so, I'll definitely try to make it better! Thanks!