Learning HP EDIT ABCDE HP Part No.
The information contained in this document is subject to change without notice. HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material.
Preface DRAFT 11/7/97 iii 06:43
Before You Begin Before You Begin To use this tutorial, you need to log onto an HP 3000 computer where HP EDIT has been installed. This tutorial assumes you know how to start a session on an HP 3000 computer and understand basic MPE le system concepts.
Who Should Use This Tutorial Who Should Use This Tutorial Learning HP EDIT is designed for new users of HP EDIT. The tutorial leads you through a series of lessons on the basics of HP EDIT. The lessons will not teach you everything you need to know about HP EDIT. Rather, they will give you a fundamental set of working skills to make you productive with HP EDIT. The HP EDIT Reference Manual contains detailed information on all HP EDIT features.
Organization of Learning HP EDIT Organization of Learning HP EDIT For the best results, read the tutorial sequentially. Do the exercises that are indented and in bold print to practice using some of HP EDIT's features.
Contents 1. Getting Started with HP EDIT Starting HP EDIT . . . . . . . . Understanding the HP EDIT screen The Status Line . . . . . . . . The Message Line . . . . . . . The File and Record Line . . . . The Text Window . . . . . . . The Active Function Keys . . . . Using Your Terminal Keyboard . . Using HP EDIT Modes . . . . . . Executing Commands . . . . . . Entering Text . . . . . . . . . Exiting HP EDIT . . . . . . . . Summary . . . . . . . . . . . . Concepts Introduced . . . . . . Commands Learned . . .
4. Modifying Text Edit Commands Function Keys Appending Text . . . . . . . Deleting Text . . . . . . . . Using Counts . . . . . . . . Deleting Lines . . . . . . . Inserting Text . . . . . . . . Overwriting Text . . . . . . . Saving to a New File . . . . . Mastering Text Modi cation . . Summary . . . . . . . . . . Concepts Introduced . . . . Commands Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8. Getting Help Accessing Help . . . . . . . . . . . . The Main Help Menu . . . . . . . . . Key Description Help . . . . . . . . . Getting Information on an Editing Topic Using the Command Summary . . . . . The Meta Command Summary . . . . Exiting the Command Summary . . . Getting a Description of a Command . . Exiting Help . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . Concepts Introduced . . . . . . . . Commands Learned . . . . . . . . . DRAFT 11/7/97 . . . . . . . . . . . . . . . . . .
1 Getting Started with HP EDIT In this lesson you will learn how to start and end an HP EDIT session. You will also learn some basic concepts about HP EDIT that will help you use the product as you read this tutorial. Starting HP EDIT An HP EDIT session is started by typing a run command at the MPE prompt. Start an HP EDIT session now. Type RUN HPEDIT.PUB.
Organization of Learning HP EDIT Understanding the HP EDIT screen The Status Line The rst line of the display indicates the current mode of this editing session. Notice that the editor is now in Command mode. When you begin a new editing session, the editor is placed in Command mode. You will learn more about modes later. The status area also provides informational messages in the right-hand corner, such as how to access help.
Organization of Learning HP EDIT The Active Function Keys The active function keys are displayed at the bottom of your screen. Some function keys perform an HP EDIT command when pressed; others activate another set of function keys. These keys enable you to execute many of the commonly used HP EDIT commands. This makes it easier to learn the editor and gives you fewer commands to remember. The active set of function keys displayed when you rst run HP EDIT are known as the Main Keys.
Organization of Learning HP EDIT Using Your Terminal Keyboard With HP EDIT, you use much of the keyboard to execute commands and input text. It is a good idea to get acquainted with your keyboard now. HP EDIT can be run from several di erent terminals or personal computers emulating these terminals. In several places throughout this tutorial, you are asked to press the 4Return5 key. If you are using a Vectra personal computer, this key is labeled as 4Enter5.
Organization of Learning HP EDIT Entering Text You may type in text when you are in Text Entry mode. Commands should not be typed when in Text Entry mode since they will be interpreted as text. HP EDIT, however, does recognize commands executed from function keys when you are in Text Entry mode. (If you press a function key in Text Entry mode, HP EDIT places you in Command mode before executing the command corresponding to the function key.
2 Creating and Keeping Text HP EDIT allows you to easily create and keep les in standard ASCII format. In this lesson, you will create and save a simple text le using HP EDIT. Creating a File Start a new HP EDIT session as before, creating a le named LESSON2. Type RUN HPEDIT.PUB.SYS Press 4Return5 HP EDIT prompts you for a le name: File: Type LESSON2 Press 4Return5 Since the le LESSON2 does not exist, you must con rm that you wish to create a new le.
Organization of Learning HP EDIT You are now ready to type in text. Type the text as shown in the following sample letter. At the end of a line, press 4Return5 to enter text on the next line. To leave a blank line, press 4Return5 at the beginning of the line. You can use the 4BACKSPACE5 (or 4 5) key to back up and type over mistakes. Do not worry about typing the letter exactly as it appears since you will have a chance to correct mistakes later.
Organization of Learning HP EDIT File Commands Function Keys Commands used to manage les are available on the File Commands function key set. xxxxxxxxxxxxxxxxxxxxxxxxxx File Press Commands From the File Commands function key set you can execute commands to bring in a new text le, keep a modi ed text le, join text to your work le and change the name of your current work le. You may also start and manage new HP EDIT processes within your current session.
Organization of Learning HP EDIT Printing a File You can print speci c lines, a block of text, or an entire le by using the Print command. The Print command is executed by pressing the 4Escape5 and P keys while you are in Command Mode. Press 4Escape5 P The Print Text menu appears on your screen. There are four print options that you can change by pressing either the letter next to the option or by pressing the option function key.
Organization of Learning HP EDIT Commands Learned Command Name Function Key Key Assignment Append Character Keep Text Print Text DRAFT 11/7/97 None xxxxxxxxxxxxxxxxxxxxxxxx F2, Keep Text 333333333333333333333333 None a k 4Escape5 P Creating and Keeping Text 06:43 2-5
3 Positioning the Cursor Most editing tasks require that the cursor be positioned on the text that is to be edited. In this lesson, you will learn the varied ways HP EDIT lets you quickly move around your le and position the cursor. If you have exited HP EDIT since completing the last lesson, restart HP EDIT, specifying \EDTUT000.PUB.SYS" as the le name you wish to text in. Otherwise, you can follow the steps for changing the work le to access the le you will use in this lesson.
Organization of Learning HP EDIT Position Commands Function Keys The most commonly used cursor positioning commands are available from the Position Commands function key set. xxxxxxxxxxxxxxxxxxxxxxxxxx Position Press F3, Commands When you press the Position Commands function key, a new set of keys appear that allow you to perform commands to move the cursor around your le.
Organization of Learning HP EDIT Moving to Top and Bottom of File To quickly move to the top or bottom of a le, you may use the Top Of File and Bottom Of File commands. Function key F3, Top Of File, or the assigned key 4(5 may be used to position the cursor to the rst line in your le. The Top Of File command is often used to quickly position the cursor before performing a forward search operation.
Organization of Learning HP EDIT Pressing 4Return5 without rst entering a line number will cancel the Go To Line command. The cursor will remain positioned at the line it was on before you performed the command. Moving the Cursor to the Beginning and End of a Line Terminal Cursor Positioning Keys Note 3-4 The Beginning of Line command and End of Line commands are used to position the cursor within your current line. These two commands are often used before inserting text.
Organization of Learning HP EDIT Other Cursor Positioning Techniques You have probably already used two other techniques to position the cursor: the 4BACKSPACE5 (or 4 5) key and the 4Return5 key. Both keys may be used in Command and Text Entry modes. The 4BACKSPACE5 key moves the cursor to the left one column. It also erases new text when inserting characters in Text Entry mode. The 4Return5 key moves the cursor down one line. The 4BACKSPACE5 and 4Return5 keys work somewhat di erently from 465 and 495.
Organization of Learning HP EDIT Key 4BACKSPACE5 Action performed (or 4 5 ) Moves the cursor back one character 4Return5 Moves the cursor down one line 485 Moves the cursor up one line 495 Moves the cursor down one line 475 Moves the cursor right one column 465 Moves the cursor left one column Avoid using the following keys to position the cursor: 4Next Page5 4Pg Dn5 4Prev Page5 4Pg Up5 4 5 4Home5 Use valid HP EDIT commands instead.
4 Modifying Text To be pro cient with any editor, you must learn techniques for making text changes. This lesson covers some basic HP EDIT commands for modifying text. You will make changes to the letter you created in Lesson Two. If you exited HP EDIT since completing the last lesson, restart HP EDIT, using le \LESSON2". Otherwise, execute the Text File command as shown in the previous lesson, entering \LESSON2" to the lename prompt.
Organization of Learning HP EDIT Appending Text You have already used the Append Character command to add new text to your le. A similar command, Append Line, also permits you to add new text. You can use this command to append text on a new line just below the current line your cursor is on. It is important to rst position the cursor on the appropriate line.
Organization of Learning HP EDIT Deleting Text Press 4/5 Press 4Return5 HP EDIT provides several methods for deleting text. You can delete a single character, a word, an entire line, or a string of characters that match a pattern you specify. You will probably most often use the Delete Character and the Delete Line commands. A single character at a time may be deleted by pressing, F2, Delete Char, or pressing 4d5, the key assigned to the Delete Character command.
Organization of Learning HP EDIT d a c b Delete the word \and" by executing the Delete Character command three times. xxxxxxxxxxxxxxxxxxxxxxxxxx Delete Press F2, Char three times. The terminal key labeled 4Del Char5 (or 4Del5) can also be used to delete a single character when you are in Text Entry mode. You should not attempt to use the 4Del Char5 key in Command mode since HP EDIT does not recognize this key except while you are in Text Entry mode.
Organization of Learning HP EDIT d a c b Type 10 Do not press 4Return5 since the next keystroke other than a number will be interpreted as a command using this new count. The current count, 10, is displayed in the message line. xxxxxxxxxxxxxxxxxxxxxxxxxx Delete Press F2, Char Ten characters are deleted beginning with the character positioned under the cursor. Many other commands such as Delete Line and Scroll Forward can be used with a count.
Organization of Learning HP EDIT d a c b Press 4D5 The entire line has been deleted. You can easily delete blocks of text by typing a count before performing the Delete Line command. You may also delete lines with the 4Del Line5 terminal key if you are in Text Entry mode. This key is not recognized by HP EDIT when you are in Command mode. Inserting Text The Insert Character command is used to insert one or more characters before the current cursor position.
Organization of Learning HP EDIT Char5 (or 4Ins5 ). This key is useful when in Text Entry mode but is not recognized by HP EDIT in Command mode. 4Ins xxxxxxxxxxxxxxxxxxxxxxxxxx Press F1, Insert Char Type "." to place a period at the end of the sentence. Overwriting Text Press 4/5 Press 4Return5 The Overwrite command places the editor in Text Entry mode and enables you to replace characters by typing over them. Text not written over on a line remains the same.
Organization of Learning HP EDIT Saving to a New File Now that the letter is complete, save your le for the next lesson using the new lename LESSON4. To do this, go to the File Commands function key set. xxxxxxxxxxxxxxxxxxxxxxxxxx Press F8, Main Keys xxxxxxxxxxxxxxxxxxxxxxxxxx File Press F1, Commands You can now press the Change Filename function key to give your current work le a new name.
Organization of Learning HP EDIT Shifting text. Sorting text. Swapping text. Summary Concepts Introduced Enter a count to indicate the number of times the next command should be executed. Terminate commands that put you in Text Entry mode by pressing 4/5 and 4Return5. Use the following terminal keys in Text Entry mode but avoid them in Command mode.
5 Undoing Mistakes HP EDIT lets you recover from editing mistakes by letting you undo any command you have executed since you read in or last saved your le. To practice the Undo feature, use the le created in the last lesson. If you exited HP EDIT since doing the last lesson, text in the le LESSON4. If you have not exited, simply return to the Main Keys function key set. Undoing a Command You may have noticed earlier a key labeled \Undo" in the Edit Commands function key set.
Organization of Learning HP EDIT Undoing Several Commands Sometimes you may want to undo more than your last command. The Undo Sequentially command lets you undo all text-altering commands in reverse order. You can use this command to cancel several or all changes made to your work le since the le was read in. Delete three characters to see how this command works.
Organization of Learning HP EDIT Mastering Undo This lesson introduced you to the basic techniques of the undo and refresh commands. Information about the following related topics may be found in the HP EDIT Reference Manual : Undoing all commands. Recovering les after a system failure. Refreshing lines. Summary Concepts Introduced Undo Last Command undoes the last text-altering command. Undo Sequentially undoes one or more commands in the reverse order that they were executed.
6 Searching and Replacing You can search for literal strings in your le by using the search functions provided by HP EDIT. Optionally, matching strings may be replaced with a new value. The search and replace features of HP EDIT help you quickly nd text within a le or quickly make changes to your text. To practice the search and replace features, you will continue to use the same practice le. If you exited HP EDIT since doing the last lesson, text in the le LESSON4.
Organization of Learning HP EDIT HP EDIT prompts for a search pattern in the message line: Search for () : If a search pattern had been previously de ned, it would appear within the parentheses. If you wanted to use the previous search pattern, you could press 4Return5, which would cancel the command and leave the search pattern the same. Type report Press 4Return5 A search pattern has now been set.
Organization of Learning HP EDIT HP EDIT has located the string found on the rst search. Since you did not rede ne the search pattern, the original search pattern \report" was used. Perform the command once more. xxxxxxxxxxxxxxxxxxxxxxxxxx Search Press F1, Backward Since the string does not occur again prior to the cursor position, HP EDIT displays the warning message: Not found.
Organization of Learning HP EDIT Press Return (replace), space (skip), + (all), . . . This message shows you the available options for this operation. The next key you press indicates whether you want to replace the string, skip to the next occurrence of the search string, replace the current occurrence and any more that are found past the cursor, or replace this occurrence and stop searching for more occurrences of the search string.
Organization of Learning HP EDIT Summary Concepts Introduced De ne a search pattern before executing a search command. De ne a replace pattern before executing a search and replace command.
7 Copying and Moving Text Blocks Text can be copied and moved within your le using HP EDIT commands that are often called cut and paste commands. If you activate another editing session, blocks of text can be copied or moved to other les. For this lesson, you may practice the cut and paste commands using the le you created in Lesson 4. If you have exited HP EDIT since doing the last lesson, text in the le LESSON4. If you have not exited, return to the Main Keys function key set.
Organization of Learning HP EDIT Selecting a Block of Text Selecting the Start of Text To select a block of text, position the cursor on the line on which you want the block to begin, and execute the Mark Line Block Start command by pressing either the Mark Line Block function key or by pressing 4X5.
Organization of Learning HP EDIT d a c b