Skip to main content
3 of 4
code improved
jue
  • 4.7k
  • 10
  • 21

A little late, but because I also searched for this and could not find a ready solution:

You could define your own split-window-sensibly function.
To do so, put the following in your init.el:

(setq split-height-threshold 120
      split-width-threshold 160)

(defun my-split-window-sensibly (&optional window)
    "replacement `split-window-sensibly' function which prefers vertical splits"
    (interactive)
    (let ((window (or window (selected-window))))
        (or (and (window-splittable-p window t)
                 (with-selected-window window
                     (split-window-right)))
            (and (window-splittable-p window)
                 (with-selected-window window
                     (split-window-below))))))
    
(setq split-window-preferred-function #'my-split-window-sensibly)

Note: the thresholds need to be twice as big as the smallest window allowed, because the new windows each use half of former window size.
The last line tells emacs to use the defined split function.

jue
  • 4.7k
  • 10
  • 21