tags:

views:

690

answers:

1

A lot of Emacs functions automatically split the screen. However, they all do so vertically, (ie; they make two windows, one on top of the other). Is there any way to make them all split horizontally (side-by-side) by default instead?

+9  A: 

(setq split-height-threshold nil) (setq split-width-threshold 0)

offby1
Note that these work because of how they affect split-window-preferred-function and the split-window-sensibly function that is set to - if you read the docs for that, you can find out how these variables being set affect things. For those of us who prefer vertical splitting by default, we can just use (setq split-width-threshold nil) which doesn't allow the system to split windows horizontally.
Kendall Helmstetter Gelner
After reading up the docs and playing around a bit, I have set split-height-threshold to nil and the split-width-threshold to 80 so that it will first see if it can split horizontally and only then try vertically. Having it only split vertically often just gets ugly as the windows become to narrow.
Nikwin