I often have an Emacs frame that is partitioned into two windows like so:
--------------------------------
| |
| Window 1 |
| |
|------------------------------|
| |
| Window 2 |
| |
--------------------------------
Then I find myself needing a long vertical window that runs the entire height of the frame, like so:
--------------------------------
| | |
| W'dow 3 | Window 1 |
| | |
| |--------------------|
| | |
| | Window 2 |
| | |
--------------------------------
However, using C-x 3 it's only possible to split either Window 1 or Window 2. The only way to create the long vertical Window 3 is to start again with a single window filling the entire frame, and split it horizontally (then split one of the windows in half again, vertically). This is annoying.
I guess what I'm looking to do is to split the entire frame, rather than just the active window. I've Googled for solutions, but without success. Is it possible to create a new window that runs down the entire length of an Emacs frame, regardless of any windows that already exist inside it?
(split-window
(frame-root-window)
nil 'left)
This works:
(defun complex-split ()
(interactive)
(let (
(thisBuffer (buffer-name))
otherBuffer
)
(other-window 1)
(setq otherBuffer (buffer-name))
(delete-other-windows)
(split-window-horizontally)
(other-window 1)
(split-window-vertically)
(switch-to-buffer thisBuffer)
(other-window 1)
(switch-to-buffer otherBuffer)
)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With