• Aucun résultat trouvé

Moving Directly to Any Point in Your Text File

Dans le document PDP–11 Keypad Editor User’s Guide (Page 38-43)

Moving the Cursor

4.6 Moving Directly to Any Point in Your Text File

KED gives you a search operation that can move the cursor directly to any point in your text file.

To start your search:

1. Press GOLD and FIND.

KED displays its model prompt.

Model:

2. Type the character string you are looking for. It can be up to 60 characters long and can contain any printing character or any line terminator.

You can press

<

x (the delete key) or CTRL/U to correct any typing errors. If you press CTRL/C, KED deletes its model prompt and your character string and restores the screen display.

3. Press one of the following keys:

ADVANCE or BACKUP to enter your search model, specify your search direction, and start the search.

ENTER to enter your search model without starting the search. You must press FINDNEXT to start the search.

to enter your search model and search backward without changing the keypad directional mode.

to enter your search model and search forward without changing the keypad directional mode.

KED places your character string in a search buffer, and then searches forward or backward from the current location of the cursor to the end or the beginning of your file. When the cursor is far enough from your character string, KED temporarily displays the message WORKING... to let you know that nothing is wrong and that the cursor is still moving.

In other words:

GOLD FIND character-string ADVANCE or

GOLD FIND character-string BACKUP

or

GOLD FIND character-string ENTER

or

GOLD FIND character-string FINDNEXT

or

GOLD FIND character-string or

GOLD FIND character-string

To continue your search or to start a search after pressing ENTER, press FINDNEXT.

• If you are at the end of your file or page, press BACKUP and FINDNEXT.

• If you are at the beginning of your file or page, press ADVANCE and FINDNEXT. If KED finds your character string, it moves the cursor to the first character in that string. If KED does not find your character string, it signals you by sounding a beeper or reversing the text and background on your terminal. If you press HELP, KED displays:

Target not found

If you press GOLD and FIND and then decide you do not want to look for a character string, press ENTER. KED will respond by deleting its model prompt.

4.6.1 Distinguishing Between Uppercase and Lowercase Letters

By default, KED does not distinguish between uppercase and lowercase letters. For example, SYMBOLis the same asSymbol orsymbol.

To set KED so it will distinguish between uppercase and lowercase letters:

1. Press GOLD and COMMAND.

2. In response to the command prompt, type:

SET [SEARCH] EXACT 3. Press ENTER.

KED will now distinguish between uppercase and lowercase letters. For example, SYMBOL,Symbol,symbol are now three different character strings.

In other words:

GOLD COMMAND SET EXACT ENTER

Then, start your search as described in Section 4.6.

To reset KED to its default:

GOLD COMMAND SET GENERAL ENTER

KED will no longer distinguish between uppercase and lowercase letters.

4.6.2 Moving to the End of Your Search String

By default, KED moves the cursor to the first character of the string it finds.

To set KED so it will move the cursor to the right of the last character in your search string:

1. Press GOLD and COMMAND.

2. In response to the command prompt, type:

SET [SEARCH] END 3. Press ENTER.

KED will now move the cursor to the right of the last character of the string it finds.

In other words:

GOLD COMMAND SET END ENTER

Then, start your search as described in Section 4.6.

To reset KED to its default:

GOLD COMMAND SET BEGIN ENTER

KED will now move the cursor to the first character of the string it finds.

4.6.3 Limiting the Area of Your Search

By default, KED continues a search to the end or beginning of your file.

To limit your search to the current page of text:

1. Press GOLD and COMMAND.

2. In response to the command prompt, type:

SET [SEARCH] BOUNDED 3. Press ENTER.

KED will now limit its search to the current page. By default, that page is all the text between the cursor and the next form-feed character. You may have used the SET ENTITY PAGE command to specify that page as a certain number of lines of text (Section 4.4.2.1) or as all the text between the cursor and a marker (Section 4.4.2.2).

In other words:

GOLD COMMAND SET BOUNDED ENTER

Then, start your search as described in Section 4.6.

• If you start your search by pressing ADVANCE, KED searches to the end of the page.

• If you start your search by pressing BACKUP, KED searches to the beginning of the page.

• If KED does not find your search string on the current page, it signals you by sounding a beeper or reversing the text and background on your terminal. If you press HELP, KED displays:

Bounded search reached bound To reset KED to its default:

GOLD COMMAND SET UNBOUNDED ENTER

4.6.4 Controlling Cursor Movement When Search String Is Not Found

By default, the cursor remains in its current position when your search string is not found.

To set KED so it will move the cursor to the end or beginning of your file when your search string is not found:

1. Press GOLD and COMMAND.

2. In response to the command prompt, type:

SET [SEARCH] NORETURN 3. Press ENTER.

KED will now move the cursor to the end or beginning of your file when your search string is not found.

In other words:

GOLD COMMAND SET NORETURN ENTER

Then, start your search as described in Section 4.6.

To reset KED to its default:

GOLD COMMAND SET RETURN ENTER

4.7 What Next?

Now that you know how to move the cursor to any point in your text file, you can make all the many useful changes described in Chapter 5. That chapter shows you how to:

Delete and restore a character.

Delete and restore a word.

Delete and restore a line of text.

Insert a blank line.

Delete a large section of text.

Insert a new section of text in multiple locations.

Remove a section of text from one place in your file and insert it in another place.

Empty the paste buffer.

Replace a section of text with another section.

Substitute a character string for multiple occurrences of another character string.

Change alphabetic characters from uppercase to lowercase or lowercase to uppercase.

Repeat KED editing operations.

Chapter 5

Dans le document PDP–11 Keypad Editor User’s Guide (Page 38-43)