[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 INed Editor User's Guide

Chapter 7. Formatting Text

When you access a file, the editor's standard format is in effect. For example, the margins are set in column 1 and column 77. You can change the margins, format text within the margins, and center text. You can also enter and delete tabs for an editing session and enter special control characters.

How to Format Text with the INed Editor

If you want to indent only one line, use the Tab key.

If you have several lines of text to format or indent, change the margins. When you change the margins, the new margin settings apply only to:

The tab stops you set and remove and the margins you change using the Ctrl-A, C key sequence (the Center function) or the F5 key (the Format function) affect only the current editing session. When you exit the file and then return to that file, the original tab stops and margins are in effect.

When the editor saves a file, it may change multiple blank spaces at the beginning of a line to tab characters.

You can use the following procedures with INed editor subcommands:

To Set or Remove Tab Stops

The t characters above the editing window mark the positions of the current tab stops.

To remove a tab stop, move the cursor to the column where you want to remove the tab stop, and press the Ctrl-A, Enter key sequence (the Enter function). Then press the Ctrl-A, V key sequence (the Set Tab function).

To set a tab stop, move the cursor to the column where you want to set the tab stop, and press the Ctrl-A, V key sequence (the Set Tab function).

To Change the Left Margin

The l character above the editing window marks the current position of the left margin.

To move the left margin, move the cursor to the column where you want your left margin, and press the Ctrl-A, M key sequence (the Margin function).

To return the left margin to its original position, move the cursor to the first column in the window, and press the Ctrl-A, M key sequence (the Margin function).

To Change the Right Margin

The r character above the editing window marks the current position of the right margin.

Move the cursor to the column where you want your right margin, and press the Ctrl-A, Enter key sequence (the Enter function). Then press the Ctrl-A, M key sequence (the Margin function).

You can change the right margin to any column between 1 (one) and 200. If you want lines that are longer than the editor window, press the Ctrl-A, R key sequence (the Right function) to move the window beyond the edge of the current window, then move the cursor to the column you want.

To Change Both Margins

  1. Move the cursor to the column where you want your left margin, and press the Ctrl-A, Enter key sequence (the Enter function).

  2. Move the cursor to the column where you want your right margin, and press the Ctrl-A, M key sequence (the Margin function). The text will be highlighted as you move the cursor, and the path name field now has BOX/LINE.

To Format a Paragraph

The format feature is convenient if you changed the margins or made changes and now have ragged or broken lines. Formatting causes the text to fill in to fit the current margin settings from the cursor position to the end of the paragraph. The indentation of the first line of the paragraph does not change.

To format a paragraph, move the cursor to the first line of the paragraph you want to format, and press the F5 key (the Format function). (A paragraph contains text that is separated from other text by a blank line.)

For example, if your text looks like the following and your right margin is in column 50:

   Users' meetings provide a forum 
for system operators to learn new techniques and share common problems with 
other people in their company.

you can press the F5 key to format the text as follows:

   Users' meetings provide a forum 
for system operators to learn new techniques and share common
problems with other people in their company.

For some text you may get unexpected results when you press the F5 key. For example, if this is how your text looks:


P. Grant       994-9994
J. Rhodes      995-9995
B. Rouse       996-9996
C. Travenia    997-9997
L. Washington  998-9998

and you press the F5 key, the result is:


P. Grant   994-9994 J. Rhodes    995-9995 B. Rouse            
  996-9996 C. Travenia    997-9997  L. Washington 998-9998

The editor places the original text in the delete buffer. If you press the F5 key and do not like the results, you can press the Ctrl-A, I key sequence (the Restore function) to return the paragraph to its original format. (The editor places the original text at the cursor position, followed by the restored text.)

You can also format text with the fformat command, fill or ffill command and just or fjust command.

To Center One Line or Multiple Lines between Margins

Move the cursor to any place on the first line you want centered.

To center one line, press the Ctrl-A, C key sequence (the Center function).

To center multiple lines, press the Ctrl-A, Enter key sequence (the Enter function), and type in the ENTER box the number of lines to center.

The editor centers the text between the margins. If you have not set margins for the document, the editor centers the text within the window.

To Center Multiple Lines between Margins

Type in the ENTER box the number of lines to center.

The editor centers the text within the margins. If you have not set margins for the document, the editor centers the text within the window.

To Center a Block of Text

  1. Place the cursor on the first or last line of the block of text, and press the Ctrl-A, Enter key sequence (the Enter function).

  2. Move the cursor up or down to mark the lines, and press the Ctrl-A, C key sequence (the Center function).

To Split a Line

Move the cursor under the first character you want to move to the new line, and press the Ctrl-A, Enter key sequence (the Enter function).

Press the F6 key (the Insert Line function).

When you split lines, part of the text remains on the original line and the rest of the text moves to a new line. For example, to split the following line of text:

Jack and Jill went up the hill To fetch a pail of 
water

move the cursor under the letter T of the word To , press the Ctrl-A, Enter key sequence, and then press the F6 key. The editor splits the text as follows:


Jack and Jill went up the hill
To fetch a pail of water.

Related Information

The fformat command, fill or ffill command, just or fjust command in AIX Version 4.3 Commands Reference.

INed Editor Overview introduces general concepts about the INed editor, lists the INed editing functions and describes the system guidelines for using the INed editor.

INed Editor Functions for the Standard Keyboard is a table that shows the INed editor command keys on a standard keyboard.

INed Editor Files in AIX Version 4.3 Files Reference contains reference information about the files used by the INed editor.


[ Previous | Next | Contents | Glossary | Home | Search ]