Previously, my/quick-window-jump was geared mostly toward managing two or more windows. The behaviour was straightforward:
- If two windows were open, the function would directly jump to the other window.
- For more than two windows, a key selection interface would allow you to pick a window to switch to.
However, the function didn’t handle a single-window scenario intelligently. A horizontal split from a single window is something I do very frequently, by frequently, I mean at least every minute! This split is currently bound to its own keybinding, but couldn't my ace-window defun clone do this? For example, I find that the transition from a single window to a split never happens vertically for me, so why not make my/quick-window-jump perform a horizontal split from a single window and then move the point to that window?
In addition, it is very rare for me to vertically split into more than two columns. I could probably drop my current horizontal split keybinding now. If I do require another horizontal split, the default C-x 3 is already bound to muscle memory.
Lets take this function to the next level of convenience, with a very simple change, simply an extra (length window-list) and the relevant logic.