In plain text files, unlike word−processor files, there is no way to tell which lines are continuations of other
lines, and which lines are meant to be separate, because there is no distinction in meaning between newline
characters which separate lines in a paragraph, and ones which separate paragraphs from other text. This
makes it impossible for a text editor like NEdit to tell parts of the text which belong together as a paragraph
from carefully arranged individual lines.
In continuous wrap mode (Preferences −> Wrap −> Continuous), lines automatically wrap and unwrap
themselves to line up properly at the right margin. In this mode, you simply omit the newlines within
paragraphs and let NEdit make the line breaks as needed. Unfortunately, continuous wrap mode is not
appropriate in the majority of situations, because files with extremely long lines are not common under Unix
and may not be compatible with all tools, and because you can't achieve effects like indented sections,
columns, or program comments, and still take advantage of the automatic wrapping.
Without continuous wrapping, paragraph filling is not entirely automatic. Auto−Newline wrapping keeps
paragraphs lined up as you type, but once entered, NEdit can no longer distinguish newlines which join
wrapped text, and newlines which must be preserved. Therefore, editing in the middle of a paragraph will
often leave the right margin messy and uneven.
Since NEdit can't act automatically to keep your text lined up, you need to tell it explicitly where to operate,
and that is what Fill Paragraph is for. It arranges lines to fill the space between two margins, wrapping the
lines neatly at word boundaries. Normally, the left margin for filling is inferred from the text being filled. The
first line of each paragraph is considered special, and its left indentation is maintained separately from the
remaining lines (for leading indents, bullet points, numbered paragraphs, etc.). Otherwise, the left margin is
determined by the furthest left non−whitespace character. The right margin is either the Wrap Margin, set in
the preferences menu (by default, the right edge of the window), or can also be chosen on the fly by using a
rectangular selection (see below).
There are three ways to use Fill Paragraph. The simplest is, while you are typing text, and there is no
selection, simply select Fill Paragraph (or type Ctrl+J), and NEdit will arrange the text in the paragraph
adjacent to the cursor. A paragraph, in this case, means an area of text delimited by blank lines.
The second way to use Fill Paragraph is with a selection. If you select a range of text and then chose Fill
Paragraph, all of the text in the selection will be filled. Again, continuous text between blank lines is
interpreted as paragraphs and filled individually, respecting leading indents and blank lines.
The third, and most versatile, way to use Fill Paragraph is with a rectangular selection. Fill Paragraph treats
rectangular selections differently from other commands. Instead of simply filling the text inside the
rectangular selection, NEdit interprets the right edge of the selection as the requested wrap margin. Text to the
left of the selection is not disturbed (the usual interpretation of a rectangular selection), but text to the right of
the selection is included in the operation and is pulled in to the selected region. This method enables you to
fill text to an arbitrary right margin, without going back and forth to the wrap−margin dialog, as well as to
exclude text to the left of the selection such as comment bars or other text columns.
File Format
While plain−text is probably the simplest and most interchangeable file format in the computer world, there is
still variation in what plain−text means from system to system. Plain−text files can differ in character set, line
termination, and wrapping.
Nirvana Editor (NEdit) Help Documentation
File Format 13