emacs 26.1
I split windows-horizontally by split-window-horizontally
Nice. Now I want to get smt like this:
I try split-window-vertically
, but I get this (not correct result):
emacs 26.1
I split windows-horizontally by split-window-horizontally
Nice. Now I want to get smt like this:
I try split-window-vertically
, but I get this (not correct result):
Emacs is doing what you are asking it to do, unfortunately.
https://www.emacswiki.org/emacs/TransposeFrame is a package which allows you to flip the contents of your frame along the horizontal or vertical axis, or to rotate your frame (which is what you are asking for).
I find this reasonably useful, so have bound it to a key:
(global-set-key [C-S-f6] 'rotate-frame-clockwise)
For splitting the root window, I am using the following function (from Add window to the right of two horizontally split windows):
(defun split-root-window (size direction)
"splits the root window (i.e., can be used to
create a split below/beside splits.)
size, if positive is the size of the current root window
after the split, and if negative the size of the new split"
(split-window (frame-root-window)
(and size (prefix-numeric-value size))
direction))
where direction
is 'left
, 'right
, 'above
or 'below
and split-window
is from windows.el
Auxilliary functions bound to keys:
(defun split-root-window-above (&optional size)
(interactive "P")
(split-root-window size 'above))
(defun split-root-window-below (&optional size)
(interactive "P")
(split-root-window size 'below))
etc..
Other solutions are found in the answers to the following question: Split Window at outermost border