I have known using (setq split-width-threshold 1) splitting windows in horizontal by default.

But I want to only split a window such as slime in horizontal and other window is vertical by default.

Is there a way to do this?

  • check out shackle.el
    – Dodgie
    Commented Feb 13, 2017 at 4:54
  • With respect to setting a low value for either split-width-threshold and split-height-threshold, please read the doc-strings for the variables -- e.g., perhaps the value of nil is appropriate or a higher value. M-x describe-variable.
    – lawlist
    Commented Feb 13, 2017 at 5:20
  • See also -- "How to force the window splitting direction when starting slime?": emacs.stackexchange.com/questions/29123/…
    – lawlist
    Commented Feb 13, 2017 at 6:10

1 Answer 1


Thanks for @lawlist .

I have find the solution and known more about split-width-threshold and split-height-thershold.

By default, emacs will split window in horizontal when the window's columns greater then 160 columns.

Setting a integer number to split window sensibly or set split-window-preferred-function for a custom function for splitting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.