Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Changing Text
         . . .
         Regular Expressions
            Entering Special Characters
            Character Classes
            Regular Expression Examples
            . . .
            Regular Expression Commands
         Rearranging
            Sorting
            Transposing
            Formatting Text
         Indenting Commands
         . . .

Previous   Up    Next
Transposing  Commands by Topic   Indenting Commands


Epsilon User's Manual and Reference > Commands by Topic > Changing Text > Rearranging >

Formatting Text

Epsilon 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.

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 > or # before each line. It preserves email quoting characters at the starts of lines, treating other characters as part of the paragraph.

Press Ctrl-C > to add email-style quoting to the current paragraph (or highlighted region). Press Ctrl-C < to remove such quoting.

These mail-formatting commands use the mail-quote-pattern, mail-quote-skip, and mail-quote-text variables.

Standard bindings:

  Ctrl-X F  set-fill-column
 Alt-q  fill-paragraph
 Alt-Shift-Q  prefix-fill-paragraph
 Ctrl-C Alt-Q  mail-fill-paragraph
 Ctrl-C >  mail-quote-region
 Ctrl-C <  mail-unquote
   fill-indented-paragraph
   fill-region
   auto-fill-mode
 <Enter>  enter-key
 



Previous   Up    Next
Transposing  Commands by Topic   Indenting Commands


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.