Prefer splitting windows horizontally first
This is what I am accustomed to, and this is what modern wide screens are good for :)
This commit is contained in:
parent
56fd725c55
commit
84545e9db5
16
init.el
16
init.el
@ -399,7 +399,21 @@
|
|||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
'("shell\\*"
|
'("shell\\*"
|
||||||
(display-buffer-reuse-window
|
(display-buffer-reuse-window
|
||||||
display-buffer-pop-up-window)))))
|
display-buffer-pop-up-window)))
|
||||||
|
|
||||||
|
|
||||||
|
(define-advice split-window-sensibly (:around
|
||||||
|
(orig-fun &optional window)
|
||||||
|
split-horizontally-first)
|
||||||
|
"We try to split horizontally first, and if this does not work, let
|
||||||
|
`split-window-sensibly' do the rest. This will result in trying to
|
||||||
|
split horizontally again, but this extra work should not matter much."
|
||||||
|
(let ((window (or window (selected-window))))
|
||||||
|
(or (and (window-splittable-p window t)
|
||||||
|
;; Split window horizontally.
|
||||||
|
(with-selected-window window
|
||||||
|
(split-window-right)))
|
||||||
|
(funcall orig-fun window))))))
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:ensure t
|
:ensure t
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user