This chapter explains how to use the INed editor command keys to manipulate text efficiently. For example, you can delete, move, copy, and mark text.
You can delete text in several different ways. You can delete one character at a time, delete complete lines, delete several lines, or delete the remainder of a line.
You can mark text by complete lines, by boxes, or by text lines. You can then pick up the marked text (or a copy) and store it in the pick-up stack buffer, or you can delete it. A stack buffer stores text in sequence. The last text stored is the first text out. You can place (put down) the contents of the pick-up stack buffer in other areas of your text including into other files. You can put down a copy of the text and leave the text in the buffer, or you can put down the text and remove it from the buffer. You can also put down multiple copies of the text.
Note: The pick-up stack buffer only keeps text for the current editing session. When you exit the editor, it deletes all of the stack buffers.
You can select the text you want to replace by using the Ctrl-A, Up Arrow or Ctrl-A, Down Arrow key sequence (the Search Up or Search Down function). You can then use the Replace command key to replace the text.
For information on the procedures, refer to the following:
You can use the following procedures with INed editor subcommands:
Text deleted this way cannot be recovered.
The cursor does not move. The character at the cursor position is deleted, and all characters located to the right of the cursor move left.
As you hold down the Delete key, the editor continues to delete characters.
Text deleted this way cannot be recovered.
The cursor moves left one space, and the character to the left of the cursor is deleted. In insert mode, the remaining line of text moves left to fill the deleted character's position. In overwrite mode, the deleted character's position is space-filled, and the remaining line of text does not move.
As you hold down the Backspace key, the editor continues to delete characters.
As you hold down the Delete key the editor continues to delete lines.
To restore text deleted this way, see To Restore the Last Deleted Text.
To restore text deleted this way, see To Restore the Last Deleted Text.
To restore text deleted this way, see To Restore the Last Deleted Text.
To restore text deleted this way, see To Restore the Last Deleted Text.
Move the cursor to the line where you want the text restored, and press the Ctrl-A, I key sequence (the Restore function) to restore the last deleted text or line at the cursor line location.
Each time you delete lines of text, the editor stores the deleted text in a stack buffer.
When you press the Ctrl-A, I key sequence, the editor restores the last deleted text at the cursor line, moving the cursor line down to make room for the restored text.
If you continue to press the Ctrl-A, I key sequence, the editor restores all of the text you deleted in the current editing session.
For example, if you delete lines 2, 3, and 4 of the following text:
1 uuuuuuuuuuuuuuuu 2 The ABC Company 3 1234 North Drive 4 Austin, TX 5 vvvvvvvvvvvvvvvv
1 uuuuuuuuuuuuuuuu 5 vvvvvvvvvvvvvvvv
and the delete buffer contains:
4 Austin, TX 3 1234 North Drive 2 The ABC Company
If the cursor is under a character on line 5 and you press the Ctrl-A, I key sequence one time, the result is:
1 uuuuuuuuuuuuuuuu 4 Austin, TX 5 vvvvvvvvvvvvvvvv
If you press the Ctrl-A, I key sequence two more times, the result is:
1 uuuuuuuuuuuuuuuu 2 The ABC Company 3 1234 North Drive 4 Austin, TX 5 vvvvvvvvvvvvvvvv
When you pick up text, you take it out of its place in the file being edited and store it temporarily in a buffer. You can then put it down somewhere in the file, or you can put down a copy of it, leaving the text itself in the buffer.
Blocks of text can be complete lines of text, boxes of text, or text lines. Mark the text depending on your need. For example, it is usually better to box-mark text in a column format and text-mark sentences within a paragraph.
You can use motion functions such as the Ctrl-A, Page Up (the Page Up function); Ctrl-A, Page Down (Page Down function); Ctrl-A, L (Left function); Ctrl-A, R (Right function) key sequences, and the Enter key (Return function) either to begin to mark text or to continue to mark text.
The way the editor makes space for the text you move or copy depends on how you marked the text:
Note: The pick-up stack buffer only keeps text for the current editing session. When you exit the editor, it deletes all of the stack buffers.
You can use the following procedures:
The editor highlights the column of text in which the cursor is moving.
Note: Do not use the Right or Left Arrow keys. If you move to a different column, the editor marks the text as a box.
To unmark text, press the F4 key (the Cancel function) before you pick up or delete the marked text.
When you mark a box of text, you indicate the upper-left corner and the lower-right corner of the box.
The following message replaces the full path name at the bottom of the screen:
****BOX/LINE****
The editor highlights the text from the beginning cursor position to the current cursor position. You can use most of the cursor control keys or window scrolling keys. Most of the other function keys and text entering keys do not work.
Note: You must end a box mark one column to the right of the text you want to mark.
When you mark text, you indicate the first and last letters of the text.
The following message replaces the full path name at the bottom of the screen:
*******TEXT*******
The editor highlights the text from the beginning cursor position to the current cursor position. You can use most of the cursor control keys or window scrolling keys. Most of the other function keys and text entering keys do not work.
Note: You must end the text mark field one character or space to the right of the text you want to mark.
Mark the text or place the cursor on a line of text, and press the F7 key (the Pick Up function).
The marked text (or line of text) is removed from the window and is placed in the pick-up stack buffer.
Mark the text or place the cursor on a line of text, and press the F9 key (the Pick Copy function).
The marked text remains in the window and a copy is placed in the pick-up stack buffer.
To put down the latest text in the pick-up stack buffer, move the cursor to the top-left position of the place where you want to put down the text, and press the F8 key (the Put Down function).
The editor removes the latest text in the pick-up stack buffer and puts it down at the cursor position. The next text in the stack buffer is then available to be put down.
To put down a copy of the latest text in the pick-up stack buffer, move the cursor to the top-left position of the place where you want to put down the text, and press the F10 key (the Put Copy function).
The editor puts down a copy of the text in the pick-up stack buffer but leaves the original copy in the stack buffer. You can press the F10 key to put a copy of this text in several places, one copy at a time.
Mark the text you want to delete, and press the Ctrl-A, Delete key sequence (the Delete Line function).
Move the cursor to the top-left position of the place where you want to put down the text, and press the Ctrl-A, I key sequence (the Restore function).
Note: Once you put down deleted text, the editor removes it from the delete buffer.
You can use the following procedures with INed editor subcommands:
Character strings are words or text you specify. When the editor finds the character string, the editor scrolls the window to display the character string, placing the cursor on the string's first character.
To search up toward the beginning of the file for the character string, press the Ctrl-A, Up Arrow key sequence (the Search Up function).
Use the following guidelines when you search for text:
Stopped.If the search completes before you press the Ctrl-C key sequence, the operation is not undone.
Note: Some keyboards have the word Break engraved on a key. This key is not necessarily equivalent to the Ctrl-C key sequence (the Break function).
To search up toward the beginning of the file for the character string, press the Ctrl-A, Up Arrow key sequence (the Search Up function).
When you search for an existing word, the search character string begins at the character the cursor is on and ends at the character in front of the next blank. For example, if the cursor is on the letter r in the word bright and you press the Ctrl-A, Enter key sequence, and then the Ctrl-A, Down Arrow key sequence (the Search Down function), the editor looks for the next occurrence of the character string right .
For example, to search for blossom and replace it with bloom in the following text:
Blue Sage is one of the most widely distributed Salvia species. In Texas it starts to blossom in April and continues to blossom much of the summer.Press the Ctrl-A, Enter key sequence, type the word blossom in the ENTER box, and press the Ctrl-A, Down Arrow key until you locate the first blossom you want to replace.
Press the Ctrl-A, Enter key sequence, type the word bloom in the ENTER box, and press the Ctrl-A, = key sequence. The word blossom is in the search buffer, the word bloom is in the replacement buffer, and the text looks like this:
Blue Sage is one of the most widely distributed Salvia species. In Texas it starts to bloom in April and continues to blossom much of the summer.Press the Ctrl-A, Down Arrow key sequence to find the next blossom and press the Ctrl-A, = key sequence. The text looks like this:
Blue Sage is one of the most widely distributed Salvia species. In Texas it starts to bloom in April and continues to bloom much of the summer.
Note: If you want to replace a text string throughout a file, you can use the rpl filter command.
The rpl 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.