Go to the first, previous, next, last section, table of contents.

Splitting Windows

C-x 2
Split the selected window into two windows, one above the other (split-window-vertically).
C-x 3
Split the selected window into two windows positioned side by side (split-window-horizontally).
C-Mouse-2
In the mode line or scroll bar of a window, split that window.

The command C-x 2 (split-window-vertically) breaks the selected window into two windows, one above the other. Both windows start out displaying the same buffer, with the same value of point. By default the two windows each get half the height of the window that was split; a numeric argument specifies how many lines to give to the top window.

C-x 3 (split-window-horizontally) breaks the selected window into two side-by-side windows. A numeric argument specifies how many columns to give the one on the left. A line of vertical bars separates the two windows. Windows that are not the full width of the screen have mode lines, but they are truncated; also, they do not always appear in inverse video, because the Emacs display routines have not been taught how to display a region of inverse video that is only part of a line on the screen.

You can split a window horizontally or vertically by clicking C-Mouse-2 in the mode line or the scroll bar. The line of splitting goes through the place where you click: if you click on the mode line, the new scroll bar goes above the spot; if you click in the scroll bar, the mode line of the split window is side by side with your click.

When a window is less than the full width, text lines too long to fit are frequent. Continuing all those lines might be confusing. The variable truncate-partial-width-windows can be set non-nil to force truncation in all windows less than the full width of the screen, independent of the buffer being displayed and its value for truncate-lines. See section Continuation Lines.

Horizontal scrolling is often used in side-by-side windows. See section Controlling the Display.

If split-window-keep-point is non-nil, C-x 2 tries to avoid shifting any text on the screen by putting point in whichever window happens to contain the screen line the cursor is already on. The default is that split-window-keep-point is non-nil on slow terminals.


Go to the first, previous, next, last section, table of contents.