Formatting TextEpsilon has some commands that make typing manuscript text easier.
You can change the right margin, or fill column, using the Ctrl-x f command. By default, it has a value of 70. With a numeric argument, the command sets the fill column to that column number. Otherwise, this command tells you the current value of the fill column and asks you for a new value. If you don't provide a new value but instead press the <Enter> key, Epsilon will use the value of point's current column. For example, you can set the fill column to column 55 by typing Ctrl-u 55 Ctrl-x f. Alternatively, you can set the fill column to point's column by typing Ctrl-x f <Enter>. The buffer-specific variable margin-right stores the value of the fill column. To set the default value for new buffers you create, use the set-variable command on F8 to set the default value of the margin-right variable. (See the c-fill-column variable for the C mode equivalent.) A file's contents can specify a particular fill column; see File Variables.
In auto fill mode, you don't have to worry about typing <Enter>'s to go to the next line. Whenever a line gets too long, Epsilon breaks the line at the appropriate place if needed. The auto-fill-mode command enables or disables auto filling (word wrap) for the current buffer. With a numeric argument of zero, it turns auto filling off; with a nonzero numeric argument, it turns auto filling on. With no numeric argument, it toggles auto filling. During auto fill mode, Epsilon shows the word "Fill" in the mode line. The buffer-specific variable fill-mode controls filling. If it has a nonzero value, filling occurs. To make Epsilon always use auto fill mode, you can use the set-variable command to set the default value of fill-mode.
(Wrapping text by adding line breaks is different from wrapping long lines for display purposes. You can change whether Epsilon displays lines wider than the screen by horizontally scrolling across them, or by displaying each long line over multiple screen lines. See Horizontal Scrolling. But neither mode changes where the line breaks really are in the text, just how Epsilon displays it. This section is all about adding real line breaks to the text.)
In some language modes, Epsilon uses a special version of auto-fill mode that typically only fills text in certain types of comments. See Commenting Commands for details.
Epsilon normally indents new lines it inserts via auto fill mode so they match the previous line. The buffer-specific variable auto-fill-indents controls whether or not Epsilon does this. Epsilon indents these new lines only if auto-fill-indents has a nonzero value. Set the variable to 0 if you don't want this behavior.
During auto filling, the normal-character command first checks to see if the line extends past the fill column. If so, the extra words automatically move down to the next line.
The <Enter> key runs the command enter-key, which behaves like normal-character, but inserts a newline instead of the character that invoked it. Epsilon binds this command to the <Enter> key, because Epsilon uses the convention that Ctrl-j's separate lines, but the keyboard has the <Enter> key yield a Ctrl-m. In overwrite mode, the <Enter> key simply moves to the beginning of the next line.
The Alt-q command fills the current paragraph. The command fills each line by moving words between lines as necessary, so the lines but the last become as long as possible without extending past the fill column. If the screen shows a highlighted region, the command fills all paragraphs in the region. The fill-region command fills all paragraphs in the region between point and mark, whether or not the region is highlighted.
If you give a numeric prefix argument of five or less to the above filling commands, they unwrap lines in a paragraph, removing all line breaks. Alt-2 Alt-q is one quick way to unwrap the current paragraph. With a numeric argument greater than 5, the paragraph is filled using that value as a temporary right margin. (Note that C mode places a different fill command on Alt-q, and it interprets an argument to mean "fill using the current column as a right margin".)
Alt-Shift-Q runs the prefix-fill-paragraph command. It fills the current paragraph while preserving any run of spaces, punctuation, and other non-alphanumeric characters that appears before each of the lines in the paragraph. Highlight a region first and it will fill all the paragraphs within in this manner. With a numeric argument, it fills the paragraph using the current column as the right margin, instead of the margin-right variable.
The fill-indented-paragraph command is similar; it fills the current paragraph as above, but tries to preserve only indentation before each line of the paragraph. It's better than prefix-fill-paragraph when the paragraph to be filled contains punctuation characters and similar that should be filled as part of the paragraph, not considered part of the prefix.
The mail-fill-paragraph command on Ctrl-c Alt-q is similar to
prefix-fill-paragraph, but specialized for the quoting rules of
email that put
Press Ctrl-c > to add email-style quoting to the current paragraph (or highlighted region). Press Ctrl-c < to remove such quoting.