1.8. Simple Text Formatting and Specialized Editing

1.8.1. Centering Commands

Centering commands work only in text mode.

To Keystrokes Command Name
Center a line ESC s center-line
Center a paragraph ESC S center-paragraph
Center a region ESC x center-region

1.8.2. Inserting Page Breaksand Control Characters

To insert a page break in a file, type C-q C-l. C-q is the quoted-insert command; it inserts the next control sequence as a control character rather than interpreting it as an Emacs command. You can also search and replace control characters by prefacing the search string with C-q in query-replace.

1.8.3. Rectangle Editing

Rectangle editing is particularly useful for deleting or rearranging columns of data.

To Keystrokes Command Name
Delete a rectangle and store it C-x r k kill-rectangle
Delete a rectangle; do not store it C-x r d delete-rectangle
Insert the last rectangle killed C-x r y yank-rectangle
Blank out the area marked as a rectangle; do not store it C-x r c clear-rectangle
Insert a blank rectangle in the area marked C-x r o open-rectangle

1.8.4. Outline Mode Commands

To Keystrokes Command Name
Move to the next heading C-c C-n outline-next-visible- heading
Move to the previous heading C-c C-p outline-previous- visible-heading
Move to the next heading of the same level C-c C-f outline-forward-same- level
Move to the previous heading of the same level C-c C-b outline-backward-same- level
Move up one heading level C-c C-u ...

Get GNU Emacs Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.