Function: split-window-horizontally

split-window-horizontally is a function alias and interactive for split-window-right, defined in window.el.gz.

Signature

(split-window-horizontally &optional SIZE WINDOW-TO-SPLIT)

Documentation

Split WINDOW-TO-SPLIT into two side-by-side windows.

WINDOW-TO-SPLIT defaults to the selected window if omitted or nil. The newly created window will be to the right of WINDOW-TO-SPLIT and will show the same buffer as WINDOW-TO-SPLIT, if it is a live window, else the buffer shown in the WINDOW-TO-SPLIT's frame's selected window. Return the new window.

If optional argument SIZE is omitted or nil, both windows get the same width, or close to it. If SIZE is positive, the left-hand
(selected) window gets SIZE columns. If SIZE is negative, the
right-hand (new) window gets -SIZE columns. Here, SIZE includes the width of the window's scroll bar; if there are no scroll bars, it includes the width of the divider column to the window's right, if any. Interactively, SIZE is the prefix numeric argument.

Probably introduced at or before Emacs version 24.1.

Key Bindings

Aliases

split-window-horizontally