manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.7 Blank Lines

Here are special commands and techniques for inserting and deleting blank lines.

C-o

Insert one or more blank lines after the cursor (open-line).

C-x C-o

Delete all but one of many consecutive blank lines (delete-blank-lines).

To insert a new line of text before an existing line, type the new line of text, followed by <RET>. However, it may be easier to see what you are doing if you first make a blank line and then insert the desired text into it. This is easy to do using the key C-o (open-line), which inserts a newline after point but leaves point in front of the newline. After C-o, type the text for the new line. C-o F O O has the same effect as F O O <RET>, except for the final location of point.

You can make several blank lines by typing C-o several times, or by giving it a numeric argument specifying how many blank lines to make. See section Numeric Arguments, for how. If you have a fill prefix, the C-o command inserts the fill prefix on the new line, if typed at the beginning of a line. See section The Fill Prefix.

The easy way to get rid of extra blank lines is with the command C-x C-o (delete-blank-lines). C-x C-o in a run of several blank lines deletes all but one of them. C-x C-o on a lone blank line deletes that one. When point is on a nonblank line, C-x C-o deletes all following blank lines (if any).


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.