📄 fill.html
字号:
<HTML><HEAD><TITLE> Basic Operation </TITLE></HEAD><BODY><A NAME="Shifting_and_Filling"></A><H2> Shifting and Filling </H2><P><H3>Shift Left, Shift Right</H3></P><P>While shifting blocks of text is most important for programmers (See Featuresfor Programming), it is also useful for other tasks, such as creatingindented paragraphs.</P><P>To shift a block of text one tab stop to the right, select the text, thenchoose Shift Right from the Edit menu. Note that the accelerator keys forthese menu items are Ctrl+9 and Ctrl+0, which correspond to the right andleft parenthesis on most keyboards. Remember them as adjusting the text inthe direction pointed to by the parenthesis character. Holding the Shift keywhile selecting either Shift Left or Shift Right will shift the text by onecharacter.</P><P>It is also possible to shift blocks of text by selecting the textrectangularly, and dragging it left or right (and up or down as well). Usinga rectangular selection also causes tabs within the selection to berecalculated and substituted, such that the non-whitespace characters remainstationary with respect to the selection.</P><P><H3>Filling </H3></P><P>Text filling using the Fill Paragraph command in the Edit menu is one of themost important concepts in NEdit. And it will be well worth your while tounderstand how to use it properly.</P><P>In plain text files, unlike word-processor files, there is no way to tellwhich lines are continuations of other lines, and which lines are meant to beseparate, because there is no distinction in meaning between newlinecharacters which separate lines in a paragraph, and ones which separateparagraphs from other text. This makes it impossible for a text editor likeNEdit to tell parts of the text which belong together as a paragraph fromcarefully arranged individual lines.</P><P>In continuous wrap mode (Preferences -> Wrap -> Continuous), linesautomatically wrap and unwrap themselves to line up properly at the rightmargin. In this mode, you simply omit the newlines within paragraphs and letNEdit make the line breaks as needed. Unfortunately, continuous wrap mode isnot appropriate in the majority of situations, because files with extremelylong lines are not common under Unix and may not be compatible with alltools, and because you can't achieve effects like indented sections, columns,or program comments, and still take advantage of the automatic wrapping.</P><P>Without continuous wrapping, paragraph filling is not entirely automatic. Auto-Newline wrapping keeps paragraphs lined up as you type, but onceentered, NEdit can no longer distinguish newlines which join wrapped text,and newlines which must be preserved. Therefore, editing in the middle of aparagraph will often leave the right margin messy and uneven.</P><P>Since NEdit can't act automatically to keep your text lined up, you need totell 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 linesneatly at word boundaries. Normally, the left margin for filling is inferredfrom the text being filled. The first line of each paragraph is consideredspecial, and its left indentation is maintained separately from the remaininglines (for leading indents, bullet points, numbered paragraphs, etc.). Otherwise, the left margin is determined by the furthest left non-whitespacecharacter. The right margin is either the Wrap Margin, set in thepreferences menu (by default, the right edge of the window), or can also bechosen on the fly by using a rectangular selection (see below).</P><P>There are three ways to use Fill Paragraph. The simplest is, while you aretyping text, and there is no selection, simply select Fill Paragraph (or typeCtrl+J), and NEdit will arrange the text in the paragraph adjacent to thecursor. A paragraph, in this case, means an area of text delimited by blanklines.</P><P>The second way to use Fill Paragraph is with a selection. If you select arange of text and then chose Fill Paragraph, all of the text in the selectionwill be filled. Again, continuous text between blank lines is interpreted asparagraphs and filled individually, respecting leading indents and blanklines.</P><P>The third, and most versatile, way to use Fill Paragraph is with arectangular selection. Fill Paragraph treats rectangular selectionsdifferently from other commands. Instead of simply filling the text insidethe rectangular selection, NEdit interprets the right edge of the selectionas the requested wrap margin. Text to the left of the selection is notdisturbed (the usual interpretation of a rectangular selection), but text tothe right of the selection is included in the operation and is pulled in tothe selected region. This method enables you to fill text to an arbitraryright margin, without going back and forth to the wrap-margin dialog, as wellas to exclude text to the left of the selection such as comment bars or othertext columns.<P><HR></P><P></P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -