Digital PDFs
Documents
Guest
Register
Log In
AA-H944A-TE
April 1980
197 pages
Original
7.2MB
view
download
Document:
VAX-11 EDT Editor Retference Manual
Order Number:
AA-H944A-TE
Revision:
000
Pages:
197
Original Filename:
OCR Text
VAX-11 EDT Editor Reference Manual Order No. AA-H944A-TE April 1980 This manual describes how to use the EDT interactive text editor. The manual is intended for all users. VAX-11 EDT Editor Reference Manual Order No. AA-H944A-TE OPERATING SYSTEM AND VERSION: VAXNMS V2.0 SOFTWARE VERSION: V2.0 EDT To order additional copies of this document, contact the Software Distribution Center, Digital Equipment Corporation, Maynard, Massachusetts 01754 digital equipment corporation · maynard, massachusetts The information in this document is subject to change without notice andshould not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license, and may only be used or copied in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by DIGITAL or its affiliated companies. Copyright© 1980 Digital Equipment Corporation The postage-paid READER'S COMMENTS form on the last page of this document requests your critical evaluation to assist us in preparing future documentation. The following are trademarks of Digital Equipment Corporation: FOCAL IAS DEC DECnet DECsystem-10 DECtape DECUS DIBOL DIGITAL PDP RSX UNIBUS VAX VMS 5/80-14 Contents Page Preface ix Chapter 1 Introduction 1.1 1.2 1.3 1.4 1.5 1. 6 1. 7 EDT Editor Summary . EDT Commands . . . . 1-1 1-2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 . 1-2 . 1-2 1-3 . 1-3 1-3 EDT Control Commands . . . Line Editing Commands . . Character Editing . . . . Nokeypad Character Editing Keypad Character Editing Text Buffers . . . . . . Line Numbers. . . . . . Startup Command Files . Journal File . Help Facility . . . . . . 1-3 1-4 1-4 1-4 1-4 Chapter 2 EDT Tasks 2.1 2.2 2.3 2.4 2.5 General. 2-1 2.1.1 2.1.2 2.1.3 2.1.4 2-1 2-1 2-1 2-2 Starting EDT . . . . . . . . 2-2 2.2.1 2.2.2 2-2 2-3 The Login Procedure . The Command Line . Line Editing Commands: Creating New Files . . EDT's Protection of Your Input . . . . . More Line Edi ting: New Files . . . . . . . . . 2.5.1 2.5.2 2.6 2.7 Operating System . . . . . . . System Command Level Prompt EDT Command Level . . . . . . Your Terminal Position Marker . More Line Editing: Revising Files . . . And More Line Editing: Multiple Files . Using Character Editing: Nokeypad Editing Using Character Editing: Keypad Editing. 2.7.1 2.7.2 2.7.3 2. 7.4 2.7.5 2.7.6 2. 7. 7 2. 7.8 2.7.9 2.7.10 How to Start Keypad Editing. How to Get Help . . Keypad Functions ~ Inserting Text . . . Moving the Cursor . . Marking Text with Select Ranges. Deleting Words and Characters . . Deleting Lines . . . . . . . . . . How to Change Case . . . . . . . Exiting Keypad Character Editing 2-4 2-5 2-6 . 2-9 . 2-11 2-14 2-19 . 2-19 . 2-20 . 2-20 . 2-20 2-21 . 2-24 . 2-26 . 2-27 . 2-31 2-31 Chapter 3 Protection Provided by EDT 3.1 3.2 3.3 The Journal File . Consistency Check. Error Messages . . . . 3-1 . . 3-3 . 3-3 Chapter 4 Line Numbers and Range Specifications 4.1 4.2 Line Numbers . . . . . . . Range Specifications. . . . 4.2.1 4.2.2 4.2.3 4.2.4 Single Line Ranges . Contiguous Line Ranges Noncontiguous Range Specifiers. Text Buffer Range Specifications . 4-1 . 4-2 . . 4-2 . 4-4 . . 4-4 . . 4-5 Chapter 5 Editor Buffers 5.1 5.2 Text Buffers . 5-1 5.1.1 5.1.2 5.1.3 . 5-1 . 5-1 . 5-1 Main Buffer . Paste Buffer . Additional Text Buffers. Other Buffers . . 5-2 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 . 5-2 . 5-3 . 5-3 . 5-3 . 5-3 Line Buffer Word Buffer . Character Buffer . String Search Buffer . Substitute Buffer. Chapter 6 The Command Line and Command Files 6.1 6.2 6.3 EDT Command Line Command Qualifiers. Command Files . . . . 6-1 . 6-1 . 6-3 Chapter 7 Line Editing Commands 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 7.14 7.15 w COPY Command . . . . DEFINE MACRO Command DELETE Command. FIND Command . . . INCLUDE Command . INSERT Command . MOVE Command. Null Command . . . PRINT Command . . REPLACE Command . RESEQUENCE Command SUBSTITUTE Command . SUBSTITUTE NEXT Command TYPE Command . WRITE Command . . . . . . . . . 7-1 . . 7-2 . 7-4 . . 7-5 . 7-6 . 7-7 . 7-7 . 7-8 . . 7-9 . . 7-9 . 7-10 . 7-11 . . 7-13 . . 7-14 . . 7-16 Chapter 8 Editor Control Commands 8.1 8.2 8.3 8.4 8.5 8.5.1 8.5.2 8.5.3 8.5.4 8.5.5 8.5.6 SET CASE SET CURSOR Top: bottom. SET ENTITY . . . . SET KEYPAD . . . SET LINES Number. ... SET MODE . . . . . ... 8.5.6.1 8.5.6.2 8.5.7 8.5.8 8.5.9 8.5.10 8.5.11 8.5.12 8.5.13 8.5.14 8.5.15 8.6 . 8-1 . 8-2 . 8-3 . 8-4 . 8-4 CHANGE Command EXIT Command HELP Command . QUIT Command SET Command . . . SET MODE CHANGE SET MODE LINE . 8-7 . 8-8 SET [N01NUMBERS SET [N01QUIET .. SET SCREEN Width SET SEARCH. .. . 8-8 . 8-8 . 8-8 . 8-9 8.5.10.1 SET SEARCH EXACT . 8.5.10.2 SET SEARCH BOUNDED 8.5.10.3 SET SEARCH END. . 8-9 . 8-9 . 8-9 SET TAB N. ... . . SET TERMINAL ..... SET [N01TRUNCATE . . SET [NO]VERIFY . SET [N01WRAP N. . 8-9 . 8-12 . 8-12 . 8-14 . 8-14 SHOW COMMAND . . . 8.6.1 8.6.2 8.6.3 8.6.4 8.6.5 8.6.6 8.6.7 8.6.8 8.6.9 .. 8-5 . 8-5 . 8-6 . 8-7 . 8-7 . 8-7 SHOW BUFFER. SHOW CASE . . . . SHOW CURSOR. . . SHOW ENTITY . SHOW KEY. ... SHOW SCREEN . . . SHOW SEARCH .. SHOW TERMINAL . SHOW VERSION . . . 8-14 . 8-15 . 8-15 . 8-16 . 8-16 . 8-16 . 8-16 . 8-16 . 8-16 . 8-16 Chapter 9 Nokeypad Character Editing 9.1 9.2 9.3 Entities of Text . . . . . . . Nokeypad Command Structure. Format 1 Commands . . 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.3.7 9.3.8 ADV (Advance) . BACK (Backup) . . EX (Exit) . . . . . EXT (Extended) . . I (Insert). . . . QUIT . . . . . REF (Refresh) . SEL (Select). . . 9-1 . 9-3 . 9-4 . 9-4 . 9-4 . 9-5 . 9-5 . 9-6 . 9-6 . 9-7 . 9-7 v 9.3.9 TAB . . . . . . . . . 9.3.10 TC (Tab Compute). . 9.3.11 TOP . . . . . . . . 9.4 Format 2 Commands (Without Direction). . 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.4.6 9.4.7 9.4.8 9.4.9 9.5 " (Circumflex) . . . . . . Format 2 Commands (With Direction) 9.5.1 9.5.2 9.6 ASC (ASCII). . . . . SHL (Shift Left) . . . SHR (Shift Right) . . TD (Tab Decrement) . TI (Tab Increment) . UNDC (Undelete Character) . UNDW (Undelete Word) . UNDL (Undelete Line) . . . . S/sl/s2/ (Substitute) . SN (Substitute Next) . . . 9-7 . . 9-9 . . 9-9 . . 9-9 . . 9-9 . 9-10 . 9-10 . 9-11 . 9-11 . 9-11 . 9-11 . 9-11 . . . . . . . 9-11 . 9-11 . . 9-12 . 9-12 Format 3 Commands . . 9-13 9.6.1 9.6.2 9.6.3 9.6.4 9.6.5 9.6.6 9.6.7 9.6.8 . 9-13 . . 9-13 . 9-14 . . 9-15 . 9-16 . 9-17 . 9-17 . 9-18 APPEND . CUT . . . D (Delete) . FILL . . . . [Null] (Move Cursor) . . PASTE . . . . . . . R (Replace) . . . . . TADJ (Tab Adjust) Chapter 10 Keypad Functions In Change Mode 10.1 10.2 10.3 The Keypad and its Functions . . . . . . . Starting and Ending an Editing Session . . 10-2 . . 10-3 10.2.1 10.2.2 10.2.3 10.2.4 . 10-3 . . 10-3 . 10-6 . 10-6 Beginning the Editing Session . . . What it Means to Save or Delete Edits Saving Your Edits . . Deleting Your Edits Essential Functions . . . . 10-6 GOLD. HELP . . . . . RESET . . . . . . 10-6 . 10-7 . . 10-8 10.4 Inserting Text and Lines. 10.4.1 Entering Text . . 10.4.2 Using OPEN LINE. . 10.5 Moving the Cursor . . . 10.5.1 The Arrow Keys . UP . . . DOWN LEFT. RIGHT 10.5.2 Setting the Direction of Cursor Movement . ADVANCE . . . . . . . . . . . . . . . Vl .10-8 . 10-8 . . 10-9 . 10-10 . . 10-10 .10-10 .10-11 .10-12 . . 10-13 10-14 . .10-14 BACKUP . . . . . . 10.5.3 Movement by Entity . CHAR (Character) . . WORD . . . . . . EOL (End of Line) . . LINE . . . . . . . . BACK SPACE . . . . 10.5.4 Movement throughout the Buffer . . PAGE . . . . SECTION .. TOP . . . . BOTTOM. 10.6 Finding Text . . . .... . 10-14 . 10-14 . 10-14 . 10-14 . 10-15 . 10-15 . . . 10-15 . 10-16 . 10-16 10-16 . 10-16 . 10-16 . 10-16 FIND . . . . FNDNXT (Find Next) . . 10-16 . 10-17 10. 7 Deleting. and Reinserting Text . . 10-19 10.7.1 Deleting and Reinserting by Character DELETE . . . . . . . . . . DEL C (Delete Character) . . . . UND C (Undelete Character) . . . 10.7.2 Deleting and Reinserting by Word . . LINE FEED . . . . . . . DEL W (Delete Word) . . . . . . . UND W (Undelete Word) . . . . . . 10.7.3 Deleting and Reinserting by Line . CTRL/U . . . . . . . . . . . . . . DEL EOL (Delete to End of Line) DELL (Delete through End of Line) UND L (Undelete Line) 10.8 Selecting and Moving Text . 10-19 . 10-19 . 10-19 . 10-19 . 10-20 . 10-20 . 10-20 . 10-21 . 10-21 . 10-21 . 10-22 . 10-22 . 10-22 . . 10-23 SELECT CUT . . PASTE . APPEND . 10-23 . 10-24 . 10-26 . 10-27 10.9 Replacing and Substituting Text. . 10-30 REPLACE .. SUBS . . . . . 10-30 . 10-32 10.10 Entering Commands . . ENTER . . . COMMAND. 10.11 Special Characters, Changing Case, and Filling Lines . . 10-33 . 10-33 . 10-34 . 10-34 SPECINS .. CHNGCASE . . . . . FILL . . . . . . . . . 10-34 . 10-35 . 10-35 10.12 Control Character Functions. . 10-36 CTRL/C. CTRL/U . . . . . . . . 10-36 . 10-36 vii CTRL/W CTRL/Z. CTRL/A. CTRL/E. CTRL/D. CTRL/T. CTRL/K. . . 10-3~ . 10-3( . 10-3~ . 10-34 . 10-34 . 10-3'i . . 10-3'i 10.13 DEFINE KEY Command . . . 10-37 Appendix A Differences In Terminal Responses A. l A.2 A.3 Hardcopy Terminals. . . . . Nokeypad Display Terminals. Keypad Display Terminals. . .. A-1 . . A-2 . A-3 Appendix B Error Messages Appendix C ASCII Decimal Equivalents Glossary Figures 10-1 The VT52 Keypad and Its Functions . 10-2 The VTlOO Keypad and Its Functions 10-3 Keypad Numbers . . . . . . . . . . 10-4 10-5 10-39 Tables 6-1 9-1 EDT Command Qualifiers . Entities. . . . . . . . . . .. 6-2 . . 9-2 Commercial Engineering Publications typeset this manual using DIGITAL's TMS-11 Text Management System. 944all viii Preface Document Objectives The VAX-11 EDT Editor Reference Manual describes the EDT editor, EDT commands, the command qualifiers, and their usage. The manual provides the user with all the information necessary to use EDT. Intended Audience This manual introduces all users to the interactive text editor EDT and provides reference material on EDT. EDT is useful for creating and editing programs and text. Document Structure This manual is divided into 10 chapters, 3 appendixes, a glossary, and an index. Users new to text editors should read the complete manual, concentrating on Chapters 2, 4, 6, 8, and either 7, 9 or 10. Users with experience in using text editors should read Chapters 4, 6, 8, and either 7, 9 or 10 before using EDT. Users whose interest is primarily line editing should read Chapter 7; users whose interest is primarily nokeypad character editing should read Chapter 9; readers whose interest is primarily keypad editing should read Chapter 10. The examples use the VTlOO terminal; the response differences for other terminals is in Appendix A. Chapter 1 is an introduction with a general description of EDT's features. ix Chapter 2 presents a series of sample tasks in order of increasing complexity. The first tasks are presented with the most detail. The tasks are presented as tutorial lessons that, when followed step by step, show EDT's responses to certain inputs. Chapter 3 describes some of the protection provided by EDT. This protection gives the user visible proof of an EDT operation. Chapter 4 describes the line numbering system and the range specifications used in EDT. Chapter 5 describes the buffers used in EDT. Chapter 6 describes the EDT command line and the command files. Chapter 7 describes EDT line editing commands with examples of their use. Chapter 8 describes editor control commands with examples of their use. Chapter 9 describes EDT character editing commands with examples of their use. Chapter 10 describes EDT keypad character editing commands with examples of their use. Appendix A describes the differences in terminal displays in response to EDT. Appendix B describes the error messages contained in EDT. Appendix C lists the ASCII character codes in decimal. The glossary describes the unfamiliar terms and abbreviations used in this manual. Associated Documents The user should refer to the associated manual on the operating system for information on file handling external to EDT. Users unfamiliar with VAXNMS should read the VAX-VMS Primer (order no. AA-D030A-TE). Conventions The symbols used in this manual have the following meaning: Symbol CTRL/x or~ Meaning The phrase CTRL/x indicates that you must press the key labeled CTRL while you simultaneously press another key; for example, tTRL/c) or ~. x @ID The DELETE key symbol signifies the deletion of the character to the left of the cursor. (ff) The form feed symbol signifies the end of a page. GOLD I or, ( GOLD/x) The phrase GOLD/x indicates that you must press the GOLD keypad key and then another key; for example, ( GOLD/T)or (GOLD/ A). ~ The RETURN key symbol signifies a carriage return. [] Brackets enclose optional parameters within command statements. Parameters describe the object of the command (that on which the command performs, for example, a file, a line, a word). {} Braces enclose a list of alternatives within a command, one of which you must specify. The OR symbol separates qualifiers for the same operation and the alternatives contained within braces. $ The DIGITAL command language (DCL) prompt at the left margin indicates the operating system is at DCL level. * The EDT command level prompt at the left margin indicates that EDT is at command level. Abbreviations The minimum abbreviation for a command is given in the command description. The minimum abbreviation is shown in bold type; the remainder of the word is shown in standard type. EDT accepts any input from the minimum abbreviation up through the complete command. The complete command word is used in this manual. Color Red type indicates user input. Ellipses show that not all of the statements in an example or figure are shown. Ellipses may be horizontal or vertical. Also used for indefinite repetition in command formats. xi Chapter 1 Introduction This chapter contains an overall description of the EDT editor. 1.1 EDT Editor Summary The EDT editor is an interactive, general purpose text editor. You can use EDT for generating new files and modifying old files. The files can contain programs or text. Features include: Decimal line numbers English language based commands Original (fixed) line numbers Hard copy and screen display On-line error diagnosis Help facility File and buffer input/output handling Keypad editing Line editing Macro capability On-line help facility Journaling (a record of edit operations) 1-1 1.2 EDT Commands EDT provides commands for all usual editing operations. EDT commands are divided into four groups: EDT control commands Line editing commands Nokeypad character editing commands Keypad character editing commands There are two modes of operation: command mode and change mode. You enter EDT control commands and line editing commands from command mode. You enter character editing commands from change mode. 1.2.1 EDT Control Commands EDT control commands control the operation of EDT. The control commands are: CHANGE Places EDT in either keypad or nokeypad character editing. See Chapters 9 and 10. EXIT Leaves EDT, saving the edited input as a file. HELP Displays .help information. QUIT Leaves EDT without saving the input as a file. SET Sets editor operating parameters. SHOW Shows status of selected parameters. 1.2.2 Line Editing Commands The line editing commands are those commands (other than the control commands and the HELP command) which you enter from EDT command mode, that is, after the asterisk (*) prompt. The line editing commands are: 1-2 COPY Copies a selected number of lines from one location in an EDT buffer to another. DEFINE MACRO Names a sequence of commands which are then performed when the macro name is entered as a command. DELETE Deletes selected line(s). FIND Finds a selected line. INCLUDE Copies external files to a specified text buffer. Introduction INSERT Opens a text buffer for the insertion of text. MOVE Moves a selected number of lines from one location in an EDT buffer to another. Null Signifies an implied TYPE command. PRINT Generates a printable file from a range of lines. REPLACE Deletes and inserts selected lines in a text buffer. RESEQUENCE Renumbers lines in a text buffer. SUBSTITUTE Replaces one string of characters with another string of characters. SUBSTITUTE NEXT Replaces the next occurrence of one string of characters with another string of characters. TYPE Displays selected lines. WRITE Copies selected text in an EDT buffer to a file. You can modify the action of some of these commands with command qualifiers and range specifications. 1.2.3 Character Editing To use either the keypad or the nokeypad character editing commands, enter the CHANGE command. For VT52 and VTlOO terminals, EDT defaults to the keypad character editing commands. For other terminals, EDT defaults to the nokeypad character editing commands. To use the nokeypad commands on the VT52 or VTlOO, use the SET NOKEYPAD command. 1.2.4 Nokeypad Character Editing The nokeypad character editing commands are entered through the keyboard; you also use the keyboard to enter text. You end the command entries with a ~, which tells EDT to execute the commands. 1.2.5 Keypad Character Editing The keypad character editing commands are entered through the keypad keys; you use the keyboard to insert text. You can change the command assignment for the keypad keys with the DEFINE KEY command. 1.3 Text Buffers You store and change text in areas called text buffers. Text buffers are organized into lines containing 0 to 255 characters. There is no explicit limit on the number of text buffers that you can use during an editing session. Introduction 1-3 1.4 Line Numbers EDT assigns each line in a text buffer a unique line number when that line is input to the buffer. When you add a line that is not at the end of the buffer, EDT assigns the line a number between the number of the line preceding and the line following. When there are no unassigned whole numbers between the preceding and succeeding line, the current line is given a decimal number (for example, a line inserted between lines 3 and 4 is given the number 3.1). Fixed line numbers are a fixed part of the file containing them. When you copy a file which has fixed line numbers, EDT maintains a record of them in a second field. The numbers in this field, which is not displayed, can be used as range specifications. You can also use EDT to write fix.ed line numbers to a file (see EXIT and WRITE commands). 1.5 Startup Command Files A startup command file is a file containing EDT commands that are executed when you start EDT. You can define macros and keys and set editor operating parameters with startup command files. You can do this using the EDTINI.EDT file or the command file qualifier. If you do not use the command file qualifier, EDT searches your directory for the file EDTINI.EDT. EDT executes the commands in the command file before prompting you for input. When there is neither a command file nor the EDTINI.EDT file, EDT begins an editing session with the default values. 1.6 Journal File EDT maintains a journal file containing all of your inputs to EDT for each editing session. EDT saves this file if there is a system failure. Therefore, the journal file provides protection against system failures during the edit session. You can direct EDT to execute the contents of the journal file at the beginning of another editing session. EDT deletes the journal file when you make a normal exit from the editing session unless you specify that it be saved. You can also edit the journal file. 1. 7 HELP Facility EDT has a help facility. Use the HELP command to display information about EDT commands on your terminal. A HELP key is available in nokeypad character editing. The help facility provides on-line documentation of EDT. 1-4 Introduction Chapter 2 EDT Tasks This chapter contains examples of sample tasks using EDT commands. The examples are in order of increasing complexity. The introduction to each example lists the EDT commands used in the task. See Chapters 7, 8, 9, and 10 for descriptions and examples of the individual commands. The illustrations for the examples show the interaction between you and the operating system. Red shows your input. 2.1 General EDT is an easy-to-use text editor. The more you use EDT, the more confidence you will have in it and your ability to use it. Remember that EDT protects your work. 2.1.1 Operating System EDT is a program included with your operating system. The operating system is the software package that controls the operation of the computer. This includes enabling you to communicate with the computer through your terminal. The operating system, including EDT, has a defined set of symbols to describe its status. Learn these symbols and the proper responses to them. The examples in this chapter use the VAXNMS operating system symbols. 2.1.2 System Command Level Prompt The command level prompt for the VAXNMS operating system is a dollar sign ($). This is present when you have access to the DIGITAL command language (DCL). You access EDT from the DCL level with the command line (see Chapter 6). 2.1.3 EDT Command Level The EDT command level prompt is an asterisk (*). This is present when you can enter EDT command level commands. The* is not present when you are in insert or change mode. 2-1 2.1.4 Your Terminal Position Marker Your terminal has a position marker or cursor. !if! VTlOO VT52 (On VTlOOs, you can set the cursor to be either an underline or a blinking rectangle.) The cursor indicates your position for the entry of text and commands from the terminal. The cursor is present when your display terminal is working. The cursor presentation for other terminals is given in Appendix A. 2.2 Starting EDT To use EDT, you must first have access to system command level. You have this access when you log in to your operating system. 2.2.1 The Login Procedure To log in, you must have a working terminal and a user name and password that the operating system recognizes. This is your key to the operating system. Example: r~ Username: GUNDERS rBrn Pass1...iord: IBflJ Welcome to VAX/VMS Version n A messase of the day follows the welcome. $ ' mm ~~--------~---------J When you see the cursor on the display, enter a ~. If the terminal is not logged in, the response to your~ input is 'Username:'. Enter your account name and a ~.Respond to the 'Password:' prompt with your account password and a~. Your password is not displayed. When your entries are recognized, the operating system responds with a $ prompt. The $ is the DCL command prompt, after which you can enter any system command. · (@ User n artl e: GUNDDRS rBrn Password: (@) @Losin - user validation error l~ ____________________J If you make a mistake in your login sequence, you receive an error message. 2-2 EDT Tasks The message indicates that the system does not recognize the username/password combination you used to log in. 2.2.2 The Command Line When the $ is present, you can enter any of the DCL commands. The DCL command for EDT is EDIT/EDT (see Chapter 6 for details on the command line). Determine the form of the command line you want to use. If you do not enter the input file specification, the operating system prompts you for a file name. Examples: ( $ EDIT/EDT(fl(f) $_File: TRIAL(fl(f) InPut file does not exist CEOB J '= :::: \ - *n I ~ ------------------------------- In this example, you enter the command line without defining an input file. The operating system prompts you for an input file name. You c;an name a new file or enter the name of an existing file. After the* prompt, you can enter any EDT command level command. ( EDIT/EDT NE}-{T(fl(f) InPut file does not exist CEOBJ $ ~~-:::::::: ___________________J In this example you enter the input file in the command line. In the first two examples, an input file with the name you specify does not exist. EDT displays an information message ('Input file not found'), an end of buffer symbol ([EOB]), and an EDT command prompt. (If you think your input file exists, check your file name against the directory.) The [EOB] indicates that EDT is at the end of the text in the current text buffer. The EDT command prompt indicates that you are at EDT command level; you can enter EDT commands. $ EDIT/EDT TYPEA /OUTPUT=TYPEBIBD) 1 This contains text. EDT Tasks 2-3 In this example, you define an existing input file and a name for the output resulting from this editing session. EDT displays the first line of the input file and the EDT command prompt. Remember that to gain access to EDT, you must have access to the operating system. This requires that you: 1. Log in to the operating system 2. Enter the DCL command for EDT 2.3 Line Editing Commands: Creating New Files Once you enter EDT command level, you can start entering text into a text buffer; EDT always opens the text buffer MAIN. Assume, unless stated otherwise, that all references to a text buffer refer to the text buffer MAIN. When you exit an editing session, EDT moves the contents of the text buffer MAIN to a file. You control the name of the file through the command line you used to begin the editing session. The simplest form of file generation is the insertion of new text. When you are at EDT command level, enter the INSERT command; this opens the text buffer for the insertion of text. Insert the desired text, ending each line with IB"ill. When you wish to exit insert mode, enter ©TRL/z). End the editing session with an EXIT. The following example is the simplest form of file creation using EDT. The EDT commands used are: •INSERT •EXIT Example: ( EDIT/EDT TEST(BITJ InPut file does not exist $ ' [EQBJ *I NSERT(Bff) The text buffer is oPen for insertins text.(BITJ This is line t1...io.(BITJ This is line three.(BITJ *E >'1 T (BIT) liFKiZJ DB1:[GUNDERSJTEST.;1 3 lines $}{ :;:::::: ~-----------------------J In this example, your command line defines the input file TEST, which does not exist. Enter INSERT after the EDT command prompt. EDT opens the text buffer and enters insert mode. Enter the text on a line by line basis. The 2-4 EDT Tasks text you enter is automatically indented because the first 16 spaces of each line are reserved. for line numbers. The line numbers appear when EDT displays the line in response to other line editing commands. · As you enter a line, you can delete characters by pressing ~. You end each line with~. However, when you end a line, you can no longer delete characters from that line in insert mode. You can delete a portion of a line, from the cursor to the left margin, by entering (CTRL/u) • To exit insert mode, enter (CTRL/z); this returns you to EDT command level. To end the editing session, enter the EXIT command. EDT then moves t.he contents of the text buffer to a file and names the file TEST. When the transfer is complete, EDT displays a message stating the location and size of the file. This is followed by the DCL prompt. If you now enter TEST as the input file on your command line, EDT transfers a copy of the file TEST into the text buffer. 2.4 EDT's Protection of Your Input It is important that you feel confident that EDT protects your work. One feature of EDT is the journal file, which is a record of your input to the terminal (text and commands). EDT adds to the journal file incrementally rather than continuously. When you end an edit session with other than the EXIT or QUIT command (without the SAVE qualifier) EDT automatically saves the journal file. You can restore your files to the condition that existed when the edit session ended by using the RECOVER qualifier in the command line. Example: ( $ ED IT I EDT(BTI) $_File: TESTER(BTI) InPut file does not exist CEOBJ *INSERT(BTI) This This This This is is is is line line line line one.(BTI) t 1,.1 0 • (8TI) three.(BTI) four.(BTI) (CTRL/Y.l $ DI RECTORY(BTI) TESTER.Jou;1 Total of 1 file. ${) "--~---------------------J You enter the INSERT command and EDT opens the text buffer for the insertion of data. You end each line of data with~. Assume that you make a mistake and enter lQIB® instead of (CTRL/z). EDT responds to @j]lli) in much the same way it does to a system failure; the editing session is ended and the EDT Tasks 2-5 journal file is saved. You can reenter EDT at the point where you entered tTRL/Y) by entering CONTINUE (DCL command). Any DCL command that requires the execution of an image breaks that link to EDT. Assume you react to the$ prompt with a DIRECTORY command before you think through the options; DCL responds by displaying the files in your directory (the TESTER journal file). Your link to EDT is now broken and you cannot use CONTINUE. ( $ ED IT I ED T 00) $_Fi 1 e: TESTER I RECOIJEROO'.) InPut file does not exist INSERT This is line one. This is line two. This is line three. \.__ . CEOBJ _) To use the journal file, enter the same command line as before but add the RECOVER qualifier. EDT reads the journal file as if it were !nput to the terminal and displays the results. Note that the fourth line of your input is not recovered. EDT transfers your input to the terminal to the journal file at set intervals and the portion of your input between transfers can be lost. You can continue your edit session. The journal file retains the input from the previous editing session with the input from this session added at the end. In this way you can have successive recoveries with one journal file until you exit with the EXIT or QUIT command. 2.5 More Line Editing: New Flies Editing sessions are usually more complex than the previous ones. The next example shows how to use more of the line editing commands. The commands used are: •Null •REPLACE •TYPE •DELETE •EXIT 2-6 EDT Tasks Example: ~EDIT/EDT ChillY.Dat InPut file does not exist CEOBJ *INSERT The to1,.1n of Chill>'t Me. is located 40ID r1liles north of Bansor.ID ID ChillY's r11ain industr>' is tourisr11 andID i t n o 1,.1 c o n t a i n s n o h e a v >' o r 1 i. s h t ID industries. There is a sufficientID labor base for a srTlall liSht industn• •ID but 1t11.1ch of the labor force is uns~\illed+ID ID The a1Jerase Yearl>· ter11Perature is GBID desrees F; r11ean annual sno1,.1fall is(!ID) 172 inches.ID l~ _____________________) ~ In this example, you enter text into the text buffer with the INSERT command. When the initial entry is complete, you enter ©TRL/z) to exit insert mode. In reviewing the material, you decide to add a statement after the second line. ( *TYPE 2ID 2 Miles north of Bansor. 3 *REPLACE 3ID 1 line deleted Major access is b>' route 70/81 •ID 1,.ihich is frec11.1entl>' sno1,.1bound+ID ID \ ~ K:TRL/Z) ~~-------------------There are several ways to find a location (line) in the text buffer. One method is to make a best guess on the line number and then search from that point. To locate the position for adding the line, enter TYPE 2 and ~; EDT displays line 2 and an EDT command prompt. Enter ~; EDT automatically displays the next line in the text buffer, the blank line 3. This is the implied TYPE command; in the absence of any command preceding the ~' EDT displays the next line in the text buffer. You can insert the statement in place of line 3 by using the REPLACE command. Enter REPLACE 3; EDT deletes line 3, displays a message telling how many lines were deleted, and enters insert mode. After you enter the EDT Tasks 2-7 statement and a blank line to replace the deleted line, you exit insert mode with tTRL/Z). In a second review, you decide to add a recommendation to the report. ( *INSERT END ([@ Because of its inaccessibility and its(ijfl) lacK of a sKilled labor force, '"'e do not(ijfl) recorr11r1end ChillYt Me. as a Plant site.(ijfl) ~ ~----------~----------J To add the recommendation to the end of the buffer, enter the INSERT END command; EDT opens the text buffer for the insertion of text at the end of the current text. Enter (8fil) to make the first line of this insert blank. Enter the statement, (8fil), and (CTRL/Z). *TYPE WHOLE~ 1 2 2. 1 2.2 2.3 a 5 G 7 8 9 10 11 12 The town of ChillYt Me. is located 40 miles north of Bansor. MaJor access is bY route 70/81 t which is frequently snowbound. ChillY's main industry is tourism and it now contains no heavy or liSht industries. There is a sufficient labor base for a small lisht industrYt but much of the labor force is unsKilled. The averase YearlY temPerature is 88 desrees F; mean annual snowfall is 172 inches. 13 1a 15 16 Because of its inaccessibility and its lacK of a sKilled labor baset we do not recommend ChillYt Me •. as a Plant site. CEOBJ *E>(IT(ijfl) DBB1:CGUNDERSJCHILLY.DAT;1 18 $@} lin~s ---------------------------~ To review the contents of the text buffer, enter the TYPE WHOLE command. EDT displays each line of the text buffer, in sequence, beginning with the first line. You can interrupt the scrolling action of the TYPE WHOLE command 2-8 EDT Tasks with (CTRL/sl. To restart the display of the text buffer, enter a~. Notice that the lines you inserted between lines 2 and 3 are numbered with decimal numbers. When you enter the EXIT command, EDT moves the contents of the text buffer to a file. When the move is complete, EDT displays a message with the complete name of the file and the number of lines in the file. 2.5.1 More Line Editing: Revising Files You deal with existing files in much the same way you deal with new files. When the input file in your command line is an existing file, EDT loads the input file into the text buffer before prompting you for input. You can modify and add to the file. For the next example, assume that you want to add to the CHILLY.DAT file. The EDT commands used include: •INSERT •DELETE •TYPE •REPLACE • SUBSTITUTE • RESEQUENCE Example: ( EDIT/EDT CHILLY+DATIBrn 1 The town of ChillYt Me. is located 40 *TYPE 4IBm a which is frequently snowbound. *INSERT 5IBrn The nearest airPort is in Bansor tIBm althoush a seaPlane lands once a 1..,1ee~~IBm on nearb>' La~{e mUchib1..,1a.IBrn $ ~ ~~--------~----------J When EDT completes copying the file CHILLY.DAT into the text buffer, it displays the first line of the file and an EDT command prompt. In the first sequence, you use the TYPE command to locate where you are going to enter new text. The INSERT command opens the text buffer just before line 5 for the insertion of text. Enter ~ to exit insert mode. EDT Tasks 2-9 ( *TYPE 2Cfirrl 2 Miles north of Bansor. *IB@ 3 MaJor access is bY route 70/81, *SUBSTITUTE !70/81!193!~ 3 MaJor access is bY route 193t 1 Substitution *Cfirrl a which is fre~uentlY snowbound. *TYPE 12IBrrl 12 The avera6e Yearly teMPerature is 88 *DELETE 12~ 1 line deleted 13 desrees F; Mean annual snowfall is *DELETE~ 1 line deleted 1a *DELETECfirrl 1 line deleted 172 inches. 15 *INSERT ENDIB@ IBrrl Fa c t o r s c on s i d e r e d i'n c 1 u d e a c c e s s , ~ Present industrYt and labor force.~ ~ .J Use the SUBSTITUTE command to replace the highway number. The SUBSTITUTE command uses a search string and a substitute string. The substitute string replaces the search string. The strings are are separated by and enclosed by delimiters. A delimiter is a character that limits a string and therefore cannot be contained in the string. To use the SUBSTITUTE command, you must place EDT at the line con .. taining the string you want to substitute. To do this, move to the line prior to entering the SUBSTITUTE command or enter the line in the range specification. (Range specifications define line numbers for use with EDT commands.) The default range specification is the current line. Because the string you want to replace contains a slash, you cannot use that character as a delimiter. You can use any other special character. When EDT completes the substitution, it displays a message on the number of substitutions made and displays the corrected line. Use the implied TYPE command to see the next line, line 4. You then decide to delete the lines about temperature and snowfall. You use the TYPE command to display the lines, and the DELETE command to delete the lines. EDT deletes the line, tells you how many lines were deleted, and displays the next line. You decide to insert a final statement. Type INSERT END and insert the general statement, ending the insert with ~. 2-10 EDT Tasks ( *RESEQUENCEffi) 21 lines resequenced *TYPE WHOLEffi) 1 The town of ChillYt Me. is located ao 21 Present industrYt and labor force. [EOBJ *E)< ITffi) D551:[GUNDERSJCHILLY.DAT;2 21 lines To change the decimal line numbers, enter the RESEQUENCE command. EDT renumbers the lines from 1 through 21. Enter a TYPE WHOLE command to review the contents of the text buffer and then use the EXIT command to end this editing session. When EDT has moved the contents of the text buffer to a file, it displays a message with the complete name of the file and the number of lines in the file. Because this is the second time you have worked with this file, its version number is now 2. To practice creating and revising files, make two new files similar in contents to CHILLY.DAT. You will use these files in the next example. Name the files TEPID.DAT and WARM.DAT. 2.5.2 And More Line Editing: Multiple Flies You can use several files as inputs to one editing session and generate several files during one editing session. The next example uses the following commands: •INCLUDE •PRINT •WRITE •SHOW •MOVE •COPY • RESEQUENCE •DELETE •INSERT EDT Tasks 2-11 Example: ( EDIT/EDT SITES.DAT InPut file does not exist $ [ EOB J *INSERT LAm STATISTICS ON POTENTIAL PLANT SITES~@ lBITJ lBITJ This report is a su1n1r1an· of the infor1r1ationl@1J about the 3 to1,.,1ns proposed as Plant sites:lBIT) ~ Chilbt Me.lBIT) (BIT) Warrrlt Ariz.~ ~ TePidt Mo.lBIT) lBITJ (CTRL/Z) ~~----------------------~ In this example you generate a report. The report consists of new text that ties together information contained in other files. The material you inserted above introduces the text that exists in other files. Use the INCLUDE command to bring a copy of those files into this editing session. ( *INCLUDE CHILLY.DAT =CHILLY~ *INCLUDE WARM.DAT =WARM(BTI) *INCLUDE TEPID.DAT =TEPIDCBITJ *SHOW BUFFERlBIT) MAIN 12 lines PASTE 0 lines CHILLY 21 lines =TEPID 18 lines WARM 28 lines *(( ~----------------------~ Here you use the INCLUDE command to copy the external files into separate text buffers. The SHOW BUFFER command displays the names of the text buffers defined for this editing session. The = indicates the current text buffer. 2-12 EDT Tasks ( *=CHILLYffiIT) 1 The to1,..1n of Chill~·t Me. 21 Present industrYt and *COPY 20 t 21 to =MAIN ENDffi@ 2 lines copied is located llO labor force. *\t ~~-----------------------J You can use a form of the TYPE command to move EDT from the text buffer TEPID to the text buffer CHILLY; enter =CHILLY. EDT displays the contents of the text buffer CHILLY with line numbers. The cursor is left at line 1. To copy the general statement at the end of the text buffer CHILLY to the end of the text buffer MAIN, use the COPY command. The COPY command inserts a copy of lines 20 and 21 at the end of the buffer MAIN. EDT positions the cursor just after the moved text. ( *MOl,JE =CHILLY TO ENDffi@ 21 lines 11101Jed *MOl.JE =WARM TO ENDffi@ 28 1 in es 11101Jed *MOl.JE =TEPID TO END(BTI) 18 .1 in es 11101.ied *RESEQUENCE(BIT) 85 lines resequenced *PRINT SITES.SUM(BIT) *E>( I Tffi@ DBB1:CGUNDERSJ SITES.DAT;1 77 lines ${t ~~--------------------J Use the MOVE command to move the contents of the text buffers to the end of the text buffer MAIN. MAIN now includes the title of the report, the introductory material of the report, the text from CHILLY.DAT, WARM.DAT, and TEPID.DAT, and the concluding lines copied from line 20 and 21 in CHILLY.DAT. The RESEQUENCE command renumbers the lines in MAIN from 1 to n. The PRINT command copies the contents of MAIN to the file space. The file is in a printable format and is assigned the name SITES.SUM. The EXIT command copies the contents of the text buffer MAIN into the file; this file is named SITES.DAT. EDT Tasks 2-13 2.6 Using Character Editing: Nokeypad Editing In character editing, EDT lets you modify text at the character level. To enter nokeypad character editing, you use the SET NOKEYPAD command for VT52 and VTlOO terminals and then enter the CHANGE command. Nokeypad is the default mode for all other terminals; you enter the CHANGE command after the * prompt without using the SET command. The nokeypad commands are described in detail in Chapter 9. In nokeypad character editing, the screen displays up to 22 lines of text; line numbers are not shown. EDT displays nokeypad character editing commands at the bottom of the screen. When you enter a command, the cursor moves to the command entry position. After EDT executes the command, it returns the cursor to the displayed text. You can move the cursor to any position in the display with cursor movement commands. The format for a cursor movement command is a count of entities ending with IB'filJ (an entity is a quanfity of characters), such as 3L for "3 lines." You can modify the contents of the text buffer with additional nokeypad character editing commands. Your display represents the current contents of the displayed range within the buffer. The example shows how to: • Enter nokeypad change mode • Move the cursor • Insert text • Delete and insert text • Substitute text • Cut and paste text • Exit nokeypad change mode Example: ( $ EDIT/EDT CHILLY.DATIB[I) 1 The town of ChillYt Me. is located aO *SET NOKEYPADIB[I) *CHANGE~ T\h e t o 1,.1 n o f Ch i 11 Y t Me • i s 1 o c a t e d a0 ;iles north of Bansor. MaJor access is by route 193t which is frequently snowbound. "--- 2-14 EDT Tasks [ EDB J You use the SET NOKEYPAD command to set EDT to nokeypad character editing when the CHANGE command is entered. When you enter the CHANGE command, the screen clears and then displays the contents of the text buffer. The cursor is at the beginning of the text buffer. ( The to1,.1n of Chill>•, Me. is located llO Miles north of Bansor. MaJor access is bY route 193, which is frequently snowbound. CEOBJ J ~~3-q]_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The to1,.1n of ChillYt Me. is located llO Miles north of Bansor. MaJor access is bY route 193, lhich is frequently snowbound. CEOBJ 3L~ ~~---------------------J You decide to move the cursor down 3 lines and enter the 3L command. The cursor moves to the command entry position. When you press~' it moves to the first character in the fourth line. You then decide to shorten the file in order to work with it. Move the cursor to the beginning of the eighth line. You can either use the command 4L or press the down arrow function key four times. Delete all the following lines with the command D14L. The cursor is at the end of the buffer. ( on nearby Lake Okichibwa. :tEOBJ . .4L~ DlllL~ ~ _) EDT Tasks 2-15 "Lake Okichibwa" should be spelled "Okechibwa." Use the command sequence: -1L~ 17C~ This moves the cursor back (up) one line and to the right 17 characters. The minus sign is necessary in the first command to set the direction for the cursor movement. The cursor is now on the letter "i": on nearby Lake Dklchibwa. [EQB J To delete the incorrect letter and insert the letter "e," use the command sequence: D1C~ I e(Qffil.KJ ~ EDT inserts the letter "e" in the correct place: on nearby Lake Oke@hibwa. The name of the lake is actually "Okechibwa Lake." Move the cursor to the beginning of the word "Lake" with the command -SC. (Remember that the minus sign indicates movement to the left.) on nearby lake Okechibwa. Delete the whole word with the command DlW. The word "Lake" disappears from the screen and is stored in a buffer. Move the cursor forward (right) 9 spaces with the command 9C: ( on nearby Okechibwa@ [EOBJ 9CIBIT) ~~---------------------~ 2-16 EDT Tasks Now you can reinsert the word "Lake" with the undelete word command: ' ( on nearby OKechibwa@aKe • CEO BJ \ _J UNDWffi) ~---------------------To enter a space between the two words, enter the command: Move the cursor to the space before the period and enter the delete character command. The line now stands corrected: ' ( on nearby OKechibwa LaKeIB CEOBJ _____________________J \..__ D I Cll!J) If you decide to change the word "frequently" to "often" in the fourth line, you can use the SUBSTITUTE command: s/f rec:iuentlY/often/ffi} However, when you try this, you get an error message: The town of ChillYt Me. is located 40 Miles north of Banfor. MaJor access is bY route 183t which is frec:iuentlY snowbound. The nearest airPort is in Banfort althoufh a seaPlane lands once a weeK on nearby OKechibwa LaKel CEO BJ \..__ _J Strin• 1111as not found ----------------------EDT Tasks 2-17 To understand why this happened, look at the cursor position in the text area. The SUBSTITUTE command began a forward search when the cursor was near the end of the text and immediately reached the end of the buffer. Use the BACK command to reverse the search direction. The cursor is now at the beginning of the search string: which is lrequentlY snowbound. Try the SUBSTITUTE command again. This results in: which is often@snowbound. EDT will continue reverse searching unless you negate the BACK command with ADV (ADVANCE). All searches will now be forward. You now decide to perform one last edit on this text. You want to move the second sentence to the end of the buffer. Move the cursor to the beginning of the second sentence: ( iliaJor access is bY route 193, which is often snowbound. ' ~~-----~~-~-----------~ Use the CUT command (CUT 2L) to cut the sentence and move it to an auxiliary buffer called the paste buffer: CUT2LQ!® Your text now reads: (The to1,,in of Chilly, Me. is located 40 Miles north of Bansor. lhe nearest airPort is in Bansor, althoush a seaplane lands once a 1,.1eeK ~---or_1_1-1e_a_r_b_Y__D_K_e_c_h_i_b_w_a_L_a_t_te_·--~---------------------------~ 2-18 EDT Tasks To reinsert the cut sentence at the end of the text, move the cursor to the end of the buffer and use the PASTE command: Th e t o . ._, n o f Ch i 11 }' t Me • i. s 1 o c at e d aO Miles north of 6ansor. The nearest airport is in 6ansort althoush a seaPlane lands once a week on nearby OKechibwa Lake. MaJor access is by route 193t which is often snowbound • .\t'.E06] PASTE~ \ ~ ~----------------------To go back to the EDT command level, enter EX (Bfil'). These examples show a small portion of the nokeypad character editing commands. It is recommended that you experiment with nokeypad character editing, using the examples in Chapter 9. 2.7 Using Character Editing: Keypad Editing The keypad is the set of keys at the right of the keyboard. You can edit with the keypad if you have a VT52 or VTlOO terminal. There are diagrams of the VT52 and VTlOO keypads in Chapter 10. The function keys used in the examples are enclosed by broken lines; for example: r----~ I GOLD I ''------' 2.7.1 How to Start Keypad Editing Start EDT and create the text file COLD.DAT: ( $EDIT/EDT COLD.DAT~ InPut file does not exist [E08] l~_*w ___________________~ Type the CHANGE command after the line editing prompt t.o start a keypad editing session: * CHANGE(flfl) EDT Tasks 2-19 The screen clears and the cursor appears at the upper left of the screen. On the line below the cursor is the [EOBJ symbol. Whatever you type at this point appears on the screen before the cursor. The [EOB] symbol always appears after the last character in the text buffer. 2. 7 .2 How to Get Help You can get two kinds of help during keypad editing. First, you can use the HELP function to get a diagram of the default keypad functions. Press the HELP key for this diagram. (Requesting help this way does not affect your editing session.) Second, once you have the diagram, you can press any keypad key to see a description of what the key does. If you press the key numbered 5 on the VTlOO keypad, for example, a description of the BACKUP and TOP functions appears on the screen. (BACKUP and TOP are the functions associated with key 5.) At the bottom of each description are directions for seeing the keypad diagram again, reading about other functions, or getting out of help and returning to your editing session. 2. 7 .3 Keypad Functions In keypad character editing the keypad keys have assigned functions which are performed when you press the key. The function is one or more of the nokeypad character editing commands. Most of the keypad keys have a standard and an alternate function. You access the standard function by pressing the key. The GOLD key causes EDT to perform the alternate function on any keypad key; you press and release the GOLD key and then press the desired keypad key. In text, a statement such as "Use the TOP function key" assumes that you use the GOLD key and then the TOP function key. The functions for the keypad keys are shown in Figures 10-1 and 10-2. 2. 7 .4 Inserting Text You can insert text as soon as you start keypad editing. Whatever you type on the keyboard is inserted directly into the buffer. The following paragraph appears on your screen as you type it. The town of Cold, Montana is located on a butte.(Bfil) The averase ann•Jal sno1,,1fall is 175 inches.ffirn Cold has a very active sKi resort and severalm suPPortins businesses: a sKi shoP1 t•,.io(Bfil) restaurantsr and three stores.(BTI) \ [EOBJ __) ~------------------------- The cursor appears after the last character you enter. 2-20 EDT Tasks 2. 7 .5 Moving the Cursor You can use the TOP function to move the cursor to the top of the text: The town of Cold, Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a verY active sKi resort and several suPPortins businesses: a sKi shoPt two restaurants, and three stores. \ ~ [EOBJ ~----------------------r----~ i GOLD ; "'·-----' + (8,c\c-;(LiP-i I \.. _____ TOP .)I $he town of Cold, Montana is located on a butte. fhe averase annual snowfall is 175 inches. Cold has a very active sKi resort and several suPPortinS businesses: a sKi shop, two restaurants, and three stores. "-----[-E-05-J--------------~~------------------.J You can also move the cursor to the bottom of the buffer with the BOTTOM function: lhe town of Coldt Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a verY active sKi resort and several suPPortins businesses: a sKi shop, two restaurants, and three stores. \ ~ [EOBJ ~------------------------r----, ~ GOLD r----:'\ I + 1ADVANCE1 1 I\.!BOTTOM ___ \..-----' ~_) EDT Tasks 2-21 ( The town of Coldt Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a very active ski resort and several suPPortinS businesses: a ski shop, two restaurants, and three stores. "---:t-jE-OB-J---------------------------------------_J The arrow keys on the keyboard let you move the cursor in each of four directions: r-~ UP t I I I I '----' suPPortins businesses: a ski shop, two restaurants, and three stores. :~!-EO_B_J______________~-------------------.J \.____ r-"'\ I I t I I (3 times) '---' ( !uPPortins businesses: a ski shop, two restaurants, and three stores. \..._ [EOBJ ---------------------------~ DOWN ( IUPPortinS businesses: a ski shop, two restaurants, and three stores. ________________________) \..._ [EOBJ 2-22 EDT Tasks r-"" I I I + I I '----' SUPPortins businesses: a ski shoPt two lestaurantst and three stores. "'-----(E_O_B__ J __________________________________ ; r--~ __ I ~ I I \.,. ..)I RIGHT SUPPortinl businesses: a ski shoPt two lestaurantst and three stores. ;:::::: I rrnBi ) ~~----------~------r--, I~ I I __ J I \. (4 times) SUPPortins businesses: a ski shoPt two restlurants, and three stores. :::·:·: "'-----(E_O_B_J-----------------------------------------_) LEFT SUPPortins busjnesses: a ski shop, two restlurants, and three stores. ;:;:;:: I [EOBJ _) ~~---------------------EDT Tasks 2-23 r-""' I I ___, I +- ~ (2 times) suPPortins businesses: a ski shop, two restaurants, and three stores. \ [EOBJ __) ~--------~------------Some keys let you move text by character, word, and line entities. For example, the WORD function key moves the cursor to the next word: ( SUPPortinS businesses: a s ~\i shop, t1. .10 reWtaurants, and three stores. "- [EQBJ ' ~ r----""1 1 WORD t~NGCA~§ ( "- SUPPOrtinS businesses: a s ~\i shop, t1. .10 restaurants, ij'n d three stores. [EOBJ ' _) 2. 7 .6 Marking Text with Select Ranges This section shows how to use the SELECT, CUT, and PASTE functions. When you use the SELECT function, you mark some text for one of several keypad operations. The diagrams in this section show VTlOO select ranges, since the reverse video feature makes select ranges obvious. The VT52 also has the select range function, but it does not have reverse video. The following series of frames shows what happens when you mark a select range and delete the selected text with the CUT function. The text is then reinserted with the PASTE function. 2-24 EDT Tasks 1. Move the cursor to the start of the text that you want to cut. Press the SELECT function key, and then press the WORD function key three times: SUPPortins businesses: a ski shoPt two lestaurantst and three stores. :::::: \ [EOBJ __) ~-----------------------r----" r----~ 1 SELECT I I RESET \..... ____ .)I 1 + WORD I c:. ____ :;J 1CHNGCASEI (3 times) suPPortins businesses: a ski shop, two :::@1:::M~J~!~(f:!:ij:#¥!~WJf~fM~1trn::H.@::~:::~:t::: s t o r e s • \ [EOBJ __) ~~---------------------If you make a mistake with the SELECT function key, press GOLD and the RESET function key, and then try again. 2. Press the CUT function key to delete the text: suPPortins businesses: a ski shop, two :::r::~::~::).;:1:~4,:;~:::i:~t~::i::~a::::::::~~Mi::~tMmrn::~fiFl s t o r e s • [ EDB J \ ~~--------~------------_) ,----""'\ I I CUT PASTE I I '-----.J suPPortins businesses: a ski shoPt two :!:tores. \ [EOBJ _) ~-----------------------EDT Tasks 2-25 The text that you delete with the CUT function is stored in the paste buffer until the next CUT operation. 3. You can reinsert the deleted text with the PASTE function one or more times. To reinsert the text at the original location press the PASTE function key. Move the cursor to a second location and press the PASTE function key. The contents of the paste buffer is inserted at both locations. ( suPPortins businesses: a sKi shoP1 two j:\t ores. [EOBJ '---------------------------~ r----, r----~ 1 I 1 CUT I I ____ GOLD J 1 + I\.... PASTE \.. ____ ..)I ( suPPortins businesses: a sKi shoP1 two restaurants, and three stores. two restaurants1 and three @tores. "'-- [EQBJ ------·-- ________J 2. 7. 7 Deleting Words and Characters You can delete words and characters several ways. For this example, press LEFT arrow function key six times to move the cursor. Then use the DELETE function to delete characters preceding the cursor: To delete whole words that follow the cursor, use the DEL W function: r----"'I I DEL W 1 UNO W ..J1 L ____ :j~t ores. You can reinsert the last word you deleted with UND W: \j\tores. 2-26 EDT Tasks r----'"" DEL W 1 I L~~-~J ,:t!h re e stores • 2. 7 .8 Deleting Lines There are three keypad functions (DELL, DEL EOL, and UND L) that let you delete and undelete lines: 1. The DEL L function lets you delete a line, up to the end of the line plus the line terminator. (In this example, move the cursor to the beginning of the fourth line.) Press the DEL L function key. The text following the deleted line moves next to the cursor. The town of Coldt Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a very active ski resort and several l~PPortins businesses: a ski shoPt two restaurants, three stores. \ CEOBJ _) ~----------------------r-----"' I DELL 1 I UNO L I '------) The town of Coldt Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a very active ski resort and several @estaurantst three stores. \ _J CEOBJ ~------------------------ EDT Tasks 2-27 Undelete the line with UND L: but~ The town of Cold• Montana is located on a The auerase annual snowfall is 175 inches. Cold has a verY active sKi resort and several lestaurants, three stores. \ _J CEOBJ ~~---------------------r----"" I I r-----, I DELL I I\... ____ GOLD .JI + I\... ____ UNO L _)I ( \ The town of Cold, Montana is located on a butte. The auerase annual snowfall is 175 inches. Cold has a very active sKi resort and several j~PPortins businesses: a sKi shop, three restaurants, two stores. CEOBJ ~ ~---------------------------- 2-28 EDT Tasks 2. Delete all or part of a line with DEL EOL (DELete to End Of Line). This deletes all of the text from the cursor to the following RETURN. The text following the deletion remains in its former location. ( \ The town of Cold, Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a very active sKi resort and several luPPortinS businesses: a sKi shoPt two restaurants, three stores. CEOBJ _) ~---------~----------- ( The town of Cold, Montana is located on a butte. The averase annual snowfall is 175 inches. Cold has a verY active sKi resort and several ~estaurants, \ three stores. [EOBJ __) ~----------------------- EDT Tasks 2-29 You can undelete the line with UND L: ( The town of Coldt Montana is located on a butte. The avera~e annual snowfall is 175 inches. Cold has a verY active ski resort and several restaurants, three stores. \ CE OBJ __) ~-----------------------,----, r----, I I 1 DELL I I _GOLD \... _ _ _ _,II ( \ + I\.. _UNO L ..JI ___ The town of Cold, Montana is located on a butte. The avera~e annual snowfall is 175 inches. Cold has a very active ski resort and several j~PPortin~ businesses: a ski shoPt two restaurants, three stores. [ EDB J ~-------------------------------) 2-30 EDT Tasks 2. 7 .9 How to Change Case You can change the case of text by individual characters or by whole strings. Move the cursor to the second letter of the word "Cold," and then change the case of one character at a time: r----, co·~:: j I C:.'·:·:,_·,1 d WORD I I CHNGCASEI I., X• '------' r-----"I COL':,','«.'·.·.·_,_'.: Ir----""'I WORD I I CHNGCASEI \.. _____ :J ~ WORD I CHNGCASE~ \...: ____ ..,., COLD·>:·: l If you mark a select range, everything within the range changes case. Move the cursor to the word "town." Press SELECT, then press the WORD function key four times; this gives you your select range. When you press the GOLD and CHNGCASE function keys, the characters you select change case. r-----"" r----, I • GOLD + I WORD I \.... ____ .) t.9HNG_?~SE) The TOWN OF cold, MONTANI is located on a butte. 2. 7 .10 Exiting Keypad Character Editing There are two ways to exit keypad character editing: 1. Enter tTRL/z), which returns you to line mode editing. You can still type CHANGE after the asterisk prompt, which returns you to KEYPAD editing. The cursor will not have moved. 2. Use the COMMAND function and type EXIT (to save your edits in a file) or QUIT (to exit without saving your edits), followed by ENTER: ,----'""' I \... ____ GOLD I ..) r----"" I PAGE I + ICOMMANDI "----- _.) r----1 I ENTER I Co lrlfYl and: EX IT l-~~~J Either of these commands lets you exit EDT. Chapter 10 gives you more information about editing with keypad functions. It describes not only the basics presented here, but also many different ways of using each function. EDT Tasks 2-31 Chapter 3 Protection Provided by EDT This chapter describes the user-visible protection provided by the editor: the journal file, the consistency check, and error messages. 3.1 The Journal File EDT records your input to the terminal in a journal file and saves the journal file under any of the following conditions: A system failure A user abort An EXIT command with the SAVE qualifier A QUIT command with the SAVE qualifier EDT saves the journal file as filename.JOU, where filename is the output file name. When you do not specify the output file name, EDT uses the input file name by default. You can use the journal file to recover edit operations (your inputs to the terminal). You repeat the command line, adding the RECOVER qualifier. The input file is loaded into the text buffer MAIN, and the journal file is executed by EDT as if it were input from the terminal. You can edit the journal file, with changes or additions, by entering it as the input file in the command line. If you exit normally when you are through editing the journal file, the file is given a version number two above the input file version number. The intervening number is assigned to the journal file created during the editing of the input journal file. (See Chapter 6 for a description of the command line.) 3-1 In the following example, you are instructed to abort the editor during a session. This is not a normal practice and is used here only to demonstrate the operation of EDT when it is ended abnormally. Examples: ( $ EDIT /EDTIB!Jl $_File: ANGLICIZE(Bfil) InPut file does not exist * <Enter text usins EDT and other EDT cororoands.> . ~ $0 I RECTORY(Bfil) Directory _DB1:[YOUR NAMEJ ANGLICIZE.JOU;1 n lines Total of n files. .) "-- $@ When you do not specify an input file in the command line, the operating system prompts for a file. You must enter a file name. When no file with that name exists, EDT responds with the 'input file not found' message. EDT is then ready for you to insert text. Exit the edit session with a ©TRL/Y) to simulate a system failure. You then return to system command level; you can reenter EDT by entering a CONTINUE command. If you enter a system command that requires system execution, such as DIRECTORY, your link to EDT is ended. EDT saves the journal file, and your directory has the entry ANGLICIZE.JOU;l. ( $EDIT/EDT ANGLICIZE/RECDVERIB!il \........ *B ' _) Assume there is an existing file named CHAPTONE.RNO and you have performed a series of edit operations on the file before one of the four conditions for saving the journal file occurred. You now have two files: 1. CHAPTONE.RNO - unchanged by the edit session 2. CHAPTONE.JOU - which is the text you entered at the terminal from the time of the command line entry to the departure from the edit session 3-2 Protection Provided by EDT When you enter the command line, EDT loads the file CHAPTONE.RNO into the main text buffer and executes the file CHAPTONE.JOU as a command file. The result is displayed as it occurs. The last few entries during the preceding editing session may not be in the journal file. ~ $EDIT/EDT CHAPTDNE,JDUQlm "'"'\ ~--*+:________~----------J EDT loads the journal file into the main text buffer. You then edit the journal file. You can change the journal file to make corrections to the input from a previous editing session or to create a new output file. EDT starts a journal file on this edit session; the name for the journal file is CHAPTONE. The version number is one above the version number of the input file. When you exit this editing session, the output file is CHAPTONE and its version number is one above the highest existing version number. 3.2 Consistency Check EDT also maintains a count of all lines and characters entered into the text buffers during an edit session. When you exit the edit session, EDT makes a count of the contents of the text buffers and checks it for consistency with the input. When there is a discrepancy in the consistency check, EDT displays a warning message on exit from the session: ' Consistency check failed, Please check Your files 3.3 Error Messages EDT contains a set of error messages to warn you when something that it cannot accept has occurred. Error messages can be a direct result of your input or a result of operations performed during the edit session. The error messages point to corrective action. Appendix B contains a list of the error messages. Protection Provided by EDT 3-3 Chapter 4 Line Numbers and Range Specifications This chapter describes line numbering and the range specifications used in EDT. 4.1 Line Numbers Line numbers are an editing tool that aid you in the manipulation of text. EDT assigns a number to each line in a text buffer. The numbers range from 0.00001 to 42949.67295. Some of the range specifications in the commands address these line numbers. When you specify an input file, EDT assigns numbers to the lines which result from loading the text buffer with that file. The line numbers are from 1 ton in increments of 1. When n (the number of lines in the file) exceeds 42949, EDT renumbers the contents of the text buffer using decimal numbers. EDT also has the capability to handle fixed line numbers. Fixed line numbers are numbers associated with records in a file; the line numbers are a part of the file. Fixed line numbers are associated with files which have variable length and an additional fixed-length control area. When the input file has fixed line numbers, EDT saves those numbers; this record of line numbers is not visible. EDT assigns the line number 0, in this record, to lines added to a text buffer with fixed line numbers. You can assign fixed numbers to a file through the WRITE command or the EXIT command by using the SEQUENCE qualifier. You can renumber the lines in a text buffer with the RESEQUENCE command. If that text buffer had fixed line numbers, you can still address lines by their original line numbers (see "Single Line Ranges"). 4-1 4.2 Range Specifications Range specifications define the lines upon which EDT commands operate. They specify the lines on which EDT performs the command. Ranges can be single lines or multiple lines. In addition, the multiple line ranges can be contiguous or noncontiguous. Ranges can be specified for text buffers other than the current text buffer. 4.2.1 Single Line Ranges A single line range defines a single line in a text buffer for the command to operate on. The following ranges specify a single line in a text buffer: 4-2 . (period) The current line. The line the cursor is on. number[.decimal] The line specified by the number. 'string' : "string" The next line containing the string you specify. If you do not define the search string (that is, you enter an empty quoted string), EDT uses the last search string. -'string' : -"string" The most recent preceding line containing the string you specify. If you do not define the search string (that is, you enter an empty quoted string), EDT uses the last search string. [range] + [number] The line which is the specified number of lines after the specified range (where range is a single line range and number is an integer). The default range is the current line and the default number is one. [range] - [number] The line which is the specified number of lines before the specified range (where range is a single line range and number is an integer). The default range is the current line and the default number is one. BEGIN The first line in the text buffer. END An empty line following the last line of text in the text buffer. LAST The line position in the most recent text buffer before entering the current text buffer. ORIGINAL number The line numbers assigned to the text in text buffer MAIN from the primary input file, when the primary input file has fixed line numbers. You can locate the text by the original line number even after it has been assigned a new line number. Line Numbers and Range Specifications Examples: In the following examples, typical commands are used to show samples of range specifications. *DELETE • ~ 1 line deleted EDT deletes the current line, the line where the cursor is located, and displays the message "1 line deleted." *TYPE 12.11~ 12.11 This is a deciMallY nuMbered line. EDT types the contents of the line. *TYPE -'PAYROLL'(B@ 129 The payroll records are file 72.a. *''ffi) PaYrolls are Made up weeKlY+ 247 *}' EDT displays the first line preceding the current line that contains the string 'payroll'. The next entry is an implied TYPE (empty string) command. EDT searches forward and displays the next occurrence of the string 'payroll'. *INSERT ++12~ EDT opens the text buffer 12 lines past the cursor location for the insertion of text. *'ABC' + 3IBfil) 27 This line is three lines later. *.L EDT searches forward for the first occurrence of the string 'ABC', counts forward three lines, and displays the line at that position. *FIND *:::::: LAST~ EDT moves the cursor to the line last addressed in the text buffer that was used before the current text buffer. The line is not displayed. *TYPE ORIGINAL 27ffi) 247 This is the line of interest The input file contained fixed line numbers. During the edit session you have added text and resequenced the line numbers and you now want to change a line of text. You know the original line number but not its present line number. You enter the TYPE command with the original range specification and EDT displays the line of interest with its current line number. Line Numbers and Range Specifications 4-3 4.2.2 Contiguous Line Ranges Contiguous line ranges define sets of consecutive lines within the text buffer. Range specifiers for contiguous sets of lines are as follows: [range-1] : [range-2] I [range-1] THRU [range-2] The set of lines from range-1 through range-2. The default for either range entry is the current line. Range-1 and range~2 are any single line range specification. [range] # number I [range] FOR number The specified number of lines beginning with the line specified by range (where range is any single line range specification). The default range is the current line. BEFORE All lines preceding the current line in the current buffer. REST All lines after and including the current line. WHOLE The current text buffer. Examples: In the following examples, typical commands are used to show samples of range specifications. *DELETE 10 THRU 22(8fil) 13 lines deleted EDT deletes lines 10 through 22 from the current text buffer and displays a message indicating how many lines were deleted. The number of lines from 10 through 22 is determined by the number of lines you have inserted and deleted since the line numbers were assigned. *DELETE BEFOREIBfil) 12 lines deleted EDT deletes all of the lines before the cursor position in the current text buffer and displays a message about the number of lines deleted. 4.2.3 Noncontiguous Range Specifiers Noncontiguous range specifiers define multiple lines in a text buffer that are not necessarily adjacent to one another. Range specifiers for noncontiguous ranges are as follows: 4-4 [range, range, ... ] I [range AND range AND ... ] All lines specified by each range; each range must be a single line. [range] All 'string' All lines in the range containing the specified string. If range is not used, the default is the entire text buffer. Line Numbers and Range Specifications Examples: In the following examples, typical commands are used to show samples of range specifications. *MOl,lE 317'10122128 TO GO(Bfil) *(} EDT moves the specified lines to the location just before line 60 and renumbers them for that location. *TYPE ALL 'occurrence'ffim EDT displays all lines in the the current text buffer that contain the string 'occurrence'. 4.2.4 Text Buffer Range Specifications You can specify ranges in a buffer other than the current text buffer. Type the buffer name before the range specification. [= buffer] [range ] : [BUFFER buffer] [range] The default is the current text buffer. When you use a buffer without a range specification (null range), the default is the entire text buffer, and the cursor is placed at the first line in the text buffer. Examples: In the following examples, typical commands are used to show samples of range specifications. *TYPE =MAIN .(8fil) The period in the command is a current line range. EDT enters the text buffer MAIN at the cursor position (current line) when the text buffer was exited and displays the contents of the line at that position. *TYPE BUFFER PASTE ALL 'EDITOR'(8fil) EDT displays all lines in the text buffer PASTE that contain the string 'editor'. Line Numbers and Range Specifications 4-5 Chapter 5 Editor Buffers This chapter describes the two types of buffers contained in EDT: text and other. 5.1 Text Buffers EDT works on text stored in locations called buffers. When you enter EDT, it creates two text buffers: MAIN and PASTE. EDT creates additional text buffers as you call for them. 5.1.1 Main Buffer The name of the main text buffer is MAIN. EDT puts the contents of the input file into the text buffer MAIN. When you exit the editing session, EDT transfers the contents of the main text buffer to the output file. 5.1.2 Paste Buffer The paste text buffer is named PASTE. The paste text buffer is empty at the beginning of each edit session and then stores text from cut and append operations. The contents of the paste text buffer are transferred to the current text buffer for paste operations. You can also use the paste text buffer for other edit operations (as a text buffer). 5.1.3 Additional Text Buffers You can name and use additional text buffers as needed (for retaining parts of other buffers, for including other files). EDT creates the text buffer when you name it. You can give these text buffers any name other than MAIN or PASTE. The name consists of 1 to 30 alphanumeric characters with the first character alphabetic. To call or to name a text buffer, you enter =name or BUFFER name as a part of the range specification (see Chapter 4). 5-1 Examples: *COPY 10 THRU 100 TO =TEMP~ A copy of lines 10 through 100 of the current text buffer is written to a text buffer named TEMP. If TEMP does not exist, EDT creates it. *INCLUDE NEWFILE.TYP BUFFER PASTE~ A copy of the file NEWFILE.TYP is written to the text buffer PASTE. * MOl.JE =HOLD 1 THRU 32 TO BB(BITJ EDT moves lines 1 through 32 of the text buffer HOLD to the location just ahead of line 88 in the current text buffer. There is no restriction on the size of any single text buffer except the restriction placed on the set of all text buffers. The maximum size for the set of all text buffers in EDT is approximately 250,000 lines of 80 characters each. The maxim um size can be limited by the space restrictions on the system device containing EDT's work space. The buffer status is displayed through the SHOW BUFFER command (see Chapter 8). The SHOW BUFFER command displays the name of all the text buffers in use during the edit session, the number of lines they contain, and an equal sign (=) preceding the name of the current text buffer. 5.2 Other Buffers EDT also contains buffers (storage locations) for use by editor commands. The contents of these buffers result from the command operation. These buffers include the following: Line Word Character String search Substitute 5.2.1 Line Buffer The line buffer is a 256-character buffer which is empty at the beginning of each edit session. EDT loads the line buffer with text from character editing commands DL, DEL, DNL, and DBL (see Chapter 9). Loading the buffer erases the previous contents of the buffer. You copy the contents of the line buffer with an undelete line command. When you copy the line buffer, EDT inserts the contents of the line buffer just in front of the cursor position. Copying does not erase the contents of the line buffer. 5-2 Editor Buffers 5.2.2 Word Buffer The word buffer is an 80-character buffer which is empty at the beginning of each edit session. EDT loads the word buffer with the text from character editing commands DW, DEW, DNW, and DBW (see Chapter 9). Loading the buffer erases the previous contents of the buffer. You copy the contents of the word buffer with each undelete word command. When you copy the word buffer, EDT inserts the contents of the word buffer just in front of the cursor position. Copying does not erase the contents of the word buffer. 5.2.3 Character Buffer The character buffer is a one-character buffer which is empty at the beginning of each edit session. EDT loads the character buffer from each character editing command that deletes a character. Loading the buffer erases the previous contents of the buffer. You copy the contents of the character buffer with each undelete character command. When you copy the character buffer, EDT inserts the contents of the character buffer atthe cursor position. Copying does not erase the contents of the character buffer. 5.2.4 String Search Buffer The string search buffer is a 64-character buffer which is used for storing the object of a substitute or a string search operation. The search string buffer is empty at the beginning of each edit session. Loading the buffer erases the previous contents. 5.2.5 Substitute Buffer The substitute buffer is a 64-character buffer which is used for storing the replace string in a substitute command. The substitute buffer is empty at the beginning of each edit session. Loading the buffer erases the previous contents. Editor Buffers 5-3 Chapter 6 The Command Line and Command Files This chapter describes the command line used for starting EDT and the command files for presetting EDT operating parameters. 6.1 EDT Command Line You start EDT through the command line. If you type (BIT) after EDIT/EDT without a file specification, you receive the File: prompt. The format for the EDT command line is: EDIT/EDT [/qualifiers] file-spec [/qualifiers] where: EDIT/EDT specifies the text editor as EDT on VAXNMS. file-spec specifies the file to be created or edited. The file is created if it does not already exist. EDT does not provide default file types. If you do not include a file type, it is null. The file must be a disk file on a files-11 formatted volume. Wild card characters are not allowed in the file specification. /qualifiers specify command qualifiers. Qualifiers may be placed either before or after the file specification. See the VAX/VMS Command Language User's Guide for details on file specification format. 6.2 Command Quallflers The EDT command qualifiers provide the system with additional information on how to handle EDT text during an editing session. Table 6-1 summarizes the qualifiers, which are then described in detail. 6-1 Table 6-1: EDT Command Qualifiers Qualifier Default /[NOJOUTPUT[=file-specl /OUTPUT=file-spec /[NOJCOMMAND[=file-specl /COMMAND=EDTINl.EDT /[N OJJOURN AL[ =file-spec] /JOURNAL /[NOJRECOVER /NO RECOVER /[NOJREAD_ONLY /NOREAD_ONLY /OUTPUT=file-spec /NOOUTPUT The /OUTPUT qualifier defines the file specification of the output file created during the edit session. If you do not specify /OUTPUT, the output file has the same name and file type as the input file and a version number one higher than the highest existing version of the file. /COMMAND [=file-spec] /NOCOMMAND The COMMAND qualifier controls whether or not EDT searches for and executes the named file before prompting you for input. If you do not specify /COMMAND, EDT searches your directory for and executes the contents of file EDTINI.EDT before prompting you for input (see Section 6.3, "Command Files"). If there is no file EDTINI.EDT or you specify /NOCOMMAND, EDT prompts you for input without modifying the default values for the operating parameters. /JOURNAL[file-specl /NOJOURNAL The JOURNAL qualifier controls whether or not the journal file is assigned a name other than the input file's name with extension .JOU. If you specify /NOJOURNAL, EDT does not maintain a journal file for that edit session. (See Chapter 3.) /RECOVER /NO RECOVER The RECOVER qualifier controls whether the editor will execute the journal file created in the previous editing session. The rest of the command line must be the same as it was for the command line that started the editing session when the journal file was created. (See Chapter 3.) 6-2 The Command Line and Command Files /READ_ONLY /NOREAD_ONLY The READ_ONLY qualifier sets the NOOUTPUT and NOJOURNAL qualifier's. With READ_ONL Y, if you attempt to exit the editing session without specifying an output file, an error occurs. Use the READ_ONL Y qualifier when you do not have write access and want to examine the file without editing it. Examples: $ EDIT/EDT TEXT.DAT EDT copies the contents of the input file TEXT.DAT into the main buffer and opens a journal file named TEXT.JOU. EDT assigns the name TEXT.DAT to the output file. $ EDIT/EDT PAYRDLL.FRM/OUTPUT=PAYROLL.JAN/JOURNAL=REC.ONE EDT copies the contents of the file PA YROLL.FRM into the main buffer and opens a journal file named REC.ONE. When you end the edit session with the EXIT command, EDT copies the contents of the main text buffer to the file named PAYROLL.JAN. If the editing session ends in other than a normal exit (such as a system failure), EDT retains the journal file REC.ONE. $ EDIT/EDT PAYROLL.FRM/OUTPUT=PAYROLL.JAN/RECOVER/JOURNAL=REC.ONE EDT copies the contents of the file PA YROLL.FRM into the main buffer and then reads the contents of the journal file REC.ONE (the result of a previous editing session) as a command file. At the end of reading the journal file, EDT is in the same state as when the previous editing session ended. The text buffers contain the input files and you:r; input to the terminal. The journal file contains all of your inputs to the terminal. The journal file continues to add to its contents during the recovery edit session. The editor assigns the name PAYROLL.JAN to the output file. $ EDIT/EDT TEXT.DAT/OUTPUT=TEXTA.DAT/COMMAND=FORMC.DAT EDT copies the contents of the file TEXT .DAT into the main buffer and then reads the contents of the command file. After the contents of the command file is executed, EDT prompts you for input. EDT assigns the name TEXTA.DAT to the output file. 6.3 Command Flies A command file contains instructions that can be read and executed by EDT. The name for the command file is EDTINI with a default filename string of .EDT. The file used may be changed by defining the logical name EDTINI to be the file specification of the desired file. EDT loads the input file into the The Command Line and Command Files 6-3 main buffer and performs the instructions in the command file before prompting you for input. When you do not specify a command file in your command line, the editor searches for the EDTINI.EDT file. If there is no EDTINI.EDT file, EDT is entered directly and you are prompted for input. Examples: TABLEA.COM SET ENTITY PAGE '.PAGE' SET WRAP 8S INCLUDE HEAD1.COM =HEAD1 INCLUDE HEADS.COM =HEADS INCLUDE DATA.FIL =MAIN When you specify the TABLEA.COM file as the command file in the command line, EDT executes the commands in the file and prompts you for input. With this command file, you have set the user-definable entity page to .PAGE and you have set the the right ma~gin for a word wrap of 65 characters. EDT loads the files HEADl.COM and HEAD2.COM into text buffers named HEADl and HEAD2 respectively. EDT loads the file DATA.FIL into the main buffer just ahead of the file loaded into main buffer by the command line. EDTINI.EDT SET WRAP 8S SET MODE CHANGE The EDTINI.EDT file is the default command file, so you do not have to name it in the command line. You have set the right margin for word wrap of 65 characters. EDT places you in the keypad change mode before prompting you for input. 6-4 The Command Line and Command Files Chapter 7 Line Editing Commands The line editing commands operate on a range of lines defined through the range specification (see Chapter 4). You enter line editing commands from the EDT command level, indicated by the * prompt. In character editing, you enter line editing commands through the COMMAND command. The commands in this chapter are listed in alphabetical order. The minimum abbreviation for these commands is shown in boldface type (in the line showing the form of the command). EDT accepts any input from the minimum abbreviation to the complete command word. 7 .1 COPY Command The COPY command copies text within editor text buffers. You copy text from one text buffer to another or from one location to another within a text buffer. The text is not deleted from the original location. (To copy text from an external file, use the INCLUDE command.) The COPY command has the form: COPY range-1 TO [range-2] [/QUERYJ [/DUPLICATE:nl EDT copies the set of lines you specify by range-1 to the location in front of the line specified by range-2. Range-2 is a single line range; the default for range-2 is the current line. Range-2 can be contained in range-1. If the destination (range-2) is not in the current text buffer, you specify the name of the receiving text buffer (=buffer) immediately after TO. You must give the full name of the text buffer. When your source (range-1) is not the current text buffer, you name the source text buffer (=buffer) immediately before range-1. When you use the QUERY qualifier, EDT prompts you for verification of each 7-1 line of the range in the COPY command. The prompt is a question mark(?). You have four valid responses to the QUERY prompt: Y (yes) Copy this line to range-2. N (no) Do not copy this line to range-2. A (all) Copy all remaining lines in range-1 to range-2. Q (quit) Quit the copy operation. Use the DUPLICATE:n qualifier to make n copies of the source text (range-1). The first line of range-2 becomes the first line after completion of the COPY command. Examples: *COPY 15 THRU GO TO 95(BI'i) EDT copies lines 15 through 60 of the current text buffer to the position just before line 95 of the current text buffer. ( *COPY =MAIN TD =TEXT /QUERY(BITJ 1 This is the first line to be copied. ? EDT copies the contents of the text buffer MAIN to the buffer TEXT one line at a time. EDT shows each line to be copied followed by the ? prompt. You must respond with one of the prompt answers before EDT continues. *COPY BEGIN TO 85 /DUPLICATE:8(BITJ EDT copies the first line of the current text buffer and places it just before line 65 of the current text buffer. This operation is repeated 9 times. 7.2 DEFINE MACRO Command The DEFINE MACRO command assigns a name to a sequence of editor commands. The DEFINE command has the form: DEFINE MACRO macro-name The DEFINE MACRO command assigns a name to a text buffer. You can enter the text buffer and insert any number of EDT commands. You end your 7-2 Line Editing Commands entries with a (CTRL/z). The macro-name is a line editing command and becomes a part of the EDT command list for the duration of this editing session. You can define the macro-name to be the same as an existing line editing command, but this results in that command no longer being available. For example, assume that you want to insert a block of text in a number of places in the text buffer. You create the macro containing the text and name the macro INSERT. Now when you enter INSERT as a command, EDT will execute the contents of the macro INSERT. You enter the macro-name in response to the editor command level prompt. EDT makes a search of the EDT command list for every command you enter before it processes the command. When a macro and a command have the same name, EDT redefines the command as the macro. You can have macros address other macros to a depth limited only by the available memory. Examples: ( 10 This is a line in the text b u f f e r . \ *DEFINE MACRO FORM(Btl) *FIND=FORM(Btl) *INSERTOO) SET TAB WRITE(Btl) SET ENT I TY SENTENCE (Btl) SET NOWRAP(Btl) SET NOTRUNCATE(Btl) FI ND LAST+ 100) INSERT; THIS IS A SAMPLE OF THE NEW PROGRAMOO) I ; I ~ *FIND=MAIN.(Btl) *(Btl) 10 This is a line in the text buffer+ _) At line 10 of the current text buffer you determine a need for a macro. The DEFINE MACRO command defines FORM to be a valid EDT command for the duration of this edit session. A text buffer is assigned the name FORM. You transfer EDT to the text buffer FORM with the FIND command and you enter the command string into the text buffer FORM. At the completion of the command entries, you exit the insert mode with a (CTRL/zl. The FIND=MAIN. command returns you to your position in the text buffer prior to the DEFINE MACRO command. Enter a ~ and EDT displays the current line, line 10. When you enter FORM in response to the command level prompt, the commands in the text buffer FORM are executed: The first tab indent is set to 4. The delimiter for the sentence entity is set to ;. Line Editing Commands 7-3 The NOWRAP parameter is set. The NOTRUNCATE parameter is set. EDT locates the last line previous to entering the FORM command and enters the message 'THIS IS A SAMPLE OF THE NEW PROGRAM' on the next line. 7.3 DELETE Command The DELETE command deletes lines of text specified by the range. The DELETE command has the form: DELETE [range] [/QUERY] When you do not specify the range, EDT defaults to the current line. When you delete a range of lines, EDT deletes the lines and displays a message stating the number of lines deleted. The message is followed by a display of the next line in the text buffer. When you use the QUERY qualifier, EDT prompts you for verification of each line of the range in the DELETE command. The prompt is a question mark (?). You have four valid responses to the QUERY prompt: Y (yes) Delete this line. N (no) Do not delete this line. A (all) Delete all remaining lines in the specified range. Q (quit) Quit the delete operation. Examples: 1 (*DELETE!Hill 1 line deleted 21 The line P~ecedins this line was deleted. _) EDT deletes the line at the cursor position and displays the contents of the next line, line 21. 7-4 Line Edi ting Commands (DELETE 251H!il 1 line deleted 28 ' There are no lines between line 25 and 28+ EDT deletes line 25 of the current buffer and displays the contents of the next line, line 26. ~ELETE ~ \: _) BEFDREliirn 10 lines deleted 11 There are no decir,1al 1H1r,1bers in the ranse deleted. ----------~~~----------------- EDT deletes all lines preceding the current line and displays the contents of the current line, line 11. r:ELETE 12 THRU ll2 /QUERY~ 12 This is the first line of the ranse. ? NOO) 13 ? YOO) This is the second line of the ranse. lines deleted 1a This is the third line of the ranse. ? AOO) 28 lines deleted ll3 This line is not in the ranse. ~ _) ----------~~~---------------- EDT displays each line of the range and the ? prompt. You must enter one of the prompt QUERY responses before EDT continues to the next line or exits the delete operation. 7.4 FIND Command The FIND command locates the line specified by range. EDT does not display the line located. The FIND command has the form: FIND range Line Editing Commands 7-5 Range is a single line range. Use the FIND command to move between text buffers. EDT locates the selected range and positions the cursor at the start of that line. EDT then displays the command prompt. Examples: *FIND *:j as~m EDT finds line 45 of the current text buffer. EDT displays the* prompt when the line is found. *FIND =STORE as~ EDT finds line 45 of the text buffer STORE. EDT displays the * prompt when the line is found. 7.5 INCLUDE Command The INCLUDE command copies files into text buffers. Lines added through the INCLUDE command are numbered by EDT to ensure that their position immediately precedes the specified range. The INCLUDE command has the form: INCLUDE file name [range] The file name is the name of the file you want to copy. EDT copies the specified file to the current text buffer immediately in front of the first line of [range]. The transfer does not modify the source file. When the INCLUDE operation is complete, EDT displays the command p:r;ompt. Examples: *INCLUDE TDn. DAT(Bfi) *< EDT copies the contents of the file named TEXT .DAT into the current text buffer just in front of the present line. *INCLUDE TEXT.FIL =TE}<T(Bfi) *> EDT copies the contents of the file named TEXT.FIL into the buffer you have named TEXT. EDT copies the text in front of any text in the text buffer. *INCLUDE FILE.TEN =ELEVEN *f' GO~ EDT copies the contents of the file named FILE. TEN into the text buffer you have named ELEVEN. EDT loads the text into the text buffer ELEVEN just in front of line 60. 7-6 Line Editing Commands 7.6 INSERT Command The INSERT command opens a text buffer for the insertion of lines of text. The lines added through the INSERT command are numbered by EDT to ensure that their position immediately precedes the specified range. The INSERT command has the form: INSERT [range] To exit the INSERT command, enter (CTRL/z). When you use the range qualifier, EDT inserts the text you enter before the first line of the specified range. Range is a single line range. When you do not use the range qualifier, EDT inserts the text you enter just before the current line. When you end the INSERT command with a semicolon, you can use the rest of the command line (until you press ~) to insert text. EDT inserts the text at the specified range and exits the insert operation. When you do not use the semicolon, the insert operation continues until you enter a (CTRL/z). Examples: *INSERT 12(BIT) *{/ EDT opens the current text buffer, just before line 12, for the insertion of text. Enter as many lines of text as you wish. EDT assigns decimal line numbers to all lines entered. EDT remains in the insert mode until you enter a (CTRL/z). *INSERT =TE>(T 30 ;ENTER NEW EMPLOYEE NUMBERSOOJ *:::::::: EDT opens your buffer TEXT, inserts "ENTER NEW EMPLOYEE NUMBERS" just before line 30, and then exits the insert mode of operation. 7.7 MOVE Command The MOVE command moves the lines defined by one range to the location preceding the line specified by another range. The copied lines are numbered by EDT to ensure that their position immediately precedes the specified range. When you use the MOVE command, EDT deletes the original copy of the text. Use the COPY command to copy without deleting the original text. The MOVE command has the form: MOVE [range-11 TO [range-21 /QUERY Range-1 is the text you wish to move. Range-2 is the destination for the text of range-1 and becomes the current line on completion of the move. If you omit either range-1 or range-2, the default for the omitted range is the current line. When the move is· complete, EDT displays a command line prompt. Line Editing Commands 7-7 When you use the QUERY qualifier, EDT prompts you for verification of each line of range-1 in the MOVE command. The prompt is a question mark (?). You have four valid responses to the QUERY prompt: Y (yes) Move this line to range-2. N (no) Do not move this line to range-2. A (all) Move all of the remaining lines in range-1 to range-2. Q (quit) Quit the operation. Examples: *MOt.IE TO GS(IID} *> EDT copies the current line to line 65 of the current buffer and deletes the current line. *MOt,IE =TE}<T WHOLE TO ll7(1W] *:;:; EDT copies the contents of your text buffer TEXT to the position just in front of line 47 of the current text buffer and then deletes the contents of text buffer TEXT. EDT assigns new line numbers to the moved lines. *MOt,IE 2ll THRU 88 TO =MA IN GO(Bill EDT copies lines 24 through 88 of the current text buffer to the point just in front of line 60 in the text buffer MAIN and then deletes those lines in the current buffer. EDT assigns new line numbers to the moved lines. 7.8 Null Command The null command is the implied TYPE command. The null command includes a range specification followed by a IBill. The range specifications REST, WHOLE, BEGIN, END, LAST, and ALL are not allowed in this statement unless they are preceded by a % (see Chapter 4). Examples: * - CRrn The minus sign (-) reverses the direction so that EDT displays the line preceding the current line. ·11-15 THRU GO(RETJ EDT displays each line in the range in sequence. 7-8 Line Editing Commands * 'X,RESTffi) EDT displays the rest of the text in the current text buffer. 7.9 PRINT Command Use the PRINT command to copy text from a text buffer into a file. EDT puts the transferred text into a page printable format. The PRINT command has the form: PRINT file name [range] Use the range to select a portion of the text buffer to be copied to the file in page printable format. When you do not make a range entry, the default is the current text buffer. When the transfer is complete, EDT returns you to your last position in the current text buffer and displays the command level prompt. Examples: EDT copies the contents of the current text buffer to a file named YOUR.FIL. The file is in a page printable format. *PRINT THIS.FIL=TE>n 1 THRU BGffi) EDT copies lines 1 through 86 of your text buffer named TEXT to a file named THIS.FIL. The file is in a page printable format. 7.10 REPLACE Command Use the REPLACE command to delete the lines specified by range and to add new text. When the lines are deleted, EDT displays a message stating the number of lines deleted and then enters insert mode. The text buffer is opened at the first line in the range specification for the insertion of new text. The REPLACE command has the form: REPLACE [range] To exit the REPLACE command, enter (CTRL/z). When you do not specify a range, EDT deletes the current line and opens the text buffer for entering the new text in that location. EDT renumbers the inserted text, using the numbers of the deleted lines. When the text you insert exceeds the line count of the deleted text, EDT assigns decimal line numbers to ensure that the new line numbers do not conflict with line numbers outside the specified range. When there are more deleted lines than inserted lines, the excess line numbers are not used. Line Editing Commands 7-9 To replace the specified range a single line of text, you end the REPLACE command with a semicolon and enter the new text on the same line. When you press IBm to end the line, EDT displays the command line prompt. To return to EDT command level when you do not use the semicolon, you enter a (CTRL/zl. The editor places you at the line following the last line deleted. Examples: ( *REPLACE 3 THRU 12l8If) 10 lines 1jelete1j EDT deletes lines 3 through 12 of the current text buffer and opens the text buffer at line 3 for the insertion of text. When you are through inserting text, enter a (CTRL/Z). (•REPLACE s; Delete and reelace this 10 line.~ This is the line followins the replaced line. *tt -----------~-------------__) EDT deletes line 9 and inserts the text between the semicolon and the tBm as the new line 9. EDT displays the contents of the next line, your present position in the current text buffer. 7.11 RESEQUENCE Command The RESEQUENCE command assigns new line numbers to the contents of a buffer. The RESEQUENCE command has the form: RESEQUENCE [range] [/SEQUENCE [:initial:incrementJ J The lines you specify for resequencing by the range specification must be contiguous. When you do not specify a range, EDT resequences all lines in the current text buffer. When you use the sequence qualifier, EDT sets the first line to the initial value, and increments the succeeding line numbers with the value of increment. When the lines are resequenced, EDT displays the command line prompt. If you do not use the SEQUENCE qualifier, EDT sets the increment to 1, and the initial number is the first line of the specified range. 7-10 Line Editing Commands EDT prevents the assignment of nonsequential or duplicate line numbers. Examples: *'RESEQUENCE 22 THRU ENDfilT) *'!!:? EDT resequences the line numbers of the current buffer starting with line 22. EDT increments the line numbers by a count of 1. *RESEQUENCE =TEHT /SEQUENCE:10:1000') *?f EDT resequences the line numbers of the contents of your buffer named TEXT. The first line number is 10, and EDT increments the line numbers by 10. 7.12 SUBSTITUTE Command The SUBSTITUTE command replaces occurrences of one specified string with another string. A string consists of from 0 to 64 characters. The SUBSTITUTE command has the form: SUBSTITUTE /string-1/string-2 [/range] [/BRIEF[:n]J [/QUERY] [JNOTYPEJ Any nonalphanumeric character, such as slash (/), can be used as a string delimiter, provided the same delimiter is used in all places. However, the delimiter character cannot be contained in string-1 or string-2. When you do not specify a range, EDT replaces the first occurrence in the current line of string-1 in the current line with string-2. When you specify a range, EDT replaces all the occurrences of string-1 within the range with string-2. EDT displays the line after the substitution is made. EDT returns you to the first line in the specified range at the end of the substitution. When you use the BRIEF:n qualifier, EDT displays the first n characters of the lines containing string-1. When you use the QUERY qualifier, EDT precedes each substitution with a question mark (?) prompt. The response qualifiers are: Y (yes) Substitute this string. N (no) Do not substitute this string. A (all) Make all of the remaining substitutions without further queries. Q (quit) Quit the substitution operation. When you use the NOTYPE qualifier, the lines where EDT makes the substitutions are not displayed. Line Editing Commands 7-11 Examples: *SUBSTITUTE /USED/PREDWNED/WHOLE/QUERY(fiUJ EDT searches the current buffer for the word "USED". For each occurrence, EDT prints the line containing "USED", followed by a question mark (?). You read the line to determine the validity of making the substitution. The string delimiter used in this example is the same as the qualifier delimiter. substitutions. ? N 00'.l 46 ·-;> It can be used for a ranse of lines. N 00'.l No sut•stitutions *(RET) _______ This is the current line. ' _) After you respond with one of the four answers to the? (in this case no), EDT continues searching the text buffer for occurrences. If no substitutions are made, EDT places you at the second line of the text buffer. When you respond Y, EDT replaces "USED" with "PREOWNED". If there is more than one occurrence of "USED" in the line, the process is repeated. On each occurrence of "USED" in the line, EDT displays the corrected line and, after the last substitution, the number of substitutions made. After the last substitution is made EDT places you at the second line in the text buffer. r:--~~-,~,:~~~~~ea-rs once .in this s~ *SUBSTITUTE •LIST•TABLE•/BRIEF:20!liET) 20 The word table aPPea 1 substitution Made 21 This is the next line in the buffer. _) ,.~--------- EDT searches the current line for the word "LIST", replaces it with "TABLE" and displays the first 20 characters of the corrected line and the number of substitutions made. EDT then displays the next line in the current buffer and the command line prompt. The string delimiter used differs from the qualifier delimiter. *SUBSTITUTE @SECTION@CHAPTER@WHOLE/QUERY/NOTYPEm'.) 7-12 Line Editing Commands EDT searches. the current buffer for the word "SECTION" and then displays in sequence each line containing the word "SECTION", followed by a question mark (?). When you respond with one of the four QUERY qualifiers, EDT continues. When your response is a Y, the editor replaces "SECTION" with "CHAPTER" and searches for the next occurrence of "SECTION". The string delimiter used differs from the qualifier delimiter. 7.13 SUBSTITUTE NEXT Command The SUBSTITUTE NEXT command replaces the next occurrence of a specified string with another string. The cursor remains at the line where the substitution is made. The SUBSTITUTE NEXT command has the form: [SUBSTITUTE] NEXT [/string-1/string-2/J EDT searches for the next occurrence of string-1 from the current location forward. When EDT makes a substitution, the line in which the substitution is made becomes the current line. If neither string-1 nor string-2 is specified, EDT uses the strings specified by your last SUBSTITUTE command. Examples: Assume that your last substitute command was SUBSTITUTE/NONE/SIX/ You wish to find the next occurrence of the word "NONE" to replace it with "SIX". ( 27 *SU5ST I TUTE 27 *W? This 1 in e contains the 1,.,10 rd none. NEHT~ This line contains the 1,.,1 or d six t ~--------~----------_) EDT searches for the next occurrence of your last SUBSTITUTE command string-1 and replaces it with string-2. EDT replaces the word "NONE" with "SIX" and displays the corrected line. Line Editing Commands 7-13 ( *NEXT/REASON/EMOTION/I!@ Q3 ~ ' This line now contains the word emotion. _) EDT searches for the next occurrence of "REASON" and replaces it with "EMOTION". EDT displays the corrected line. 7.14 TYPE Command The TYPE command displays a specified range of lines. The TYPE command has the form: TYPE [range] [/BRIEF[:nll [/STA YJ The range you select can be a single line or multiple lines. The multiple lines do not have to be contiguous. The first line you specified in the range becomes the current line. When you select the BRIEF qualifier, EDT displays the first n characters of the selected lines. The default for n is 10 characters. When you select the STAY qualifier, EDT does not change the cursor position. Examples: ' There are two lines left in the current buffer. *TYPE RESTOO) There are two lines left in the current buffer. This is the last line. 30 31 [ EDB J c _) -------------~~---------------- EDT displays the remainder of the current text buffer from the current line. The first line displayed is the current line. ( *TYPE 271!@ 27 Line 27 is for disPlay. ii·}) ' ~~--------~----------J EDT displays line 27, the current line. 7-14 Line Editing Commands ( *TYPE 3 ,5 t8 ,9 t24(8fil) This 3 This 5 This 8 This 8 This 24 is is is is is line line line line 1 in e 3. 5. 8• 8. 24. EDT displays lines 3, 5, 6, 9, and 24. Line 3 is the current line. ( *TYPE 28:t1:3(8fil) 28 27 28 28 This This This This is is is is line 28. 1 in e 27. 1 in e 28. 1 in e 28. _) EDT displays lines 26 and the following three lines. r:PE 40: END ALL 41 44 I NEWS I (8fil) This is the first line after 40 containins ne1,.,1s. This is the last line after 40 containins news. -----------~-------------.) EDT displays all lines, beginning with line 40, that contain the string 'NEWS'. ( *TYPE =TEXT 33 'JOURNAL'~ \ Line 33 contains the word Journal. "--*-ff---------------------~ EDT searches your buffer TEXT for the word ''JOURNAL'' and then displays the first line containing "JOURNAL". Line Editing Commands 7-15 ( 32 This is the current 1 in e. *TYPE 1 THRU 15 /STAY~ 1 This is line one. 15 This is line fifteen. ~-*::::_:::------~-----------_) EDT displays lines 1 through 15 of the current text buffer. The cursor remains at line 32. 7.15 WRITE Command The WRITE command copies the defined range of text from a text buffer to the specified file. The WRITE command does not change the contents of the text buffer. The WRITE command has the form: WRITE file name [range] [/SEQUENCE[:initial:increment]] When you specify a range, EDT copies that text to the file. When you do not specify a range, EDT copies the contents of the current text buffer to the file. When you use the SEQUENCE qualifier, EDT writes the line numbers, as defined by initial and increment, as a fixed field in the file. These fixed line numbers are part of the file. The default for line numbers are the fixed line numbers from the input file. Examples: (*WRITE PART.FIL 10 THRU 80l!i@ DB1:CUSERNAMEJPART.FIL;1 81 \... *@ ~INES \ _) EDT transfers a copy of the contents of lines 10 through 90 to the file PART .FIL. When the transfer is complete, EDT displays the complete name of the new file, the number of lines written to the file, and the command prompt. 7-16 Line Editing Commands ( *WRITE NEW.DAT =TEHT1/SEQUENCE: 10: 10IBIT) D51:[USERNAMEJNEW.DAT;1 145 LINES EDT transfers a copy of the text buffer TEXTl to your file NEW .DAT. EDT renumbers the lines (beginning with line 10 and incremented by 10) and places them in a fixed field in the file. When the transfer is complete, EDT displays the complete name of the new file, the number of lines written to the file, and the command prompt. Line Editing Commands 7-17 Chapter 8 Editor Control Commands Editor control commands are commands that control EDT rather than operate on text buffers. The commands in this chapter are listed in alphabetical order. The minimum abbreviation for these commands is shown in boldface type (in the line showing the form of the command). EDT accepts any input from the minimum abbreviation to the complete command word. 8.1 CHANGE Command The CHANGE command places the editor in character editing mode. You select either keypad or nokeypad character editing through the SET command (one of them is always set). EDT defaults to keypad character editing for VT52 and VTlOO terminals and to nokeypad character editing. for all other terminals. The CHANGE command has the form: CHANGE [range] The range specification in the command line is a single line range that defines where the buffer is opened (the line at which the cursor is positioned) upon entry into character editing. To exit character editing mode, you enter (CTRL/Zl in keypad and EX in nokeypad editing. EDT accepts a set of commands for character editing. The full set of character editing commands is available in nokeypad and a portion of the character editing commands are available under keypad. In keypad character editing, you enter the commands through the keypad. In nokeypad character editing, you enter the commands through the keyboard. See Chapter 9 for details on nokeypad character editing and Chapter 10 for details on keypad character editing. Your terminal type controls the visual response you receive during character editing. 8-1 On hardcopy (HCPY) terminals or terminals other than the VT52 or VTlOO, EDT prints the edited line after each ~. On video terminals operating in nokeypad character editing, the subcommands are accepted at the last line on the screen. EDT updates the screen after each ~. For video terminals using keypad character editing, the subcommand operations are immediately visible to the user; the portion of the display modified by the subcommand is updated. For additional detail on terminal responses, see Appendix A. Keypad character editing places a substantially larger demand on system resources than line editing does. For those applications using slow speed input/output devices (300 baud or less), you should use a smaller display window. Use SET LINES to decrease the number of lines in the window, SET CURSOR to limit the cursor movement over a smaller range of lines, and SET SCREEN to limit the length of the lines displayed. Examples: *SET NOKEYPAD(Bfl) *CHANGE(Bfl) EDT is placed in nokeypad character editing mode. For VT52 and VTlOO terminals, the setting of the other SET command parameters controls the screen display presentation. For all other terminals, the display is the line where the cursor is located followed by the character editing command prompt. EDT enters the default character editing mode (keypad for VT52 and VTlOO terminals and nokeypad for other terminals) at line 43 of the current text buffer. 8.2 EXIT Command The EXIT command ends an editing session. EDT transfers the contents of text buffer MAIN to the file you specify. The EXIT command has the form: EXIT [file name] [/SEQUENCE[:initial:increment]] [/SAVE] You define the file name for the contents of the buffer MAIN in either the command line or the EXIT command. When you define the file name in the EXIT command, that name takes precedence. When you use the SEQUENCE qualifier, EDT assigns integer line numbers before the text transfer and places them in a fixed field in the file. These are 8-2 Editor Control Commands fixed line numbers and are a part of the file. You define the starting line number through the initial qualifier and the increment between line numbers through the increment qualifier. The SAVE qualifier saves the journal file. The journal file is file name.JOU, where the file name is specified in the command line on the output file name. For information on the journal file, see Chapter 3. Examples: EDT transfers the contents of the text buffer MAIN to the file you defined in your command line. EDT returns you to system command level. *E>{ IT NAME. NEW I SEQUENCE: 5: 5 I SAIJE(flfil) EDT transfers the contents of the text buffer MAIN, with line numbers, to your file NAME.NEW. The number of the first line in the file is 5 and each of the following lines is incremented by 5. The editor saves the journal file. 8.3 HELP Command The HELP command displays information on requested topics. The HELP command has the following form: HELP topic subtopic A topic or subtopic can have the following format: 1. An alphanumeric string (for example, a command name or a qualifier) 2. The wild card or match-all symbol (*) To obtain a list of the valid topics, enter HELP. The subtopics available on a topic are listed at the end of each topic. Examples: *HELP SUB ST ITU TE NE}H (flfil) EDT displays the HELP text for SUBSTITUTE NEXT command. *HELP CHANGE SUBCOMMAND~ EDT displays the HELP text for CHANGE subcommands. *HELP *(flfil) EDT scrolls through all help text alphabetically. If you enter ~' EDT stops scrolling. Enter @fillQ) to restart scrolling. Editor Control Commands 8-3 When you want help on the keypad commands in keypad character editing, press the HELP function key. To exit the keypad help files, press the space bar or any of the keyboard keys. See Figures 10-1 and 10-2 for keypad layouts. 8.4 QUIT Command The QUIT command ends the current editing session without saving the contents of text buffer MAIN. The QUIT command has the following form: QUIT [/SAVEJ You use the SAVE qualifier to save the journal file. For more information about the journal file, see Chapter 3. Examples: EDT returns you to system command level and saves nothing from the current session. EDT saves the contents of the journal file under the name you defined in the command line. EDT returns you to system command level. 8.5 SET Command The SET command sets editor operating conditions. Once set, these conditions remain in effect until you exit the editor or until you change them through another SET command. The SET command has the following form: SET { [ CASE { UPPER : LOWER : NONE } l [ CURSOR top: bottom l : [ENTITY {WORD : SENTENCE : PARAGRAPH : PAGE} 'string'] : [ KEYPAD : NOKEYPAD l [ LINES number ] : [MODE { LINE : CHANGE } l [ NUMBERS : NONUMBERS l [ QUIET : NOQUIET l [SCREEN width 1 : (Continued on next page) 8-4 Editor Control Commands [ SEARCH { BEGIN : END } l : [ SEARCH { BOUNDED I UNBOUNDED } l [ SEARCH { GENERAL I EXACT } l [TAB n : NOTAB l : [ TERMINAL { HCPY : VT52 : VTlOO } l [TRUNCATE : NOTRUNCATE l [ VERIFY I NOVERIFY l [ WRAP n : NOWRAP l I 8.5.1 SET CASE When you SET CASE (UPPER or LOWER), EDT flags the selected case characters with a preceding apostrophe. The flag is displayed on the terminal, but it is not transferred to the file when you exit EDT. The EDT default for CASE is NONE, which does not flag any characters. The primary use for this qualifier is on terminals with single case. Example: * SET CASE UPPER(BIT) With this command EDT marks all uppercase characters with a preceding apostrophe. The display on a terminal with upper and lower case for the first part of the preceding paragraph is as follows: When >'OU 'S'E'T 'C'A'S'E ( 'U'P'P'E'R or 'L'O'W'E'R) ••• For terminals with single case, the same copy reads as follows: WHEN YOU 'S'E'T 'C'A'S'E < 'U'P'P'E'R OR 'L'O'W'E'R) •• • 8.5.2 SET CURSOR Top:bottom SET CURSOR is applicable to screen terminals and character editing only. The CURSOR top: bottom parameter sets the number of lines over which the cursor moves on the display, where top is the number of lines for the upper limit and bottom is the number of lines for the lower limit. The top and bottom counts start from the top line on the screen, which is number 0. When you reach either limit, EDT scrolls the text so you can access the desired line(s). The allowable limits for top and bottom are 0 through 21. Do not set top greater than bottom. The EDT default for this parameter is top=7 and bottom=14. On initial text entry into a text buffer, you use the lines up to and including the value set for top. Editor Control Commands 8-5 Example: ( \ *SET CURSOR 10:12CF.\m *CHANGEOO) ~-----------~--------~ ( ' th n e 0 ·cine 1 Line 2 Line 3 Line a Line 5 Line G Line 7 Line 8 Line 9 Line 10 This is the top line of the cursor ranse on the screen. Line 11 This line is in the cursor ranse. Line 12 This is the bottoro line of the cursor ranse. _) ----------~~~-----------·---- The 11th line from the top is set as the first line area and the 13th line is the last of the edit area. When you try to move the cursor to a position outside of these lines, EDT scrolls the display up or down until the line is within the cursor range. 8.5.3 SET ENTITY The SET ENTITY command sets the user definable entities for character editing (WORD, SENTENCE, PARAGRAPH, and PAGE). Each of the entities is defined by a string of characters. For the WORD and SENTENCE entities, each character in the defining string can be a delimiter. For the PAGE and PARAGRAPH entities, the entire defining string is the delimiter. The default values for the entity delimiters are: 8-6 or @]) or (ff) or ~ WORD @ SENTENCE . or? or! PARAGRAPH ~ PAGE (ff) Editor Control Commands ~ Example: ( *SET ENTITY WORD ' ''•'II@ *SET ENT I TY SENTENCE I ; I te@ ' \ *CHANGEte@ ~ ~~--------~---------The delimiters for WORD are space or comma. All the commands using word as an entity work up to the delimiter. When the delimiter, space, is on the right, the delimiter is included in the operation. When the delimiter, space, is on the left, the delimiter is excluded from the operation. All other word delimiters are treated as words. When a delete word command is positioned such that the first character to be deleted is a comma, EDT will delete the comma. The delimiter for SENTENCE is semicolon. All commands using a sentence as an entity work up to the delimiter. The semicolon delimiter is useful in some programming languages. 8.5.4 SET KEYPAD When the KEYPAD parameter is set, the keypad controls the character editing operations. When you set the NOKEYPAD parameter, the keyboard controls the character editing operations. The default for this parameter, for VT52 and VTlOO terminals, is KEYPAD (see Chapter 10). 8.5.5 SET LINES Number The SET LINES number command sets the number of lines that EDT displays on your terminal for character editing. The number of lines can be set from 1 to 22. When you are editing at slow baud rates (terminal speeds), you can use this parameter to reduce the number of lines. The default for this parameter is 22. Example: *SET LINES BIBIT) *CHANGEIBIT) EDT displays 8 lines at the top of the screen. 8.5.6 SET MODE The SET MODE parameter is used in the startup command file to control the editing mode which is entered at the end of the initialization process. The SET MODE CHANGE command causes EDT to begin a session in change mode; you do not have to enter the CHANGE command. 8.5.6.1 SET MODE CHANGE - Editor Control Commands 8-7 8.5.6.2 SET MODE LINE - The SET MODE LINE command causes EDT to begin an editing session in line mode; this is the default mode. 8.5.7 SET [NO]NUMBERS The SET NONUMBERS command causes EDT not to display the line numbers. The EDT default for this parameter is NUMBERS, which causes the line numbers to be displayed. 8.5.8 SET [NO]QUIET The SET QUIET command suppresses the ringing of the bell when an error occurs in change mode. The default for this parameter is NOQUIET. 8.5.9 SET SCREEN Width The SET SCREEN width command controls the maximum length of a line EDT displays. In change mode, when you insert more characters than the length set for character editing, EDT displays all overflow characters as one solid rectangle on the VT52 and a diamond on the VTlOO. In line mode EDT may display the overflow characters on succeeding lines. This depends on the terminal type. The default for this parameter is 80 characters. Example: (. $he liMit for a line is ao characters. ~n }' o u e x c e e d t h at liMit the overflow is indicated b}' a+ *SET SCREEN llOtflm "--- *CHANGE!!@ __,) -------~~~~~----------·------- (. lhe liMit for a line is 41) characters+ ~---W_'·h_e_n__Y_o_u_e_x_c_e_e_d~t-h_a_t~l-i_M_i_t_t_h_e~o-v_e_r_f_l_o_w_•_________________,}~ In the first part of the example, SET SCREEN is set to the default of 80 characters and there is no overflow. You then set the maximum number of characters EDT displays on a line to 40. The first line shown in frame 2 does not exceed 40 characters. The diamond indicates that the second line exceeds 40 characters. 8-8 Editor Control Commands 8.5.10 SET SEARCH The SET SEARCH command sets parameters for string searching in character editing. SET SEARCH EXACT The SET SEARCH EXACT command causes EDT to search for exact comparisons of case in the specified string(s). The default for this parameter is GENERAL, which disregards case. 8.5.10.1 The SET SEARCH BOUNDED command causes EDT to stop the search for the specified string at the next page entity marker. The default for this parameter is UNBOUNDED, which searches the en tire buffer. 8.5.10.2 SET SEARCH BOUNDED - 8.5.10.3 SET SEARCH END The SET SEARCH END command causes EDT to leave the cursor at the end of the search string when it is found. The default for this parameter is BEGIN, which leaves the cursor at the beginning of the string. If the string is not found, the cursor position is unchanged. (. *SET SEARCH DCACTIBITJ *SET SEARCH BOUNDEDIBITl *SET SEARCH ENDIBITJ ., ., --------------------------------~~ "----*-T_Y_P_E__ 's_u_B_s_t_i_t_u_t_e_'_:>_: EDT searches the current text buffer, from the current cursor position to the next page marker, for the first occurrence of the string SUBstitute. The first three characters in the string must be uppercase, and the remaining characters must be lowercase. When a string is found, EDT puts the cursor at the character position following the string. 8.5.11 SET TAB N The SET TAB n command sets the number of spaces for the first tab stop in keypad character editing. The remaining tab stops for the terminal are unchanged (multiples of 8 spaces). After you have set the first tab stop with SET TAB, you can increase the first tab stop position by the value of SET TAB with (GOLD/ E). You can decrement the first tab stop by the value of SET TAB with (GOLD/ D). EDT maintains an indentation level count. The count is set to one when you enter the SET TAB command. The indentation level count is incremented by one when you enter ( GOLD/ E) and decremented by one when you enter (GOLD/ D). The first ~ entry for a line is the product of the value of SET TAB and the indentation level count. When the cursor is at position n times the initial SET TAB, you can set the first tab set to that position with (GOLD/ A). Editor Control Commands 8-9 You can adjust the tab setting over a range of lines so that all lines in the selected range are indented. You enter the character editing SELECT function to define the start of the range. You then move the cursor to the end of the range of lines and enter (GOLDI rJpreceded by a GOLD function and a + or - repeat count. The lines between the SELECT function entry and the @Li5/f)function entry are indented to the value of SET TAB times the + or - repeat count. Examples: The first example shows the effect of the SET TAB command on the tab settings. r:.~ th e f i r st I i n e i ro th e t e x t bu f f e r , This is the next line in the text buffer. This is the last 1 in e. @l_L/~ *SET TAB 5(flfil) *CHANGE(flfil) \ __,) '----,,--, __ _________,~--------_,, , ~-::;~-t~-i:e--i~ te~t [AID \___ buffer. ' This is the next line in the text buffer. (@) @ii @ii }fh i s i s th e I as t I i : · . ·-- . ,_ _ _ _ _ _ _ _ _ _ __)_ Entering a (CTRL/z) places EDT in line editing mode. The SET TAB command sets the first tab indent to 5 spaces. The CHANGE command returns EDT to keypad character editing. Move the cursor to the start of the second line, and press @:W. EDT indents the line 5 spaces (the SET TAB value). Move the cursor to the start of the last line, and press @ID three times. EDT indents the line 16 spaces. The cursor is indented 5 spaces for the first tab, 3 spaces for the second tab, and 8 spaces for the third tab. The next example shows the result of incrementing and decrementing the first tab indent by using (GOLD/ e)and (GOLDI D). ~ *SET TAB 12(flfil) ~EOC@ __ --,- ...__. ... 8-10 Editor Control Commands For this exaMPle there are four lines. This is the second line. This is the third line. This is the fourth line. GM! The indent frorTl the left 111arsin is 12 spaces.~ ( GOLD/ E) ~ T h e i n d e n t i s n o 1A1 2 4 s P a c e s • filf) ( GOLD/ D) ~ T h e i n d e n t i s b a c ~{ t o 1 2 s P a c e s • IBIT) With the SET TAB command, set the first tab for keypad character editing to 12 spaces, this sets the indentation level count to 1. Remember the remaining tab settings for a line are the default values, multiples of eight spaces from the left hand margin. Move the cursor to the end of the current text buffer (the empty line preceding [EOB]). Indent the cursor one tab space before entering text. After adding a line to the buffer, press (GOLD/Eland @ID. This increments the indentation level count to 2; the first tab is set to 24 (the SET TAB value times the indentation level count). After adding a line indented 24 spaces, press (GOLD/ D) and @ID. This decrements the indentation level count by one, setting the indentation for the start of the next line to 12 spaces. The next example shows how to indent a selected number of lines by using the SELECT and ( GOLDtTlfunction keys. (See Chapter 10.) ( CTRL/Z) *SET TAB 4IBIT) *CHANGE~ <.SELECT> Hor this exaMPle there are four lines. This is the second line. This is the third line. This is the fourth line. ( GOLD/T) ~------ ( _______________J For this exaMPle there are four lines. This is the second line. This is the third line. This is the fourth line. Editor Control Commands ' 8-11 Using the SET TAB command, set the first tab to 4 spaces and enter the CHANGE command. (The text is from the example above.) EDT displays the contents of the text buffer. Move the cursor to one end of the range of lines you wish to indent, and press the SELECT function key. Move the cursor to the other end of the range, and press ( GOLD/ r l. EDT indents the selected range of lines four spaces; the remainder of the text buffer is unchanged. A CGOQV3Jfollowed by ( GOLDtTlwould shift the selected lines 12 spaces (3 times the SET TAB of 4). The next example shows the use of the (GOLDI Al function key to set the indentation level count and subsequent first tab indents. ( . (Qj]fft) *SET TAB 5~ For this exaMPle there are four lines. This is the second line. This is the third line. This is the fourth line. ( M0 I.I e c u r s 0 r @ID (GOL!>IQ) ~ t 0 2 5 s p a c e s ) ( GOLD/ A) The first tab stop is no1..,1 25 spaces.~ The first tab st o P is no 1. ,1 20 s Paces. ~EOBJ _) Assume that the text buffer contains the four lines of text. The (CTRL/zl places EDT in line editing mode. Using the SET TAB command, set the first tab to 5 spaces (the indentation level count is set to 1), and enter the CHANGE command. Move the cursor to the line following the text, and indent the cursor 25 spaces (a multiple of the SET TAB value). Enter a (GOLDI Al; this sets the first tab to 25 spaces and sets the indentation level count to 5 (25/5=5). You can decrement or increment the tab level counter by pressing the (GOLDI oJand (GOLDI E)function keys respectively (each increment is 5 spaces). 8.5.12 SET TERMINAL The SET TERMINAL command is used to identify the type of terminal in use. EDT gets the terminal type from the operating system. You can override the terminal type with the SET TERMINAL command. You can set the terminal to VTlOO, VT52, or HCPY. 8.5.13 SET [NO]TRUNCATE The SET TRUNCATE command ends the display of a line at the value of SET SCREEN. The default is SET TRUNCATE. When you use 8-12 Editor Control Commands SET NOTRUNCATE, the input text which exceeds the SET SCREEN value is displayed on succeeding lines. You use SET NOTRUNCATE when you want to display lines that exceed the screen width. Example: (. *SET SCREEN ao~ (CHANGE~ line of text is lilTlited to ao chara ·~ ~ *SET NOTRUNCATE~ \...::.CHANGE~ line Of text is not liMited to 40 + haracters. C _) ----------~------------In the first part of the example, the screen display limit is set to 40 characters. The CHANGE command places EDT into character editing. The input line exceeds 40 characters; therefore, EDT truncates the line to the limit set by SET SCREEN. The solid diamond indicates that there are additional characters in the line that EDT does not display. The (CTRL/zl places EDT in command level. Enter SET NOTRUNCATE and the CHANGE command. The input line again exceeds the 40 characters of SET SCREEN, but this time the excess is displayed on the next line. The solid diamond indicates that this line is an overflow from the preceding line. Editor Control Commands 8-13 8.5.14 SET [NO]VERIFY When you use the SET VERIFY command, the commands from command files and macro commands are printed when they are executed. The default for this parameter is NOVERIFY - the command files and the macros are not printed when executed. 8.5.15 SET [NO]WRAP N The SET WRAP n command sets a line length limit of n character positions. This command is used in two ways: 1. When you are inserting text in character editing and the cursor position exceeds the value of n, EDT tries to wrap a full word to the next line. The word that exceeds the limit of n characters is moved to the following line. If there are no spaces in the character string, the line can be any length up to 255 characters. When you insert text in the middle of a line, the line can extend beyond the right hand margin without wrapping. 2. When you use the FILL command, SET WRAP sets the right hand margin for the fill. EDT fills each line in the range to the word delimiter nearest the limit n. The default for this parameter is NOWRAP. Example: ( *SET WRAP ao(Bfil) *CHANGE~ This line contains 40 characters of text This line contains more than ao "----c_h_a-ra_c_t_e_r_s__o_f__ t_e_xt_·_t_/______ ~~~~--------------------...J EDT sets the right margin to 40 characters. The first line of input contains the limit of 40 characters. If you placed a period at the end of the first sentence (after "text"), EDT would write the word "text" and the period on the next line. The next line exceeds the limit of 40 characters within the word "characters," so EDT moves "characters" to start a new line. 8.6 SHOW Command The SHOW command displays selected information on the current state of EDT. 8-14 Editor Control Commands The SHOW command has the following form: SHOW { BUFFER l CASE: CURSOR l ENTITY {WORD l SENTENCE l PAGE l PARAGRAPH} KEY [ { CONTROL letter l [GOLD] n } l : SCREEN l SEARCH l TERMINAL : VERSION} 8.6.1 SHOW BUFFER The SHOW BUFFER command lists the buffers in use during the current edit session and the number of lines of text in each buffer. The main and paste buffers are always displayed under the SHOW BUFFER command even when they are empty. EDT marks the name of the current text buffer with an equal sign (=). If the line count is followed by an asterisk, there are more lines in the input file which have not been read by EDT; thus, the number of lines listed is not always exact. Examples: ( *SHOW BUFFER~ =MAIN 197 LINES PASTE 0 LINES MACRO 2a LINES \ . _ *?! EDT displays the names of all text buffers used in this editing session. MAIN is the current text buffer. 8.6.2 SHOW CASE The SHOW CASE command shows the current case setting (UPPER, LOWER, or NONE). CASE is defined in the SET CASE command. Editor Control Commands 8-15 8.6.3 SHOW CURSOR The SHOW CURSOR command shows the current cursor range. CURSOR is defined in the SET CURSOR command. 8.6.4 SHOW ENTITY The SHOW ENTITY command shows the current setting for the specified entity (WORD, SENTENCE, PARAGRAPH, and PAGE). The entities are defined in the SET ENTITY command. 8.6.5 SHOW KEY The SHOW KEY command (CONTROL letter : [GOLDln) shows the definition of the specified key in change mode. You can change the definition of the key with the DEFINE KEY command. Example: r *SHOW KEY GOLD 3(@) PASTE. The example assumes that EDT is at command level. Enter the SHOW KEY command and the key (the numbers for the keypad keys are shown in Figure 10-3). EDT responds by displaying the current command value for that key. 8.6.6 SHOW SCREEN The SHOW SCREEN command shows the current setting for the maximum length of a line EDT displays. SCREEN is defined in the SET SCREEN command. 8.6.7 SHOW SEARCH The SHOW SEARCH command shows the current search parameters. SEARCH is defined in the SET SEARCH command. 8.6.8 SHOW TERMINAL The SHOW TERMINAL command shows your terminal type (HCPY, VT52, or VTlOO). 8.6.9 SHOW VERSION The SHOW VERSION command shows the version number of EDT. 8-16 Editor Control Commands Chapter 9 Nokeypad Character Editing The character editing commands operate on a range of characters defined within each command entry, either specifically or by default. You enter the commands through the keyboard. You enter nokeypad character editing through the CHANGE command and if you have a VT52 or VTlOO terminal, you must also have used the SET NOKEYPAD command. You enter nokeypad character editing commands after the command prompt. For VT52 and VTlOO terminals, the command prompt is the cursor. The cursor defines your position in the text buffer (the reference point for command entries). When you enter character editing commands, EDT displays your keyboard entries at the bottom of the screen. Press (BIT) to execute the command. When the command sequence is complete, the cursor returns to your position in the text buffer. For a description of the prompt on other terminals, see Appendix A. 9.1 Entities of Text An entity is a definable quantity of text. The character editing commands work on multiples of these entities. Table 9-1 describes the defined entities for the change mode commands. 9-1 Table 9-1: Entities Entity Description C (Character) A C is a single character. The characters include all of the alphabetic, numeric, and special characters on the keyboard. W (Word) A W is a string of characters delimited by one of a set of delimiter characters, including spaces. The default word terminators are spaces, ~, tabs, and ® (form feed). You can define the word delimiters with the SET ENTITY command. Each delimiter other than space is a word. BW (Beginning Of Word) A BW is the string of characters from the cursor position to the beginning of the word. When the cursor is at the beginning of a word, BW is the previous word. EW (End Of Word) An EW is the string of characters from the cursor position to the end of the word. This includes the character at the cursor position. L (Line) An L is a single line of text, where line is a string of characters between line terminators. BL (Beginning Of Line) A BL is the string of characters from the cursor position to the beginning of the line. When the cursor is at the beginning of a line, BL is the previous line. EL (End Of Line) An EL is the string of characters from the cursor position to the end of the line. This includes the character at the cursor position. NL (Next Line) An NL is the string of characters from the cursor position to the beginning of the next line. PAR (Paragraph) A PAR is a user-defined entity. EDT defaults to two successive RETURNs for a paragraph delimiter. You define the paragraph delimiter with the SET ENTITY command. BPAR (Beginning Of Paragraph) A BPAR is the string of characters from the cursor position to the beginning of the paragraph. EPAR (End of Paragraph) An EPAR is the string of characters from the cursor position to the end of the paragraph (not including the paragraph delimiter). This includes the character at the cursor. SEN (Sentence) A SEN is a user-defined entity. EDT defaults to a period (.),a question mark(?), or an exclamation mark(!) for sentence delimiters. You define the sentence delimiters through the SET ENTITY command. BSEN (Beginning Of Sentence) A BSEN is the string of characters from the cursor position to the beginning of the sentence. ESEN (End Of Sentence) An ESEN is the string of characters from the cursor position to the end of the sentence (not including the sentence delimiter). (continued on next page) 9-2 Nokeypad Character Editing Table 9-1: Entities (Cont.) Description Entity PAGE A PAGE is a user-defined entity. The default for a page is the text between two form feed characters (including the second form feed). You define the page delimiters with the SET command. BPAGE (Beginning Of Page) A BPAGE is the text from the cursor position to the beginning of the page. EPAGE (End Of Page) An EPAGE is the text from the cursor position to the end. of the page (not including the page delimiters). BR (Beginning Of Range) A BR is the string of characters to the left of the cursor in the current text buffer. This is equal to a BL command plus all preceding lines. ER (End Of Range) An ER is the string of characters to the right of the cursor in the ·current text buffer. This is equal to an EL command plus all remaining lines. V (Vertical) A V is equivalent to L except that the cursor stays in the same column. 'string' A 'string' is a group of characters within quotation marks. It is used in search operations. When you specify the string entity with the D (delete) or CU1; commands, EDT includes all characters from the cursor to the string. SR (Select Range) An SR is the text between the last SEL (select) command and the cursor position. When select range is not active (no select command entered) and the cursor is at the present search string, SR selects the search string. When neither of the above conditions exists, SR applies to the CHGC (changecase) command. For the CHGC command, SR selects a single character in the current direction. 9.2 Nokeypad Command Structure The command keywords have one and only one form (no abbreviations are allowed). You can put nokeypad character editing commands together in a series; no delimiter is required between the commands but one or more spaces are allowable. The nokeypad character editing commands consist of one or more of the following elements in a specified sequence: Command The command specifies EDT's action. Count The count specifies the number of entities the command acts upon. The count must be from 1 to 32767 decimal. Nokeypad Character Editing 9-3 Direction The minus sign (-) indicates that the action performed by the command is to the left or up from the cursor. The plus sign ( +) indicates the action performed by the command is to the right or down from the cursor. Entity The entity defines the basic element of text (for example, character, word, or paragraph). Buffer The buffer defines a storage location and is used in the CUT, PASTE, and APPEND operations. The sequence in which the nokeypad commands use these elements takes one of the following formats: 1. command 2. [+ : -] [count] command 3. [+ : -1 [repeat-count] command [+ [=buffer] -] [entity-count] [+ -] entity The first are the fixed format commands, which specify EDT's action. You cannot modify the action of these commands. The second are those commands with variable count and direction parameters (or fields). With all but two of the format 2 commands, the direction has no meaning and is ignored by EDT. EDT defaults to a count of 1 in the current direction. The third are those commands which specify an action on an entity (character, word, line, or sentence). These commands have variable count and direction fields. Some commands can operate in a buffer other than the current buffer. The direction sign can be in any of the positions shown. Two counts are allowed; they are multiplied together. You can repeat any string of change mode commands by enclosing the string with parentheses and preceding the parentheses with a count. When a command in the string fails, EDT exits the repeated string. 9.3 Format 1 Commands The format 1 commands follow. 9.3.1 ADV (Advance) The ADV command sets all commands forward (the defined operation is to the right and down from the cursor position) unless you override ADV with a minus sign (- ) . 9.3.2 BACK (Backup) The BACK command sets all commands backward (the defined operation is to the left or up from the cursor position) unless you override BACK with a plus sign ( + ). 9-4 Nokeypad Character Editing 9.3.3 EX (Exit) The EX command exits EDT from the nokeypad character editor change mode back to EDT command level. 9.3.4 EXT (Extended) The EXT command enters line mode commands while EDT is in change mode. EDT accepts the rest of the line (after EXT) as an editor command level command. When EDT completes the specified command, it returns you to change mode. Example: ( :µ\i ne Line Line Line Line Line Line Line Line Line 2 3 4 5 G 7 8 9 is the first line we want to retain. 10 is also to be retained. \__EXT DEL 1 THRU Bffi) _) line 9 is the first line we want to retain+ Line 10 is also to be retained. \_,EXT CO PY= HEADER TO 8ffi) Whis is f roM the text buffer =HEADER. Tine 8 is the first line we want to retain. Line 10 is also to be retained. Nokeypad Character Editing 9-5 EDT deletes all lines in the range from 1 through 8 from the current text buffer. For illustrative purposes it is assumed that the text buffer line numbers match numbers shown in text. EDT then refreshes the screen with the line succeeding the last line deleted at the top of the display. With the second EXT command, EDT copies the contents of text buffer HEADER preceding line 9 and refreshes the screen to display line 9 and one or more of the lines of the inserted text. 9.3.5 I (Insert) The I command opens the current text buffer for the insertion of text. The text is inserted in front of the cursor position. EDT displays the text, at its proper location in the text buffer, as you insert it. To exit from the insert operation, enter a tTRL/z) • Example: (This is line one. This is line two. \ I (B® ~-------------------------- ( This is line one. This is line t1,,io. This line is inserted after line t1..10. ~ ~· ----------------~-------------- In this example the first two lines of the display are shown; the cursor is at the beginning of line 3. To insert text, enter I followed by a IBTil. The I appears at the bottom of the display until you exit the INSERT command. When you wish to exit the insert command, enter tTRL/z) • 9.3.6 QUIT The QUIT command exits from EDT and returns you to the system command level prompt. EDT does not save any files. 9-6 N okeypad Character Editing 9.3. 7 REF (Refresh) The REF command forces EDT to refresh the entire screen. EDT normally refreshes only those portions of the screen changed by the command operations. This command is useful when the screen contains extraneous text, such as when someone sends a message to your terminal while you are using EDT. 9.3.8 SEL (Select) The SEL command is used to select a range of text. SEL marks the present cursor position. To select a range, you enter SEL at one end of the range and then move the cursor to the other end. The select range is the text between the cursor and the position marked by SEL. You can use the SEL range as an entity. Examples: ( @~is is line one. This is line two. This is inserted after line two. This is line three • . \ ~ SELOO) ~~------~~----------- ( 111\\lillilllll. ft er line t1,..10. This is line three. __) The cursor location is the beginning of line one. By entering the SEL command, you set the beginning of line one as the start of your SEL range. The cursor marks the other end of the range; moving the cursor moves the other end of the range. With the cursor between "inserted" and "after", the range is from the start of line one to the beginning of "after". 9.3.9 TAB The TAB command sets the tab position in one of two ways: 1. When you have not set a tab size with SET TAB (see Chapter 8) or when Nokeypad Character Editing 9-7 the cursor is not positioned at the start of a line, the TAB command inserts a tab character at the cursor position. 2. When you have set a tab size with SET TAB and the cursor is positioned at the beginning of a line, the TAB command inserts a number of tab characters and spaces to move the cursor to the column position which is equal to the SET TAB value times the indentation level count. The indentation level count defines the current level of indentation in terms of the tab size. The number of columns to indent is equal to the indentation level count multiplied by the tab size. The counter is set to 1 when you enter a SET TAB value. The counter is incremented by 1 with the TI command and decremented by 1 with the TD command. The counter is set by the TC command also. Example: ( SET TAB llIBrn SET NOKEYPAD(Bfl) CHANGEIBrn ~~!: :: ~:~: ::~: This is line three • . _________________________; TAB~ ( This is line one. This is line two. T h i s i s 1 i n e]Jt h r e e • . TCIBrn TI IBrn ~~-----------------------~ You set the value for the first tab setting to 4 spaces, select nokeypad character editing, and enter the CHANGE command. Entering the TAB command moves the cursor four spaces, to character space 5. If you then move the cursor to a multiple of the SET TAB value plus one character and enter TC, the indentation level count is set to the result of dividing the value for the present cursor position by the SET TAB value (the left margin is position 0). In this example the indentation level count is set to 3. The TI command increments the indentation level count by one to the value 4. 9-8 Nokeypad Character Editing 9.3.10 TC (Tab Compute) The TC command sets the indentation level count to the value obtained from dividing the current cursor column position by the SET TAB number. An error message occurs if the cursor is not at a multiple of the SET TAB number. EDT uses the product of indentation level count and tab size to set the first tab position for each line. Subsequent tab positions on the same line are a multiple of the terminal's tab setting (8 spaces). See the example in TAB above. 9.3.11 TOP The TOP command places the current line at the top of the screen. 9.4 Format 2 Commands (Without Direction) The format 2 commands that don't accept a direction follow. 9.4.1 ASC (ASCII) With the ASC command you enter the decimal number representation (the value 0 through 255 for count) of the desired ASCII character, and EDT displays the character. EDT ignores a minus sign(-) preceding the count. See Appendix C for the ASCII code decimal equivalents. Example: ( This is line one. This is line two. ~-'A_s_c_~_r_____________________________________________} line one. This is line two. <LF ~---------------------_) The cursor location is just after line two. When you enter lOASC and (fl0, EDT enters <LF> at the cursor position. Nokeypad Character Editing 9-9 9.4.2 SHL (Shift Left) The SHL command shifts the screen image to the left. You control the amount of shift through your count entry, where shift equals count times 8 (8 equals one tab stop). EDT does not display the left portion (count times 8) of the text. You use the SHL command to counter the SHR command. See the example in SHR below. 9.4.3 SHR (Shift Right) The SHR command shifts the screen image to the right. You control the amount of shift through your count entry, where shift equals count times 8 (8 equals one tab stop). You use the SHR command to counter the SHL command. Example: ( *SET SCREEN llOIBfil) *CHANGEQITT) The line of text is liMited to QO charact To be able to read that which is beYond,t This is line three~ \ _ llSHLOO') ~ be•ond characters. the limit use the SHL coMMand. QSHR~ __) ~-------~~-----------( The line of text is liMited to QO charact To be able to read that which is beYond t This is line three+ ___________ .) 9-10 Nokeypad Character Editing In the first part of the example, the lines are set to truncate at 40 characters. The first two lines extend beyond the 40 character limit and are truncated. The 4SHL command moves the left margin 32 characters to the right. The remainder of the first two lines can now be read. The third line is less than 32 characters long; none of the third line is visible. The SHR command restores the text to its original position. 9.4.4 TD (Tab Decrement) The TD command decreases the indentation level count. When the indentation level count is zero, the count is not changed. See the example under TAB in the format 1 commands description. 9.4.5 Tl (Tab Increment) The TI command increases the indentation level count. See the example under TAB in the format 1 commands description. 9.4.6 UNDC (Undelete Character) The UNDC command inserts the contents of the character buffer into the current text buffer (just in front of the cursor). The character buffer contains the last character deleted by one of the delete character commands. You can use count to repeat the UNDC operation; EDT inserts the contents of the character buffer into the text buffer count times. 9.4. 7 UNDW (Undelete Word) The UNDW command inserts the contents of the word buffer into the current text buffer (just in front of the cursor). The word buffer contains the last word deleted by one of the delete word commands. You can use count to repeat the UNDW operation; EDT inserts the contents of the word buffer into the text buffer count times. 9.4.8 UNDL (Undelete Line) The UNDL command inserts the contents of the line buffer into the current text buffer (just in front of the cursor). The line buffer contains the last line deleted by one of the delete line commands. You can use count to repeat the UNDL operation; EDT inserts the contents of the line buffer into the text buffer count times. 9.4.9 A (Circumflex) The " enters a control character in your text. You enter the desired control character (A through Z) after the circumflex. 9.5 Format 2 Commands (With Direction) The two format 2 commands that accept a direction with count follow. Nokeypad Character Editing 9-11 9.5.1 S/s1/s2/ (Substitute) The S/sl/s2/ command replaces string sl with string s2. Use count to define the number of substitutions and a minus sign(-) when you want a backward search. Any nonalphanumeric character can be used as a delimiter. The search string (string-1) is stored in the string search buffer; the substitute string is stored in the substitute buffer. 9.5.2 SN (Substitute Next) The SN command uses the sl and s2 defined in the last substitute command (stored in the search string and substitute buffers) to replace the next occurrence of sl with s2. Use count to define the number of substitutions and a minus sign (-) when you want to search backward in the buffer. Example: ( ®his is line one. This is line two. This is line three. "----S-/_l_i_r-1e_/_s_e_n_t_e_n_c_e_/IBm-RE-T----------------------------·------~~ ( \ This is sentence@one. This is line two. This is line three. 2SNIBm ___) ~----------~---------- ( This is sentence one. This is sentence t1...io. This is sentence@three. _) 9-12 Nokeypad Character Editing With the cursor at the start of line one, enter the S/line/sentence/ command and a ~. EDT replaces the string "line" in the first line with the string "sentence". If you then enter the command 2SN, EDT substitutes the next two occurrences of the string "line" with the string "sentence". You can achieve the same result by preceding the S command with a count of 3. 9.6 Format 3 Commands The format 3 commands follow: 9.6.1 APPEND The APPEND command moves the specified entities to another text buffer. EDT deletes the moved text from the current text buffer. Use the =buffer range specification to name the receiving text buffer; EDT defaults to the paste text buffer. EDT appends the specified entities to the end of the contents of the receiving text buffer. See the example in the CUT command description. 9.6.2 CUT The CUT command moves the specified entities to another text buffer. EDT deletes the moved text from the current text buffer. Use the =buffer range specification to name the receiving text buffer; EDT defaults to the paste text buffer. EDT deletes the previous contents of the receiving text buffer. Example: ( \\]:his This This This This "-. is is is is is line line line line line one. t IAI 0 three. four. f i I.I e + t ~ CUT2L=SHOWQifill ----------~~-------------- ( \ ' \J\\'h is is line three. This is line four. This is line f i I.I e + ~ 2APPENDL=SHOWOO) ~------------------------Nokeypad Character Editing 9-13 ( This is line five. "--- PASTE=SHOW~ ~ -----------------------------( This This This This This ;\!l~ is is is is is line line line line line five. one. t1...io. three. f o 1.1 r. _) The CUT command moves the two lines following the cursor to the text buffer you have named SHOW. EDT deletes these two lines from the current text buffer. The 2APPEND command moves the two lines following the cursor position to the text buffer SHOW. These two lines, which are deleted from the current text buffer, are inserted at the end of the present contents of text buffer SHOW. After you move the cursor to the left margin following line five, enter the PASTE= SHOW command. EDT copies the contents of the text buffer SHOW to the present cursor location. 9.6.3 D (Delete) The D command deletes a specified number of entities. Example: ( lhis is line one. This is line two. This is line three • . D2Wrnfl) ~---------------------------J 9-14 Nokeypad Character Editing ( '\\}::in e one • This is line two. This is line three. "---LD_L~-E----------~---------------_) ( line one. is line three. j~is _) Assume the cursor is located at the beginning of line one.To delete the first two words, you enter D2W and ~. EDT deletes the first two words and leaves the cursor at the beginning of the third word. To delete line two, you enter LDL and ~. EDT moves down one line in response to the first Land deletes the line in response to the DL command. The cursor is at the beginning of line three. 9.6.4 FILL The FILL command places the maximum amount of text on each line within the bound set by the SET WRAP command. The text from the succeeding lines are moved up to fill out the line. Text is broken between words; the line is filled to the word delimiter that occurs before the limit of SET WRAP is exceeded. FILL does not fill across blank lines; the lines between blank lines are filled. The default value for the fill line is 80 characters. Example: l~ere is a text buffer that You have Modified throush a series of edits such that the riSht Marsin is rassed over the first four lines. FILL4L~ ~-------------------------__) Nokeypad Character Editing 9-15 There is a text buffer that You ha1.1e 1r1odified throush series of edits such that the risht Marsin is rassed over the first four lines. a The first four lines represent the text buffer after a series of edits. The SET WRAP is set at 64. When you enter FILL4L, EDT fills lines, with up to 64 characters in each line, until the end of the fourth line is reached. 9.6.5 [Null] (Move Cursor) The null command moves the cursor the specified number of entities. You enter the entity, the quantity, the direction, and then press ~. Example: ( lhis is line one. This is line two. This is line thr \...____ ZLl!!!!I ( \ This is line one. This is line t1,.10. $:his is line thr 3W3COO) ' _) ~---------~-----------~ Assume the cursor is located at the first character of line one and that you want to move to the end of the third line. Enter 2L and (Bill; EDT moves the cursor to the start of the third line. Enter 3W3C and (Bill and EDT moves the cursor three words and three characters. The cursor is at the end of line three. You can perform the same sequence with one command string (2L3W3C) or with three command strings (2L, 3W, 3C). EDT executes the commands in the string in the order you entered them. 9-16 Nokeypad Character Editing 9.6.6 PASTE The PASTE command copies the contents of the specified text buffer in front of the cursor location. The contents of the specified buffer is unchanged by the PASTE operation. When you do not specify a text buffer, EDT defaults to the paste text buffer. See the example in the CUT command description. 9.6. 7 R (Replace) The R command replaces deleted text with inserted text. EDT deletes the selected entities and then enters the insert mode. To exit the insert mode, you enter a (CTRL/z) • Example: ( This This :[:his This This is is is is is line one. line t11110. an iMProPer entrY+ also an iMProPer entrY+ line six. _J "----R-2_L_illrn_ET_________________________________________________ ( "- This This @his This This This is is is is is is line line line line line line ' one. t111IO + three.mm four.(Bill five.~ six. . _J Use the R command to replace the third and fourth lines, which are in error, with new text. Move the cursor to the first character position of line three and enter the R2L command. EDT deletes lines three and four and opens the text buffer for the insertion of text. You exit the insert mode with (CTRL/Z) • You can use the replace command on other entities. EDT deletes the selected entities and opens the text buffer for the insertion of text. Nokeypad Character Editing 9-17 9.6.8 TADJ (Tab Adjust) The T ADJ command adjusts the tab level for the selected range of lines. You set the number of lines through the range specification. The tab size and repeat-count set the tab level (see TC). The tab level is adjusted by the value of repeat-count; it is incremented for a plus repeat-count and decremented for a negative repeat-count. The TADJ tab setting is the product of the SET TAB value and the indent level. Example: ( This is the first line of text with a list f o l l = 1 :t:'ter11 a fter11 b It er11 c It er11 d The list of iteMs is coMPlete. t \ ~ TADJllL(fl@ ~~--------~-----------This is the first l~e IteM It e 111 It errl It e 111 list line of text with a list a folio~ b c d of iteMs is coMPlete. \_. _) With the cursor at the beginning of second line, you enter TADJ4L. EDT indents the next four lines to the value of SET TAB. To increase the indent, you use the repeat-count. EDT sets the indent level to the product of repeatcount and the value of SET TAB. 9-18 Nokeypad Character Editing Chapter 10 Keypad Functions in Change Mode This chapter describes keypad editing, which is available when the editor is in change mode. Because a key is not labeled with what it does, this chapter discusses functions rather than keys. A key is found on the keyboard or keypad and is labeled with characters such as "," or "ENTER". By contrast, a function is the operation performed when you press that key. For example, the SUBSTITUTE and ENTER functions are associated with the ENTER function key. The functions in this chapter are grouped by what they do: • Essential functions • Entering commands and functions • Moving the cursor • Changing cursor movement • Deleting and undeleting text • Replacing text • Inserting lines and moving sections • Special characters, changing case, and redefining keys • Keyboard commands • Control character functions 10-1 10.1 The Keypad and Its Functions In change mode you can select from the set of either keypad functions or nokeypad commands. Keypad functions let you perform much the same operations as nokeypad commands, which are described in the preceding chapter. However, there are differences between the two ways of editing: • You can enter nokeypad commands from any terminal. Keypad functions work only on VT52 and VTlOO terminals. • You type most nokeypad commands at the keyboard, whereas you simply press keys for keypad functions. You can start keypad editing in change mode with the CHANGE command. At this level EDT can perform keypad functions or nokeypad commands. VT52 and VTlOO terminals default to keypad editing; other terminals default to nokeypad editing. (You can change this default by using the SET command.) Figure 10-1 shows the VT52 keypad and its corresponding functions; Figure 10-2 shows the keypad and functions of the VTlOO. Notice that most of the keys in Figures 10-1and10-2 have two functions. The upper of the two is the "standard" function, and the lower one is the "alternate" function. You can use either of the two functions, depending on whether or not you press the GOLD key first. Press the key itself to use the standard function of that key. To use the alternate function, press the GOLD key and then that function key. For example, CUT is the standard function of the VTlOO keypad key labeled "6". PASTE is the alternate function of this key. To use the CUT function, you press the CUT function key: r----'"' I CUT I L.!:~T~)--+- CUT operation performed To use the PASTE function, press the GOLD key and then the PASTE function key: r----""' I GOLD ~ + '-----..J r----,I I CUT L~As2:__, --+- PASTE operation performed Throughout this chapter, a statement such as "Use the PASTE function key" assumes that you use the GOLD key and then the PASTE function key. Figure 10-2 shows that there are four arrow keys at the top right of the VTlOO keyboard. These arrow keys let you move the cursor about in the text. In addition, the LINE FEED and BACK SPACE keys have special functions in keypad mode. You can also use several CONTROL functions by pressing the CTRL key ( ( CTRL ) ) and one of several alphabetic character keys. 10-2 Keypad Functions in Change Mode The keys in the diagrams are enclosed by solid lines. Functions are shown with broken lines. The result of a keypad operation is shown with an arrow. For example, if you are told to "press the GOLD function key on the keypad and then the 7 key on the keyboard," the diagram looks like this: ,--GO~~~; + I I '-------' o ___. !he next function y~u use is performed seven times. There are 36 KEYPAD functions that you can perform with the VT52, 38 with the VTlOO. 10.2 Starting and Ending an Editing Session You can use keypad editing only if you have a VT52 or VTlOO terminal. When you enter change mode with these terminals, the default is keypad editing. 10.2.1 Beginning the Editing Session When you type the CHANGE command, you can begin editing with the keypad immediately. If you are editing an existing file, a copy of the file's contents appears on the screen. If you are creating a new file, the screen clears for your input. All entries that you make on the keyboard are entered as text before the cursor. The following describes how to start change mode and enter text. The asterisk (*) shows that you are already using EDT. Type CHANGE after the asterisk prompt: *CHANGE~ The screen becomes blank, since there is no text in the new file. The cursor appears in the upper left of the screen. The message [EOB] shows that you are at the end of the buffer in the new file. What you type appears before the cursor. For example, enter the following text: ( \ Here is an exa1r1Ple~ of ho1,.1 to enter~ text 1,.iith the ~~e}'Pad.~ ~ CEOBJ ~---------~----------10.2.2 What it Means to Save or Delete Edits The edits that you make during an EDT editing session are stored in a text buffer. When you "save" or "delete" edits, you are really saving or deleting the contents of the text buffer. Therefore, when you create a new file, you Keypad Functions in Change Mode 10-3 Figure 10-1: The VT52 Keypad and Its Functions A. The Keypad r-----r-----,-----r-----1 I I I I I I I I I GOLD I I HELP I I DEL L UND L I 1 UP REPLACE I I I I I I I I I I ~-----+------f-----~------~ I I I I f II PAGE I I I COMMAND I 1 I 1 FNDNXT I DEL W 1 DOWN FIND : UND W : SECT I I II I I J------~------~------~-----4 I I I I I I I ADVANCE BOTTOM I I I BACKUP TOP I I I DEL C UND C I I I I RIGHT SPECINS I I I I I ~-----+-----~-----+-----~ I I I I I I WORD I I CHNGCASE I EOL DEL EOL I 1 CUT I LEFT PASTE : APPEND I I 1 I LINE I SELECT I ENTER I OPEN LINE f RESET fl SUBS I I I I I I I I r------·------+-----J------1 I I I B. Keypad Functions l0-4 I L--- - - I I I I I I : I - - - _ _ _ _J _ _ ---..L.-----J Keypad Functions in Change Mode Figure 10-2: The VTlOO Keypad and Its Functions A. The Keypad and the Arrow Keys r- - - - - - r- - - - - - 1-- - - - - T- - - - - I : I I I I I I I UP I I I I I DOWN I LEFT I I I I I I RIGHT I I I ~------~------~------~-----~ r - - - - - 1 - - - - - - T - - - - - - i--- ---, I I I I I : I : I GOLD I I I HELP I J__ ____ l FNDNXT FIND : I I l DELL UND L I I : --1- --- - - _._ --- - - -t- --- -- -1 I I I I PAGE I COMMAND I 1 I I I I I I I I I I SECT FILL I APPEND REPLACE I I I I DEL W UND W I I I I I t-- ----+--- --- -t------t- ---- -~ I I l BACKUP ADVANCE BOTTOM I I TOP I I I I CUT PASTE : I : I DEL C UND C : I I 1 t------+---- -;------+------I I I I I : CHNGCASE I I I ... - - - - 1 I EOL I CHAR I : DEL EOL I SPECINS I I I WORD _ J._ - I I I I I - - - -t - - - - - -t I I B. Keypad Functions I I I ENTER SUBS I I LINE I SELECT I I OPEN LINE I I RESET '1 : L___________ L _____ L ____ ~I Keypad Functions in Change Mode 10-5 decide whether or not to store the text buffer copy as the new file. When you work on a copy of an existing file, you decide whether to incorporate your edits into the file or to delete your work from the editing session. 10.2.3 Saving Your Edits You can save the edits you make during a keypad editing session several ways. One way is to press CfRL/zJ to return to line mode. At this point you type EXIT after the asterisk and press the ENTER function key on the keypad. Another way to save your edits is to press GOLD and then the COMMAND function key. Type EXIT after the prompt and press the ENTER function key: COMMAND: r----, E}< IT I 1 ENTER 1 SUBS I '------' Whether you type EXIT in line mode or after the COMMAND prompt, you save the file with your edits and exit EDT. 10.2.4 Deleting Your Edits You can delete all the edits you make during a keypad editing session two ways. First, you can return to line mode by pressing (CTRL/z) and type QUIT after the asterisk. Second, you can press GOLD and then the COMMAND function key. Type QUIT after the prompt and press the ENTER function key: COMMAND: OU IT r-----, 1 ENTER I I _____ SUBS ..JI \.. Both ways delete all your edits and end your session with EDT. 10.3 Essential Functions These functions are either required for or basic to keypad operations. GOLD The GOLD function causes EDT to perform the alternate (lower) function on any of the keypad keys. Use GOLD by pressing the GOLD function key and then a keypad key. The following example shows how the GOLD function is used in a PASTE 10-6 Keypad Functions in Change Mode operation (to actually perform this operation, you need information described later in this chapter) : r----""\ ____ 1 I I\.... GOLD .)1 r-----, + ! ______ 1 I CUT Contents of paste buffer ..... PASTE ) ' - -... inserted into the text buffer. As shown above, when you press the GOLD key and then the key for the alternate function, the function is performed. GOLD remains in effect until you press one of the other keypad keys. To cancel the effect of GOLD, press the RESET function key. GOLD also lets you execute a function any given number of times. First, press GOLD and enter a number from the keyboard. This number appears at the bottom left of the screen and remains until you complete the operation. Press a keypad key for the function you want .Performed: r----,, I I GOLD I + L----~ GJ ,r-DEL-c-""1 Seven characters + I UND C 1 _ _,..deleted. ~----J If you make a mistake in the middle of this operation, you can edit what you have typed two ways: • To delete the last character typed, press ®· • To delete the entire operation, press (CTRL/u) • Note, however, that the preceding operation is executed when you press the last function key in the operation (DEL C in this example). Neither ® nor (CTRL/ul will undo an operation once it is executed. HELP Pressing the HELP function key causes a picture of keypad functions and CONTROL key descriptions to appear on your screen. When you then press one of the keypad keys, EDT displays a description of the standard and alternate functions of that key. At this point you can: • Return to the keypad diagram by pressing the RETURN key • Get help on another keypad key by pressing the key • Exit from HELP by typing a space When you exit from HELP, you return to keypad editing. The cursor stays in the same location while you use HELP. Keypad Functions in Change Mode 10-7 RESET You can use RESET to cancel the effects of the GOLD and SELECT functions or any key sequence that is partially entered. To use RESET, press GOLD and then the RESET function key. RESET restores the keypad to the way it was before your last command. For example, suppose you enter a sequence of functions and then decide against using it. The following example shows how to cancel the sequence: r----'"\ n r----'"' r----, I~----~ GOLD ~ + ~ + ~ GOLD I + l_~i~~TJ L ____ J , The repeat operation is cancelled by the GOLD and RESET key sequence. Thus, you can use RESET to cancel any operation that has not yet been executed. RESET will not undo an operation once it is performed. 10.4 Inserting Text and Lines You can enter text into the text buffer as soon as you are in the keypad editing part of change mode. 10.4.1 Entering Text Whatever you type on the keyboard when doing keypad editing is inserted directly before the cursor as text. Enter change mode by typing CHANGE after the line mode asterisk prompt and pressing the RETURN key: * CHANGE(iiEi') Then type in text at the keyboard: (This is Line 1.~ This is Line 2. trim This is Line 3. trim .This is Line a • tBfO \__[EOBl 10-8 Keypad Functions in Change Mode __) 10.4.2 Using OPEN LINE You can use OPEN LINE to insert a RETURN after the cursor. The cursor position does not change. If the cursor is at the beginning or end of a line, the effect of this function is to insert a blank line: ( This This This This is is is is Line 1 • Line 2. Line 3. Line a. CEO BJ "------------~------------_) r----'"' 1 r----~ L____ J ( GOLD This This This This I I is is is is + LINE I ~~EN~~~ r----""' GOLD I L_ ____ ) r-----"' I I + + LINE I l':_P!~-=I~~ Line 1 • Line 2. Line 3. Line a. "-------------------------------J CEOBJ Notice that EDT inserts two blank lines after the cursor, one for each OPEN LINE operation. If the cursor is in the middle of a line, EDT moves any text at the right of the cursor down to the beginning of the next line: ( This This This This is is is is Line !Qin e Line Line 1+ 2+ 3+ a' "------------~------------J [ EOB J Keypad Functions in Change Mode 10-9 ( This This Line This This is Line 1 • is 2. is Line 3. is Line a. [EOB J \__ __) -----------~~~----------------- 10.5 Moving the Cursor The functions in this section let you move the cursor and set the direction of cursor movement during your editing session. 10.5.1 The Arrow Keys You can move the cursor up, down, to the left, and to the right with the four arrow keys. These keys are found on the VT52 keypad and on the VTlOO keyboard. r--"' UP ; t I '---J The UP (up arrow) function key moves the cursor to the character in the line above. If the line above does not extend to the present cursor position, EDT places the cursor at the end of the line. The cursor moves to the original character space when successive lines extend that far. For example: ~ This is the lonsest of the three lines. This is a 1 in e. This is a slishtlY lenser line.rm \ _) r--1 I t I I I \.. _ _,I ~ 10-10 This is the lonsest of the three 1 in es. This is a line<:t This is a slishtlY lenser 1 in e. Keypad Functions in Change Mode ' __) r--"' I I\.. __t \ I ..)I This is the lonsest of the threl lines. This is a line. This is a sliShth' lonser line. ~-------------------------~ The following diagrams illustrate cursor movement with the UP function key. The first frame shows the original cursor position, and the second frame shows what happens when you press the UP function key twice: ( This is an examPle of how the arrow KeYs }_'O_'_J_·~-\0-1-Je__t_h_e__c_l_tr_s_o_r_.__________________________________J \_____ le_t__ r--" t I I I I (2 times) \__..) ( This is I~ example of how the arrow KeYs _J "-. ___l_e_t__Y_o_u__m_o_v_e__t_h_e__c_u__r_s_o_r_.________________________________ r-~ DOWN I I \... I __ + I I _) The DOWN (down arrow) function key moves the cursor to the character below. If the line does not extend to the present cursor position, EDT places the cursor at the end of the line. The cursor moves to the original character space when successive lines extend that far. The following diagrams illustrate cursor movement with the DOWN function key. The first frame shows the original cursor position, and the second frame shows what happens when you press the DOWN function key once. Keypad Functions in Change Mode 10-11 ( This is in examPle of how the arrow keYs let )'OU Move the cursor. \ __) ~--------~~--------- r-·-" I i I I I \._,_.J ( This is hoi..1 the let you n exa1t1Ple of rroi..1 ke>'S ove the cursor. \_---------~~------------) r-, LEFT I I I +- I \.. __ J The LEFT {left arrow) function key moves the cursor to the preceding character. When the cursor is on the left margin, EDT moves the cursor after the rightmost character on the line above. The following diagrams illustrate cursor movement with the LEFT function key. The first frame shows the original cursor position, and the second frame shows what happens when you press the LEFT 'unction key four times: ( \ This is an eKaMPle of how the @rrow KeYs let you 111ove the cursor. ' _) ~------------------------r-"' I +- I I \..._.J I 10-12 (4 times) Keypad Functions in Change Mode ( This is an exaMPle of how lhe arrow KeYs let You 1T101Je the cursor. \ ~ ~~·------------------- _ ,---~ RIGHT I I I -+ I \..,, _) The RIGHT (right arrow) function key moves the cursor to the next character. When the cursor is after the rightmost character of the line, EDT moves the cursor to the first character on the next line. The following diagrams illustrate cursor movement with the RIGHT key. The first frame shows the original cursor position, and the second frame shows what happens when you press the RIGHT key three times: ( This is an exaMPle of how lhe arrow KeYs let ~ou Move the cursor. ~ _) ,-"" i ~ -+ (3 times) '---J ( This is an exaMPle of ho1A1 thej\arro1,.1 •\e>'S let You Move the cursor. ~~----------------------~ Keypad Functions in Change Mode 10-13 10.5.2 Setting the Direction of Cursor Movement ADVANCE and BACKUP change the direction in which the cursor moves. The following functions are affected by ADVANCE and BACKUP: CHAR LINE WORD EOL FIND PAGE FNDNXT SECTION CHNGCASE SUBSTITUTE TAB ADJUST ADVANCE ADVANCE sets the cursor direction forward. The cursor direction is toward the end of the text buffer, that is, to the right and down. ADVANCE is the default direction of cursor movement. This default remains in effect until you press BACKUP. BACKUP BACKUP sets the cursor direction backward. The direction of cursor movement is toward the start of the text buffer, that is, to the left and up. When you select BACKUP, it remains in effect until you press the ADVANCE function key. 10.5.3 Movement by Entity You can move the cursor by entity; the direction depends on your advance/backup mode status. CHAR (Character) CHAR moves the cursor one character to the right or left. When necessary, the cursor moves up or down a line to move to the next character. For example: r----" CHAR I I tfo 1.1 e the cursor. L~:.C..!_N!J Mp\1 e the cursor. The CHAR function is available with the VTlOO only. WORD WORD moves the cursor one word forward or one word back. When the cursor is at the end of a line and the direction for the move carries off the end of the line, the cursor moves to the next line. For example: r-----1 I Mp\1 e t h e 10-14 curs or • WORD I L~HN~CAS:_) Keypad Functions in Change Mode EOL (End Of Line) EOL moves the cursor forward to the end of the current line, or backward to the end of the previous line. The cursor movement includes any blank spaces before the last line terminator. For example: r-----"' EOL I Mo 1.1 e #h e c u r s o r • 1 L~.:.:.:>.:J Mo1.1e the cursor LINE LINE moves the cursor down to the start of the next line or up to the start of the previous line (in other words, to the left hand margin). When the editor is in backup mode, the cursor moves to the beginning of the line the cursor is on. When you press the key again, the cursor moves to the beginning of the preceding line. For example: ( Move the cursor.0 ..J ~---------------------------T r }' a n o t h e r l i n e\'. \ Here's }'et another line. r-----""' LINE 1 1 LOP~-~ ~I~':) ( (2 times) Mo1.1e the cursor. TrY another line. "----H-\e--re--'s__}_'e_t__a_r_1o_t_h_e_r__l_i_n_e_._________________________________J_ BACK SPACE BACK SPACE places the cursor at the beginning of the line, that is, at the leftmost character position. For example: Move the cursor BACK SPACE move the cursor. Keypad Functions in Change Mode 10-15 10.5.4 Movement Throughout the Buffer You can move the cursor to the top or bottom of the text buffer, or by sections and pages. PAGE PAGE moves the cursor to the top of the next page. You can define the page delimiter with the SET command. The default delimiter for a page is form feed, an ASCII character that determines the start of each line printer page. (Refer to Appendix C for a list of ASCII character codes.) The direction of cursor movement depends on your advance/backup mode status. SECTION SECTION moves the cursor one 16-line section. The direction depends on your advance/backup mode status. TOP TOP positions the cursor at the top of the text buffer. EDT displays text for as many lines as you set with the SET SCREEN command. (See Chapter 8 for a description of the SET SCREEN command.) If you do not set the number of lines to be displayed on the screen, the default of 22 lines appears. BOTTOM BOTTOM positions the cursor at the bottom of the text buffer. EDT displays text for as many lines as you set with the SET SCREEN command. (See Chapter 8 for a description of the SET SCREEN command.) If you do not set the number of lines to be displayed on the screen, the default of 22 lines appears. 10.6 Finding Text The functions in this section let you locate strings of characters. FIND FIND prompts with "Search for:" on the lower left of your screen. Press GOLD and then the FIND function key to use this function. You enter the desired string through the keyboard and end the string either with an ADVANCE or BACKUP request to set the direction of search, or with ENTER to use the direction currently specified. For example: ,..-----, r----'"" Il ______ GOLD ~ + I FNDNXT I J L_FIND_ ) 10-16 Keypad Functions in Change Mode Search for: After the prompt, enter the text you want to find and set the direction of the search with ADVANCE or BACKUP: Search for: 1,.1ord r-----""" BACKUPI I _____ I\... TOP ,)I The string you enter in response to the FIND prompt is stored in the search string buffer. This buffer is also used for the FNDNXT, SUBSTITUTE, CUT, CHNGCASE, and REPLACE functions. FNDNXT (Find Next) FNDNXT searches for the string that is stored in the search buffer. For example, if the last search string you used in a FIND operation was "word", pressing FNDNXT would cause a search for the next occurrence of "word". You can search forward or backward; the direction depends on your advance/backup mode status. EDT stores the search string in a buffer until you enter a new search string or exit EDT. Examples: You can use FIND and FNDNXT to search for occurrences of the word "the" in the following text: ( U~e the FIND function to locate the first occurrence of the search .J "----s-t_r_i_r-18_•__a_n_d--us_e__F_N_D_N_X_T__ t_h_e_re_a_f_t_e_r_._____________________ When you press GOLD and the FIND function key, you are prompted for a search string: r-----, I r----, I I\... _____ GOLD JI + I FNDNXT 1 l_FIN_D_ J .... Search for: ~ Type "the" and press ADVANCE: Search for: the r----""' I ADVANCEI L~TTOM J Keypad Functions in Change Mode 10-17 The cursor moves forward to the first occurrence of the search string: r \ Use £he FIND function to locate the first occurrence of the search strinst and use FNDNXT thereafter. __} "--------------~----------Pressing the FNDNXT function key moves the cursor to the next occurrence: (FNDNxrl I FIND I "-----J ( Use the FIND function to locate ffihe first occurrence of the search l_ts-e~F-N_D_N_X_'T~-t-h_e_r_e_a_f_t_e_r_.~---------------------_J "------s-t_r_i_n_s_t__a_n_d__ You can repeat the FNDNXT function: ( FNDN°xri 1 FIND L____ ..JI ( Use the FIND function to locate the first occurrence of $he search a_r_1d--u-1s-e~-F-N._D_N_X_T__t_h_e_r_e_a_f_t_e_r_·~--~-----------------_J- "-------s-t_r_i_r-18_t__ If you want to search backward, press the BACKUP function key and then press FNDNXT: 10-18 Keypad Functions in Change Mode ( Use the FIND function to locate ' £he first occurrence of the s~arch a_n_d~us_e__F_N_D_N_X_T__t_h_e-re_a_f_t_e_r_._____________________,} "-. ___,.,s_"'·t_r_i_r-18_t__ 10. 7 Deleting and Reinserting Text These functions let you delete text from a buffer and reinsert deleted text. Each of the functions that delete characters, words, or lines stores these entities in buffers for possible reinsertion. The functions are also useful for moving these entities of text about in the buffer. Deleting and Reinserting by Character 10. 7 .1 DELETE The DELETE key, which is located on the keyboard, lets you delete the character to the immediate left of the cursor. When the cursor is at the leftmost character position on a line, EDT deletes the line terminator to the left and moves the text on the line to the right of the text in the line above. The following is an example of how to delete the characters preceding the cursor: (DEL) 1.-1 or (DEL) 1.-10 '"' (DEL) 1.-1 tt DEL C (Delete Character) DEL C lets you delete the character that the cursor is on and stores it in the character buffer. For example: r----"" DEL C I I ____ I\.... UNO C .,/I UND C (Undelete Character) UND C reinserts the character that was deleted by the last DEL C or DELETE command. You are therefore able to replace a character that you accidentally deleted. For example: r----, :f d 1 '" ____ I :\... GOLD ..) r-----" + _____ I DEL C I I\. UNO C ..)I Keypad Functions in Change Mode 10-19 DEL C and UND C are useful for correcting typographical errors. For example, you can use DEL C to delete a misplaced character: r----., I DEL C I L~~-~J charc:l:ter charc\Ker Move the cursor to the character's proper location and then press GOLD and UNDC: r----"" ch a di(t er I 1\, ____ _ I GOLD .)I r----""'\ ____ I DEL C I + I\.. UNO C _,)I c h a r )i,f c t e r 1O.7 .2 Deleting and Reinserting by Word LINE FEED LINE FEED deletes the characters from the cursor back to the beginning of the word. EDT does not delete the character that the cursor is on. When the cursor is at the first letter in a word, EDT deletes the preceding word and the trailing spaces. The LINE FEED function works as follows: Here is a LINE FEED% (LiNEl ~ Here is a LI NE):: DEL W (Delete Word) DEL W deletes the text up to the first character of the next word. Each DEL W operation clears the contents of the word buffer and inserts a new entry. For example: Delete a @erY larse word. Delete a @arse word. r----~ I DELW I I UNO W I '-------' D e 1 e t e a :$:0 r d • 10-20 Keypad Functions in Change Mode The word buffer now contains the word "large", which replaces the word "very" from the previous DEL W operation. UND W (Undelete Word) UND W inserts the contents of the word buffer in front of the cursor in the current buffer. The word buffer contains the text deleted by the last DEL W (keypad function) or LINE FEED (keyboard command). You are therefore able to replace a word that you accidentally deleted. For example: De 1 e t e a @o r d • r----, r----~ I DEL W 1 I\.. ____ GOLD I + _J L_UN~W J De 1 e t e a \\\~\\a r 8 e DEL W and UND W are especially useful when words are misplaced. You can delete a word, move it to the proper location, and undelete it as follows: 1. Delete the word with DEL W: T h e f i r s t t h r e e a P P 1 i c an t s a r e B a Re r , \An d e r s o n , an d C a r t e r • r----~ I DEL W L_~JN~ I wJ T h e f i r s t t h r e e a P P 1 i c an t s a r e B a ~~ e r , !@n d C a r t e r • 2. Move the cursor where you want to reinsert the deleted word. r--~ I ..-- I (7 times) I \...._,.! I T h e f i r s t t h r e e a P P 1 i c a n t s a r e ]:fa ~~ e r t a n d C a r t e r • 3. Press GOLD and then the UND W function key. r----"" 1 GOLD I I\... _ _ _ _ J I r----~ + I ____ DEL W I I UNO W _)I \.. T h e f i r s t t h r e e a P P 1 i c an t s a r e \A\n d e r s o n , B a ~~ e r , an d Ca r t e r • 10. 7 .3 Deleting and Reinserting by Line CTRL/U CTRL/U deletes the text from the cursor position to the beginning of the line. When the cursor is at the leftmost character position on a line, EDT deletes the line above. EDT loads the deleted text into the line buffer. Keypad Functions in Change Mode 10-21 This sentence is useless. $his sentence is better. lhis sentence is better. DEL EOL (Delete to End Of Line) DEL EOL deletes all the characters to the right of the cursor, up to the end of the line, including the character on which the cursor is positioned. If you are at the end of a line, DEL EOL deletes the next line. The DEL EOL function works as follows: Here is §ne line of text for the exaMPle. ,-----"' _____ I GOLD I I\.. .)I r-----~ + 1 EOL _____ 1 I DEL EOL .)I \.. Here is) text for the exaMPle. DEL L (Delete through end of Line) DELL deletes the text from the cursor position through the next line terminator. The first character of the following line moves up to the cursor. Here is ine line of text for the exaMPle. r----""' DELL 1 1 1 UNO L 1 ~--·--...) Here is @ext for the exaMPle. UND L (Undelete Line) UND L reinserts the text deleted by the last CTRL/U, DEL EOL, DELL, or UND L command. You can therefore replace a line that you accidentally deleted. 10-22 Keypad Functions in Change Mode The following example shows how UND L restores the contents of the buffer after the DEL L function was performed: Here is lext for the exaMPle. ,----"' Ir-----"' GOLD ; + I DEL L I '------) LJJ!iQ..b..J Here is ine line of text for~the exaMPle. 10.8 Selecting and Moving Text This section describes how to use a select range for moving text about in a text buffer. SELECT SELECT lets you mark one end of a string for cutting, appending, or replacing. You mark one end of the string by pressing the SELECT function key. Then you move the cursor to the other end of the string and press the CUT, APPEND, or REPLACE function key. (The search string directly precedes, but does not include, the cursor position.) On a VTlOO you can see what characters are in the range you select because a VTlOO select range appears in reverse video. The following occurs when you press the SELECT function key and move the cursor down two lines: ( Th i s i s :fin e x a lrl P l e of a select ranSet which is in reverse "---vi-de_o·--------~~---------------_} ,----, r--,~ I SELECT I + I i 1.._ R~E!__J ( l ___ J iilln1itl''!'~~!~i~ video. r--, + I I 1 • I I L---' e ~~-----------------------------------~ Keypad Functions in Change Mode 10-23 CUT CUT deletes the selected string from the file and stores it in the paste buffer. This function is especially convenient when you want to delete or move large sections of text. The selected string is all the text between the cursor location when SELECT was pressed and the position the cursor was moved to. The following example shows one of the uses of CUT: 1. Mark the first character to be CUT by pressing the SELECT function key. r----"' I SELECT I L~~:_T_J ( Here Here This T hi s \ is some text. is ®ome text to CUT and PASTE. line stays here. i s t he 1a s t 1 i n e s o f a r • _} '--------------~---------------Then move the cursor with the WORD function key to the end of the string of characters: r-----" WORD I 1 l9.t!~~9~sEJ ( Here He r e This This \ (3 times) is ~ome text. i s :::~::P.M!i:i!i!::::J,!i'.:i@::)))!:rn::§:)] cu T an d PA s TE • line staYs here. is the last line so far. _} ~~--------~----------2. Press the CUT function key. The text disappears from the screen: r----, 1 CUT , L.!AST~j ( \ Here Here This This is some text. is i¢UT and PASTE. line staYs here. is the last line so far. _} '--~--------~---------10-24 Keypad Functions in Change Mode The text you cut stays in the paste buffer until you do another CUT operation or until you end the editing session. In the previous example, the words "some text to" are stored in the paste buffer. If you do a search for some text and then press CUT, the search string is moved into the paste buffer. 1. Press the GOLD key and the FIND function key. r----"'I r FNDNxri i \... ____ GOLD + .) I FIND I "------' 2. Type the search string after the prompt and press ENTER. Search for: CUT and PASTE. r ENTER-") I ____ SUBS .JI \... The cursor moves to the first character in the search string: ( Here Here This This \ ~ is soMe text. is @UT and PASTE. line stays here. is the last line so far. J ------------------~~--------------- 3. When you press CUT, the search string disappears from the screen. r----, 1 CUT i L!AST~j ( Here is soMe text. Here i This line stays here. \._ This is the last line so far. _} ------------~~~----------~ .-. The new search string (CUT and PASTE) replaces whatever was in the paste buffer. Keypad Functions in Change Mode 10-25 PASTE PASTE inserts the contents of the paste buffer in front of the cursor position. If you wanted to cut the first line in the following example and move it down two lines, you would put the first line in a select range with the SELECT and LINE functions. You then press CUT: ( Jile re is a line to CUT and PASTE. Here is soMe text. This line stays here. ~---T~h-i-s--is__t_h_e__l_a_s_t__l_i_r-1e~s-o~f-a_r_.___________________..._...--~__) ( '1!!'~¥1~l!!lf!W!ifii!M!tt~M!~~!!@l!1t111%'l!~! ilti#~J!gj!i aere is SOMe text+ This line staYs here. \...... This is the last line so far, r-----, I CUT I _____ I\.. PASTE .)I ( )ifere is soMe text. This line staYs here. \........ This is the last line so far. 10-26 Keypad Functions in Change Mode _J Then you press the down arrow key twice, and press GOLD and the PASTE function key: ,-"" I 1 I • r----'"' I I (2 times) \. __ .J ( + ~ GOLD I + \.. _ _ _ _ _J r----""' CUT I I ____ 1 \.. PASTE _)I Here is soMe text. This line staYs here. Here is a line to CUT and PASTE. l_i1-1e~s-o~f-a_r_.____________________________J_ "-. ___ :+_:h_i_s__i_s__t_h_e__l_a_s_t__ If you press GOLD and PASTE again, you duplicate the line: r----"" ; GOLD r----1 CUT I I + I•\..____ PASTE ...JI '-----..I ( ~ Here This Here Here \:f his is s 01r1e text. here. is a line to CUT and PASTE. is a line to CUT and PASTE. is the last 1 in e so far. 1 in e sta}'S ' _J· APPEND APPEND deletes the selected string from the current buffer and stores it at the end of the paste buffer. The selected string is the text between the SELECT entry and the cursor position at the time when you press APPEND. For example, assume that you want to append the fourth line to the first two lines in the following example and move all three lines to the end of the text buffer: ( l~re This Here Here This is soMe text. line staYs here. is a line to CUT and PASTE. is a line to CUT and PASTE. is the last line so far. ~-----------------------------J Keypad Functions in Change Mode 10-27 The procedure to append is as follows: 1. Mark the first two lines with a select range: r-"'"\ + ( _ I I I i 1 \,.. _) (2 times) 11111~:11111!.lll·i~ll~~l·llllli:ll!~t.~ll~ll~l:~.l··l~:,!!]t Here is a line to CUT and PASTE. Here is a line to CUT and PASTE. This is the last line so far. \ __} ~~---------~~---------2. Put the contents of the select range into a paste buffer by pressing the CUT function key: r----"' 1 I CUT PASTE I I "-----J ( H'ere is a line to CUT and PASTE, ' Here is a line to CUT and PASTE. i_s~t-h-e~l-a-s~t~l-i_r_.e~s-o~f-a_r_.___________________________~__,} \..____T_h_i_s__ 3. Move the cursor to the line that you want to append: r-"'I I I I\_ _ • _JI ( \ Here is a line to CUT and PASTE. Here is a line to CUT and PASTE. This is the last line so far. ~----------~---------J 10-28 Keypad Functions in Change Mode 4. Put the line to be appended in a select range: r-----, r----~ I SELECT ; + L~ESET_.J ( 1 L~~~~IN~ Here is a line to CUT and PASTE. Jij:tr~:t::fuour:emtJ ' This is the last line so far. __) :10.une:2iw~ \ LINE I Jij:::t:iawtJFM@:r:::o.:um ~---------~----------Now press the APPEND function key. The line disappears from the screen and is stored in a buffer. The text now reads: ( B~re is a line to CUT and PASTE. This is the last line so far. \ ' ___) ~~--------------------- 5. Move the cursor to the end of the file and press the GOLD and PASTE function keys: r----, ____ ~\.. GOLD _)' ( ~ Here This Here This Here r-----, CUT I I + 1\. _____ PASTE .JI is a line to CUT and PASTE. is the last line so far. is S Oltle text. line sta>'s here. is a line to CUT and PASTE. !(!!. ' _) Keypad Functions in Change Mode 10-29 10.9 Replacing and Substituting Text The following two functions, REPLACE and SUBS, are similar. REPLACE REPLACE deletes the text that you put in a select range and replaces it with the contents of the paste buffer. The following example shows how to replace the word "brown" with the words "red and white" in the following sentence: The quick brown fox JuMPed over the lazy dos. The steps are as follows: 1. Press the SELECT function key and type the words "red and white ": jsELEcrj ____ I RESET ..)1 \... 2. Press CUT to store the phrase in a buffer: r----'"'\ I CUT I Il_ ____ PASTE .)I lhe quick brown fox JuMPed over the lazy dos. 3. Move the cursor to the word you want to replace and put this word in a select range: r-----, WORD 1 1 1 (2 times) 1 ~H~E~~':J + ("seLecTi ____ \... I RESET ..)1 + The quidt #MMU#Uox Ju1T1Ped over the laZ}' dos. 4. Press GOLD and the REPLACE function key. The sentence shows the change you made: r-----"'\ : \.. _____ I GOLD .} + The quick jed and white fox JuMPed over the lazy dos. 10-30 Keypad Functions in Change Mode You can also use the FIND function in REPLACE operations. In the following example, the word "silver" replaces the strings "red and white" and "lazy". 1. Press the SELECT key and enter some text: ( SELEcTi L~ESET_j \m!!!~U!]!(Ht!@!h e q u i c k r e d an d 1,.1 h i t e f ox j u !Tl Pe d o '·' e r t h e 1 a z }' do s • 2. Press CUT to place the text in a buffer: r-----, ____ I CUT 1 I PASTE ....)I \.. filhe quick red and white fox juMPed over the lazy dos. 3. Use FIND to locate the text you want to replace: r-----"' r----~ ____ + : GOLD : \... ....) I FNDNXT I I\... FIND ..)I _____ The FIND function causes a prompt to appear on your screen: (AoVANcEi red and 1,.1 h i t e L~OT20~ search f o r : The sentence reads: The quick ied and white fox juMPed over the lazy dos. 4. Press the GOLD key and the REPLACE function key to replace the phrase "red and white" with the contents of the PASTE buffer: r----'""1 r----~ 1 t ____ GOLD ...J1 L + I APPEND I I\:.REPLACE ____ J I The quick silver@fox juMPed over the lazy dos. You can repeat the last two steps if you want to replace another word with the contents of the PASTE buffer. Use FIND to locate the word "lazy" and press GOLD and REPLACE again. The result is as follows: The quick silver fox juMPed over the silver@dos. Keypad Functions in Change Mode 10-31 SUBS SUBS lets you find a string of characters and replace it with the contents of the paste buffer. SUBS works like the REPLACE function, except that the SUBS function automatically includes a "find next" operation. The next example shows how to change several times the phrase "a privileged user" to "the operator" in the following frame: ( (Text froM the Precedins ParasraP~···> To accoroPlish this, a Privilesed user or sYstem manaser coPies the files. (If a Privilesed user does so, the sYsteM roanaser should be informed.) The main advantase of beins a Privilesed user is this easy access to roost files on the system. ~---------~---------J To make this change, place the new phrase in a paste buffer, find the existing phrase, and substitute it throughout the paragraph. The steps are as follows: 1. Press the SELECT function key and type the words "the operator". This puts the words you type in a SELECT range. r-sELECT°" I I I _____ RESET .JI \. ( <Text from the Precedins ParasraPh ••• > :::1n1::~tI]~:::~:,:::~::1::M:~:::~::: To accoMPlish this, a Privilesed user or system 1T1anaser coPies the files. (If a Privilesed user... \ ~ ~~-------·-------------2. Press the CUT function key to store the words in a PASTE buffer. The words disappear from the screen. (The words are removed from their location in the file to the PASTE buffer.) r----°' CUT I 1 ____ I\._ PASTE _)1 10-32 Keypad Functions in Change Mode <Text froM the Precedins ParasraPh ••• ) To accoMPlish thist a PrivileSed user or sYsteM Manaser copies the files. <If a Privilesed user ••• 3. Move the cursor to the first occurrence of the phrase "a privileged user" with the FIND function. You must use FIND (which places the phrase in a search buffer) in order for subsequent SUBS operations to work. ( To accoMPlish this• J~. Privile~ed ManaSer copies the files. user or sYst•M ' <If a PrivileSed user ••• ~~---------------------J When you press GOLD and SUBS, the change is made and the cursor moves to the next occurrence of the phrase: r----., i ENTER-i l\... ____ GOLD l + L_s~~s_J .) ( To accoMPlish thist lhe oPerator or sYsteM Manaser coPies the file. <If a Privilesed user does sot the sYsteM Manaser should be inforMed.) ~------------------------) 4. Continue to substitute the phrase throughout the paragraph by pressing SUBS. If you want to skip an occurrence of the phrase, press FNDNXT instead of SUBS. 10.1 O Entering Commands ENTER ENTER lets you enter commands and do searches when you use the FIND and COMMAND functions. Keypad Functions in Change Mode 10-33 For example, you press GOLD and the FIND function key to prompt for a search string: r----""'\ r----""\ I I FNDNXT I I..._ _FIND _ _ _ _JI GOLD I + I _ _ _ _ _JI \.. Se arch f o r : When you type a string of characters, pressing ENTER saves the string and causes a search for it: r----"""\ Search for: 1,.1ord ____ ENTER I I\.. SUBS _)1 I When you press the COMMAND function key and type in a command, pressing ENTER executes the command. COMMAND COMMAND lets you enter EDT command level and line editing commands. Press the COMMAND function key and type in these commands at the keyboard. To execute the commands, press the ENTER function key. For example: 1. Press the GOLD key and then the COMMAND function key. The COMMAND prompt appears at the bottom of the screen. r----~ I r-----~ PAGE I IL -GOLD I + COMMAND I ---.J \.: ___ .__ J 1 I COMMAND: 2. Type a command level command, which appears after the prompt: COMMAND: SET NOTRUNCATE 3. Press the ENTER function key to execute the command. Upon completion of a line editing command, the screen is updated as required and you return to keypad editing. If you enter a command such as EXIT or QUIT and press the ENTER function key, you end the EDT editing session. 10.11 Special Characters, Changing Case, and Filling Lines These functions let you insert special characters, change characters to uppercase or lowercase, and perform a FILL operation on a section of text. SPECINS SPECINS lets you insert non-printing ASCII characters into your text. (See Appendix C for a list of ASCII character code decimal equivalents.) Press the GOLD key, enter the decimal representation of the ASCII character at the keyboard, and then press the SPECINS key. 10-34 Keypad Functions in Change Mode For example, suppose you wanted to insert a line feed character into the file. You would use the following procedure: 1. Press the GOLD key and type the ASCII numeric equivalent of the char- acter. Line feed is ASCII 10. 2. Press the GOLD key and then the SPECINS function key. SPECINS is the only way to insert a carriage return character without having it interpreted as a line terminator. CHNGCASE CHNGCASE lets you change uppercase alphabetic characters to lowercase, and the reverse. Press the GOLD key and the CHNGCASE function key to change the case of the character the cursor is on: ,. ---'I + r------, l WORD I I -CAiSE I '- G~~--J lC~~~~~S~) Note that the cursor moves one character to the right when you perform a CHNGCASE operation. This happens when the editing status is ADVANCE, which is the default. If EDT is in backup mode, the cursor moves one character to the left. You can also change the case of text in a select range or a search string. If you press CHNGCASE when the cursor is on a search string or select range, the case of all these characters is changed: r------, I WORD I r-----...I 1 I GOLD I '------" + l9_ti~~~S_E) Here is IN EXAMPLE OF chanSinS case. FILL FILL fills the selected range of lines to the limit of the line width. This function exists on the VTlOO as a keypad key and as CTRL/F on the VT52. For example, you may want to limit the width of a section of text to 20 characters. The FILL function allows the maximum number of characters on a line without breaking words: 1. Press the GOLD key and the COMMAND function key. 2. Type "SET WRAP 20" after the command prompt to limit the width of the text in the select range. Then press the ENTER function key. Keypad Functions in Change Mode 10-35 3. SELECT the range of lines that should not exceed 20 characters in length. Use the SELECT function key and move the cursor to the end of the range of lines: ( 4. Now press the GOLD key and the FILL function key: ( Here is soMe text across the Pase. This text will be no 111ore than t1,.1ent)' characters 1,.iide. See ho1....i the FILL function •...iodts? lere, asain, is the resular Pase width. \.--- 20 characters--.} 10.12 Control Character Functions To use the control character functions, hold down the CTRL key while you press the alphabetic character key. CTRL/C CTRL/C ends the current operation and returns you to the keypad command level. CTRL/U CTRL/U deletes the text from the cursor position to the beginning of the line. When the cursor is at the leftmost character position on a line, EDT deletes the line above. EDT loads the deleted text into the line buffer. CTRL/W CTRL/W refreshes the screen display. The screen becomes blank and then the characters in the buffer r~appear. Refreshing the screen deletes extraneous characters, such as from system messages or electronic mail, that might appear on the screen during your editing session. CTRL/Z CTRL/Z .returns you to the line mode prompt (*). 10-36 Keypad Functions in Change Mode CTRL/A CTRL/A sets the tab position to the present cursor position. If the present cursor position is not a multiple of the SET TAB number, an error message occurs. CTRL/E CTRL/E increases the TAB level one count, where the count is set by the SET TAB command. CTRL/D CTRL/D decreases the TAB level one count, where the count is set by the SET TAB command. CTRL/T CTRL/T performs a TAB ADJUST operation on a select range. The characters in the select range move one tab stop t<;> the right, unless you use a minus (-) character to move the select range one tab stop to the left. You can also use a repeat count for this function by pressing GOLD and a number from the keyboard before pressing the CTRL/T. NOTE You can also use the GOLD key on the keypad, instead of the CONTROL key on the keyboard, for the following functions: CTRL/A CTRL/D CTRL/Z CTRL/T CTRL/E CTRL/U CTRL/W For more information on these keys, see the description of the SET TAB command in Chapter 8. CTRL/K CTRL/K lets you use the DEFINE KEY function. You can assign new functions to any of the keypad keys (except GOLD) and to all of the CONTROL keys, except CTRL/C, CTRL/Y, CTRL/Z, and CTRL/K itself. See the following description of DEFINE KEY for more information. 10.13 DEFINE KEY Command The DEFINE KEY command assigns functions to the keypad keys and the control keys. You can redefine the value for all keypad keys (except GOLD) and most control keys, and you can define new control keys. During keypad character editing, use the CTRL/K function to define keys. Keypad Functions in Change Mode 10-37 The DEFINE KEY command for the command level has the form: DEFINE KEY {CTRL/x: lGOLDJn} AS 'string' where: CTRL/x refers to any CONTROL key combination, such as (CTRL/s) or (CTRL/U) • GOLD refers to the GOLD keypad key, which lets you access the alternate functions of the keypad keys. n refers to the number of the selected keypad key. See Figure 10-3. To define the standard (non-GOLD) function for a keypad key, enter the key number. To define the alternate function for a keypad key, press GOLD and the key number. Each of the keypad keys and CTRL keys has a string of characters associated with it which define the function of the key. The string consists of nokeypad character editing commands. When you define keys with the DEFINE KEY command, the same rules apply as for nokeypad command strings: 1. A string can contain multiple commands. 2. A string ending in a period is executed immediately when you press the key associated with that string. 3. If a string does not end in a period, EDT buffers it (holds it for execution) until you enter a command that does end in a period. 4. You can precede a string with a question mark; the? prompts the user for input. Examples: *DEFINE KEY 7 AS *CHANGEIBf[) +D~ This example uses the DEFINE KEY command to define a string without an ending period. You define the standard function for keypad key 7 as delete (keypad key 7=<D>); you provide the entity to be deleted through additional key entries. EDT buffers the D function until you press a key with a definition ending in a period, such as a function key. 10-38 Keypad Functions in Change Mode Figure 10-3: Keypad Numbers r-----r-----1-----r-----, I I I I I I I 1 I GOLD 1 I I I I I I I 10 1 I 11 I I I I I 12 I I I ~-----+------i-----~------~ I I I I : 7 1 : I I 8 I I 9 : l 13 : : I I I I i------~------4------~-----~ I I I I : 4 I I 1 I I I 5 I 6 I ~-- -- -l-- -- -~ -- -- I I 1 I I I 2 I I I 1 I 3 I 1 : -+-- -- --1 I I I I 1 1 I I I I I I I I I I 14 : 15 I I I r- -----..L.--- ---+--- - -t--- ---1 0 I I A. r-- - - - - VT52 Keypad -r---- - - , - - - - - -T- - - - --, : I I I I I I I I I I I I 12 1 1 13 : 15 I I I 14 I ~------1------~------L-----~ I I I L - - - - -· - - - - - - _.J_ - 16 I I I I I 21 1 I ---..+------ J I r - --- - 1 - - - - - - T - - - - - - 1-- - ---, I I I I : I I I GOLD I : 1Q I I I 11 I I I 17 I I I I I I I I I I I I I I I I I l-- - - - - -1- - -- - - . . - - -- - - -t- -- - - - - -t : J I I 7 I I I I I I I I 8 9 18 I 1 I I I t-- --- -+--- --- - t------t- ---- --1 I I I 4 I 1 I I 5 I I I I 6 I I I I I I 19 I I I I I I------+- --- --f-- - - - -+- -- - -~ I I ! I ' I 1 I I I I 2 3 I I I I I I ' I I I r-----L-----t-----i I I l B. VT100 Keypad 0 I I I : 16 I I 21 I I I I : L___________ L _____ L ____ I I Keypad Functions in Change Mode ~ 10-39 ( This This This is is is ' \J.h n e one. line line tttJO • three. _) \___ ( This This This is Q/1e. is line is line t•...10. three. ~~----------~~----------~ The cursor is positioned at the "l" in line one. You press function keys <D> and <WORD>. (Nokeypad character editing command W. is the definition of function key <WORD>.) EDT buffers +D until you press <WORD> and then executes +D W. as a single command. *DEFINE KEY GOLD *CHANGE(fiED 1 AS ?'This is a special c111d: 'D+3W L TABffim The alternate function for keypad key 1 is redefined with the ? character followed by a string enclosed in single quote marks. When you use the redefined key, the quoted string is displayed at the bottom of the screen as a prompt. Your message can be a reminder of the special function you have assigned to the key. The command string does not end in a period and therefore the command string is buffered until you press a key whose function ends with a period. The command string deletes 3 words, moves down one line, and sets the tab for that line. This prompting feature is used in a slightly different form in the FIND function, which is defined as: "?'Search for:".' Here, the quoted string prompts you for an input which can be up to 64 characters long. You end your search string input by pressing any keypad key. 10-40 Keypad Functions in Change Mode The double quote marks are the nokeypad character editing form of the string search command. The DEFINE KEY command for the keypad editing level has the form: EDT responds with: Press the Key YOU wish to define You select the key by pressing it. EDT responds with: Now enter the definition terMinated by ENTER You enter the function definition using the rules for string entries. Enter the definition, either using the nokeypad character editing commands or pressing the keypad function keys. Your entries for the function appear at the bottom of the screen. Press the ENTER function key when your command string is complete. Use the SHOW KEY command to display the definition of the key. Use @TI) to edit errors in the commands you type. You can use ©TRL/u) to cancel the DEFINE KEY sequence. You may use control characters in your key definition. When you press a control key, the circumflex and control characters are inserted into the command string ((CTRL/zJ is entered as "Z). EDT inserts the circumflex character combination for keys that generate control characters, such as t8ill and (ill, (CTRL/M and (CTRL/J) respectively). Examples: Assume you are not a very good typist and frequently transpose characters. To fix these errors manually, you delete the first character, move forward one character, and retype the deleted character. After making another typing error you decide to use the DEFINE KEY function to to make the correction operation automatic. This sentence has a trasnPosed letter. Press the keypad key to be defined: r----""' ; GOLD I \... .) ____ Keypad Functions in Change Mode 10-41 Then enter your definition, ending it with ENTER: r----~ r--""\ DEL C I UNO C I I -+ I I I \..., _) I I '-----J __ r----""" II GOLD II \... ____ .J r----, I DEL C r-----, I I L_ U~_9J _____ ENTER I I\.. SUBS .)I You enter ©TRL/K) and EDT prompts you with "Press the key you wish to define". You press the keypad key (GOLDI 5 J, and EDT prompts you with "Now enter the definition and end with ENTER". When you press keys to define (GOLDI 1 J, the nokeypad editing values for those keys appears at the bottom of the screen. The finished string is D+C+CUNDC., which disappears from the screen when you press ENTER. Move the cursor to the "s" in "trasnposed" and press (GOLDI 1). The "s" and the "n" are transposed. The next example shows how you use a defined key to insert a frequently used word or phrase. Press the Key you wish to define r-----"I I 0 I I I \.. _____ GOLD .)I r-~ t I '--.J Now enter the definition terMinated with ENTER: IENIJIRONMENT 8 CTRL/Z 0 • r----, I ENTER 1 L_~us~j The finished string for your entry is IENVIRONMENT"Z., where the (CTRL/Zl is displayed as "Z. The ©TRL/z), which ends the insert operation, could be entered by typing "Z. Enter "Z when using the command level DEFINE KEY command. When you want to insert "ENVIRONMENT", press (GOLD/ 1 l The next example shows how to define two keys to do multiple string substitutions in keypad character editing. This definition uses the? to prompt you for both the search string and the substitute string. You define one key to accept the search and substitute strings and do the first substitution and another key to substitute for the next occurrence of the search string. 10-42 Keypad Functions in Change Mode Press the KeY You wish to define Now enter the definition terMinated bY ENTER S/?'SUBS: '/?' WITH: 1 / 1111 Press the KeY YOU wish to define Now enter the definition terMinated by ENTER SN 1111 • The first definition is a substitute command, and EDT prompts you for the two strings when you press (CTRL/F). The pair of double quotes at the end of the command string causes EDT to search for the next occurrence of the string. If you enter a slash in either string, the command is invalid; the string is delimited by the slash. To avoid this, replace the slashes in the definition with a character you are not likely to use in the strings, such as a control character. The second definition is a substitute next command; it replaces the next occurrence and searches for another one. If you define a key as a series of commands and wish to use a repeat count with the key, enclose the series of commands in parentheses. EDT builds a command from your input and interprets your input when you press the key. The function defined for this key is 'move to the beginning of the next line and insert an asterisk.' Now suppose you used a repeat count of 10 to insert asterisks at the beginning of the next 10 lines. The command EDT sees after you press the keys is: 10+L I*···z. Keypad Functions in Change Mode 10-43 The repeat count of 10 applies only to the +L command, so EDT moves forward 10 lines and then inserts the asterisk. This is not what you had in mind. Now change the definition to: 10C+L I* . . Z>. The repeat count now appears in front of the left parentheses and the entire string inside the parentheses is executed ten times. This has the desired effect of putting an asterisk at the front of each of the next ten lines. 10-44 Keypad Functions in Change Mode Appendix A Differences in Terminal Responses EDT is an interactive editor; it responds to your commands as you enter them. EDT can be used with three types of interactive terminals: Hardcopy terminals Display terminals without a keypad Display terminals with a keypad A general description of the display responses to the editor commands on the three terminal types follows. A.1 Hardcopy Terminals You can designate any interactive terminal as a hardcopy terminal through the SET TERMINAL HCPY command. The hardcopy terminals (such as the LA36) respond to the command level commands and to the nokeypad commands. In line mode, the hardcopy terminals respond in a manner similar to display terminals (except for deleting characters). When you press ~, the terminal responds with a backslash and repeats the last character entered, the character being deleted. When you make additional deletions before new entries, the characters are repeated without the backslash. When you make a new entry, the editor responds with another backslash and the new data. For example: errir\ri\or All line mode commands are entered at the command level after the * prompt. When you enter line editing commands, they are displayed immediately after the asterisk and executed when you end the command line with a~. When the command is complete, EDT responds with another asterisk; the editor is ready to execute another command. Each time you enter a~, EDT returns to command level. A-1 When you enter change mode on an LA36, the cursor is a pair of brackets. The cursor encloses a character to mark your position in the text buffer. When the first entry is a tab character (eight characters spaces), the brackets enclose seven blanks ([ ]). When the first one to seven characters are empty, the brackets enclose one blank ([ ]) . When the position is the end of a line, the brackets enclose the carriage return symbol [<CR>]. To exit the change mode, enter EX. Example: (2~ 12 CoMMands follow: 1a HardcoPY TerMinals * 1 a rBm *CJAMGE\EGMAJ\HANGE~UJ [HJardcoPY TerMinals C * L IBID [<CR> J C*LIBm e [Tl he hardcOP/' ter1tlinals can respond to a 11 of the COITlltland 1el.Je1 C*llW ~Il hardcOPY ter11linals can [rJesPond to a 11 of the co 1T1111 and 1el.Je1 In the first line of the example, EDT is at command level; the asterisk ( *) prompt is present. When you enter a line number, EDT responds by displaying the lines, lines 12 and 14. You try to enter change mode but misspell the command. To correct the spelling error, you press ~ once for each letter to be deleted and then enter the corr.ect characters. EDT responds by displaying the deleted letters between backslashes. When you enter the CHANGE command, EDT displays the current line and the position of the cursor on that line, the first character. The change mode prompt is C*. When you enter the L command, EDT displays the next line. The [<CR>] indicates that the line is empty. The next line contains text; EDT positions the cursor at the first character in the line. In response to your 4W command, EDT displays the current line with the cursor at the beginning of the fourth word following the current word. A.2 Nokeypad Display Terminals Both the VT52 and the VTlOO terminals can be used in the nokeypad mode. In nokeypad mode the commands are entered through the keyboard. The VT52 cursor is a blinking underline(_) and the VTlOO cursor is either a blinking underline or a rectangle (!ii:]) with the character in reverse video. The A-2 Differences in Terminal Responses cursor marks your position in the text buffer for entering change mode commands. To insert data, you enter the I command. EDT inserts the data just before the cursor. With each character entry, the cursor moves to the right. At the end of the line, it moves to the start of the next line. To exit the. insert operation, enter a (CTRL/z). All line mode commands are entered at the command level prompt(*). When you enter line editing commands, EDT displays them immediately after the asterisk and executes them when you end the command line with a (BITl. When the command is complete, EDT responds with another *; EDT is ready to execute another command. For those commands which require additional input, the INSERT and the REPLACE commands, you enter a (CTRL/z) to return to the command level. When you enter a command, the cursor moves to the bottom of the screen and EDT displays the command you enter. When you end the command line with IBITJ, EDT performs the command and returns the cursor to the correct position in the text. A.3 Keypad Display Terminals Both the VT52 and the VTlOO terminals can be used in the keypad mode. The examples in the manual are based on a VTlOO terminal unless otherwise specified. Differences in Terminal Responses A-3 Appendix B Error Messages EDT contains a set of error messages that identify problems and assist you in the completion of the present editing operation. Most error messages consist of a pointer line, which is a circumflex character ("), and the error message. The pointer indicates the position of the error in the command. The error messages, arranged alphabetically, and their explanations follow. ' . ' rec:iui red The command requires a period (.) or other special character shown enclosed in single quote marks. Aborted b}' CTRL/C This message occurs when you are in keypad change mode and enter a tTRL/c) after entering a command. Advance Past botto1T1 of buffer The command indicates that you attempted to move the cursor past the [EOBJ. Atterr1Pt to CUT or APPEND to current buffer This message occurs when you have tried to perform a CUT or APPEND and have named the current text buffer as the destination text buffer. The default destination is the paste text buffer. Atterr1Pt to PASTE the current buffer The PASTE command attempted to paste text into the same text buffer containing the text to be pasted. B-1 Bac~{UP Past toP of buffer The command entered would move the cursor to a position preceding the first line (top) of the buffer. Chanse 1r1ode 1r1aY be entered onlY frorrt the ter1rlinal You cannot enter change mode when you run EDT from a batch command file or from your startup command file. There is no terminal associated with this job, so you cannot enter change mode. CorrHrtand buffer exhausted The string of change mode commands exceeds 255 characters. Co1rHr1and file could not be oPened The command file given in the command line cannot be opened. EDT will also display an associated RMS message for the error. Co1rur1and file does not exist The command-file parameter in the command line does not exist in the specified directory. Consistenc}' ched{ failed t Please chec~{ }'0'.lr file There is a discrepancy between the number of lines and characters entered during the editing session and the number of lines and characters present when the editing session ends. You should check for possible errors in your output file. This message indicates that there is a problem in EDT. Could not alisn tabs 1,.iith cursor The cursor is at a position where it is not evenly divisible by the tab size when the tab compute function was used. Destination for MO\JE or COPY not found The range specification in the command does not exist. Ent it Y 1r1 us t be WORD t SENTENCE t PAGE t or PARA GR A PH The SET ENTITY command must include one of the four entity options listed. Error in co1rur1and The command entered is invalid. Error in co1rur1and oPtion The command includes a /name where name is not a valid option. Error in ranse specification The command requires a range specification which must be complete. B-2 Error Messages File specification required A file specification is required as a part of the command (WRITE, PRINT, or INCLUDE). Help file could not be oPened The requested help file cannot be accessed. This indicates an error in system storage (for example, improper installation of the operating system). InPut file could not be opened The command contains faulty syntax, or you specified a nonexistent directory. InPut file does not exist The input file is not contained in the specified directory. In Put record too larse, truncated to 255 characters A record in the input file exceeds 255 characters. Insufficient rr1err1or}' There is insufficient memory to complete the last command. This message can occur when you define a new text buffer or use the DEFINE KEY command. Invalid buffer narr1e You have used improper syntax for the buffer name in the command. Invalid entit}' The entity portion of the change mode command is not recognized. Inl.ialid OPtion for that corrur1and You have used an /OPTION where it is not allowed for that command. Invalid Pararr1eter for SET or SHOW The SET or SHOW command does not use one of the listed parameters (see Chapter 8). Invalid subcorrur1and You have used an improper name for the change mode command. Inl.ialid l.ialue in SET corrur1and The command has an invalid keyword. I/O error on 1,.iorK file EDT is unable to access its text storage area for the file. An additional message will explain the error further, such as "Device full" or "Device write locked". Error Messages B-3 Journal file could not be opened The journal file is not within your defined privilege. Line exceeded 255 characters' tri.mcated The input for the line exceeds 255 characters; the excess is deleted. MACRO or KEY rec:iuired The DEFINE command is incomplete. You must include either MACRO or KEY in the command. No definition You have requested a SHOW KEY definition for an undefined key. No outPut f i 1 e nar'fle You have used the EXIT command without having specified a file name, either in the EXIT command or in the command line. No select ranse active You did not create a select range prior to entering the APPEND or CUT command. No such line There are no original line numbers for the specified range. Nttr'fleric lJalue rec:iuired The command must have a numeric value at the point of the " in the command. Output file could not be opened EDT will display another message describing the error. Parenthesis r1lisr'flatch The number of right hand parentheses [ ) 1do not match the number of left hand parentheses [ ( ]. This error occurs when you are entering a change mode command string. The command has caused the memory space for the parse data to be filled before the command could be validated. Check your command string. If it is valid, reenter the command in segments. Please ans1iJer YCes>, N<o>, Q(uit), or A<ll> This is the prompt that occurs when you have selected the query qualifier and have failed to answer with one of the above in response to the ? prompt. B-4 Error Messages Quoted strina rec:iuired The command requires a quoted string. The " indicates the position of the required quoted string. Ranae r11ust be cont i s1.lous The range specification for the RESEQUENCE command must be contiguous lines. Ranae specified by /SEQUENCE would cause duplicate or non-sec:iuential N1.w1bers You have range specifications in the RESEQUENCE command that would cause duplicate or non-sequential numbers. Strins 1"1as not found The string defined in the range specification cannot be found. That ~{e>' is not definable The key selected for the DEFINE KEY command is not available for definition. Unexpected characters after end of corTH11and The command contains a string of one or more characters at the end of the command which are not part of the command. The rest of the command is valid. Un rec o an i zed co r1u11 and EDT does not recognize or support the command entered. Most likely you have incorrectly specified the command. Unrecoanized cor1u11and oPtion The command includes an invalid option/qualifier. War~{ file Ol.1erflo1"1 You have exceeded 65536 blocks of text in this editing session. This message is displayed when the command operation requires more than a minimum amount of time to complete. It tells you that EDT is responding to your command. Error Messages B-5 Appendix C ASCII Decimal Equivalents Decimal Value ASCII Character Decimal Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 19 20 21 22 23 24 25 26 so SI DLE DCl DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ASCII Character Decimal Value + 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 ' - I 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B c D F ASCII Character v w x y z [ \ l or t - or+'Grave accent a A b c d e f g h i j k I m n 0 p (Continued on next page) C-·l C-2 Decimal Value ASCII Character Decimal Value ASCII Character Decimal Value ASCII Character 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 ESC FS GS RS 70 G H 72 73 74 75 76 I J K L 77 N 0 p 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 q 71 us SP ! " # $ % & " ( ) * ASCII Decimal Equivalents 78 79 80 81 82 83 84 85 M Q R s T u r s t u v w x y z { !Vertical Line } -Tilde DEL RUBOUT Glossary alphanumeric A contraction of alphabetic-numeric; the set of characters that compose text; characters include letters, numerals, and exclude special characters. ASCII The acronym for American Standard Code for Information Interchange; a standardized code representing the 128 characters in which text is recorded. The decimal values for the ASCII characters are contained in Appendix C. authorization flle See user authorization file. buffer A temporary storage area used to contain text. case The state of the alphabetic characters. Capital letters are upper case. character A symbol representing an ASCII code. See also alphanumeric character. character buffer A temporary storage area used to store the last character deleted by an EDT delete character operation. Glossary-1 character editing Editing text at the character level; an operational mode of EDT, entered through the CHANGE command. character string A sequence pr group of connected characters. command An instruction typed by the user at a terminal or included in a command file which requests the operating system to perform some well-defined procedure. command flle A file containing command strings. command llne The command for entering EDT. command string A line (or set of continued lines), normally terminated by typing a ~' containing a command and (optionally) information modifying the command. The fullest form of the command string contains a command, its qualifiers, and its parameters (file specifications, for example) and their qualifiers. contiguous Contiguous lines or characters are those which are adjacent to one another. control key The keyboard character that causes a control action; a control key is usually the combination of the CTRL key and an alphabetic key. CTRL/A or GOLD/A Sets the tab position to the present cursor position. CTRL/C End the current keypad operation and returns you to the keypad command level. CTRL/D or GOLD/D In keypad character editing, decreases the tab indentation level count by one. CTRL/E or GOLDIE In keypad character editing, increases the tab indentation level count by one. Glossary-2 CTRL/I Duplicates the function of the TAB key. CTRL/K In keypad character editing, lets you use the DEFINE KEY function. CTRL/Q Restarts terminal output that was suspended by ©TRL/s). CTRL/S Suspends the terminal output until you press (CTRL/Q). CTRL/T or GOLD/T In keypad character editing, sets the tab indent over a range of lines. CTRL/U or GOLD/U In keypad character editing, deletes the text from the cursor position to the left margin. CTRL/W In keypad character editing, refreshes the screen display. CTRL/Z Exits you from insert mode or keypad character editing and returns you to EDT command level. decimal number A number in the numbering system with a base of 10; a numbering system composed of 10 possible symbols (0 through 9) with each number position representing that symbol times some power of 10. default The act of omitting information in a computer operation so that the computer makes a predefined assumption about the operation; an assumption made by the operating system when no specific value is provided by the user. dell miter A character that limits a string of characters and therefore cannot be a member of the string. directory A file used to locate files on a mass storage device; a list of file names (including type and version number) and their unique internal identifications. Glossary-3 directory name The field in a file specification that identifies the directory in which a file is listed. The directory name begins with a left bracket and ends with a right bracket. · direction Direction can be forward or backward; the symbol for forward direction is the plus sign ( +) and the symbol for backward direction is the minus sign (-). editing session The interval between entering and exiting EDT. entity Units of text from 1 ton characters on which EDT commands operate; for example, character, word, line. error message A message displayed by EDT indicating that EDT cannot perform the operation you requested. exit The means of halting a computer cycle of operation (EDT); the ending of an editing session. When capitalized, it is a command. fie Id A group of characters which can be treated as a single unit of information, for example, line numbers. flle A set of data stored on a mass storage device. flle name The field preceding a file type in a file specification. This field contains a 1- to 9-character name for a file. flle specification A unique name for a file on a mass storage device. It identifies the node, the device, the directory name, the file name, the file type, and the version number under which a file is stored. fixed llne numbers Line numbers fixed to lines of text in a file. EDT maintains a record of these line numbers during the editing sessions in which you use those files. The line numbers are copied to the file when you end the editing session. Glossary-4 form feed (ff) Moves the cursor position to the start of a new page. One of the default word delimiters; the default page delimiter. GOLD key A key on the keypad. When you press GOLD, the alternate function for the next keypad key you press is enabled. help faclllty A set of on-line messages describing the operation of EDT. Increment To add a quantity to another quantity; the quantity added. Integer A whole number containing no fractional or decimal part. journal file A file containing the data input to the terminal for one editing session. journaling The recording of your input during an editing session. language A systematic, unambiguous means of communication with a computer; a set of representations, conventions, and associated rules used to convey information. llne buffer A storage area used to store the last line deleted by an EDT delete line operation. llne feed (® Moves the cursor position down one line. One of the default word delimiters. In keypad character editing, deletes the characters from the cursor position to the left word delimiter. llne number A number used to identify a line of text in a file or in an EDT text buffer. log In The process of accessing a computer system; an identification procedure. Glossary-5 macro A statement that requests EDT to perform a predefined set of instructions. main text buffer The default text buffer for keyboard input and for input files, and the source for output files. memory A device on which data can be stored and from which it can be retrieved; internal computer storage. nested parentheses A parenthetical operation embedded within another parenthetical operation in an expression. noncontiguous llnes Lines which are not adjacent to one another. nonprlntlng character A character in the computer code set for which there is no corresponding graphic symbol. null The character with the ASCII code 000; an absence of information. null string A string without content; an empty string represented by adjacent quotation marks. operating system Software that controls the execution of computer programs and performs system functions; an integrated collection of programs that supervise computer operation. parameter The object of a command. A parameter can be a file specification or a keyword option. password The character string assigned to a user to verify the user's access privileges; a code for assuring file confidentiality on time-sharing systems. paste buffer The default text buffer for EDT cut and paste operations. Glossary-6 program The complete sequence of instructions, text, and routines necessary for the computer to perform a desired operation. programming The process of planning, writing, testing, and correcting the steps required for a computer to solve a problem or perform a desired operation. prompt A symbol indicating that the user must provide input. punctuation Special language characters such as commas, separators, etc. qualifier A keyword that modifies the operation of a command. Qualifiers are always preceded by slash (/) characters. range of lines The number of lines in a range specification; the range can define single or multiple lines and contiguous or noncontiguous lines. range specification A means for defining a string of text. refresh To update the display with the most current text for the range displayed. rubout Synonomous with delete. screen The display surface on a display terminal. screen width The number of character positions that can be displayed on a line. search string A group of characters you define in a command; the object of a search operation. single line ranges Ranges which address one line of a text buffer. Glossary-7 string A set of contiguous items of a similar type; a connected sequence of characters. string search buffer A buffer used to store the string being searched for. substitute buffer A buffer used to store the string to be substituted for the search string. symbol An identifier used to represent a value; a character or group of characters of a language that are used to represent another entity. syntax The rules governing command structure in a computer language; the structure of the language. syntax error A mistake in your use of the governing command structure. TAB Moves the cursor a number of character positions. The default number of positions is eight. One of the default word delimiters. system A combination of hardware and software that performs specific processing operations; a collection of components that forms a functional unit. terminal The general name for those peripheral devices that have keyboards and video screens or printers. Under program control, a terminal enables you to type commands and text on the keyboard and receive messages on the video screen or printer. text buffer An EDT storage area for text (either terminal input or file input). truncate To set a limit on the number of characters in a line; characters entered after the limit is reached are used to start a new line. user authorization flle A file containing an entry for every user that the system manager authorizes to gain Glossary-8 access to the system. Each entry identifies the user name, password, default account, User Identification Code, quotas, limits, and privileges assigned to individuals who use the system. user name The name that a person types on a terminal to log in to the system. value A quantity; the information represented by a data item. variable An entity that can assume any of a given set of values; a symbol whose value can change during a program. version number The field following the file type in a file specification. It is separated from file type by a period (.) or semicolon (;) and consists of a number that generally identifies it as one version among all files having the identical file specification except for version number. Glossary-9 Index command description of, 9-11 purpose of, 9-11 A ADV command purpose of, 9-4 ADVANCE function description of, 10-16 purpose of, 10-16 APPEND command description of, 9-13 purpose of, 9-13 APPEND function description of, 10-27 example, 10-28 purpose of, 10-27 ASC command description of, 9-9 example, 9-9 purpose of, 9-9 Authorized user file, 2-2 B BACK command description of, 9-4 purpose of, 9-4 BACK SP ACE function description of, 10-15 purpose of, 10-15 BL entity, description of, 9-2 BOTTOM function description of, 2-21, 10-16 example, 2-22 purpose of, 10-16 BPAGE entity, description of, 9-3 BPAR entity, description of, 9-2 BR entity, description of, 9-3 BSEN entity, description of, 9-2 Buffer line ranges, example, 4-5 BW entity, description of, 9-2 c C entity, description of, 9-2 CHANGE command description of, 1-2, 8-1 example, 2-14, 2-15, 2-19, 8-2, 10-3 purpose of, 8-1 Changing case, how to, 2-31. See also CHNGCASE function CHAR function description of, 10-14 purpose of, 10-14 Character buffer purpose of, 5-3 using, 5-3 Character editing deleting characters, 2-16 deleting lines, 2-15 inserting text, 2-16 keypad, 1-3, 10-1 moving text, 2-1 7 moving the cursor, 2-14 nokeypad, 1-3, 2-14, 9-1 substituting text, 2-17 CHNGCASE function description of, 10-35 example, 2-31, 10-35 purpose of, 10-35 Command A' 9-11 ADV, 9-4 APPEND, 9-13 ASC, 9-9 BACK, 9-5 CHANGE, 8-1 COPY, 1-2, 7-1 CUT, 9-13 D, 9-14 DEFINE KEY, 10-38 DEFINE MACRO, 1-2, 7-2 DELETE, 1-2, 2-10, 7-4 EX, 9-5 EXIT, 8-2 EXT, 9-5 FILL, 9-15 FIND, 1-2, 7-5 HELP, 8-3 I, 9-6 INCLUDE, 1-2, 7-6 INSERT, 1-3, 2-4, 7-7 INSERT END, 2-8 MOVE, 1-3, 7-7 Null, 1-3, 7-7, 9-16 PASTE, 9-17 PRINT, 1-3, 7-8 QUIT, 8-4, 9-6 R, 9-17 Index-1 REF, 9-7 REPLACE, 1-3, 2-7, 7-8 RESEQUENCE, 1-3, 2-11, 7-9 S/sl/s2/, 9-12 SEL, 9-7 SET, 8-4 SET CASE, 8-5 SET CURSOR, 8-5 SET ENTITY, 8-6 SET KEYPAD, 8-7 SET LINES, 8-7 SET MODE, 8-7 SET NOKEYPAD, 8-2 SET NUMBERS, 8-8 SET QUIET, 8-8 SET SCREEN, 8-8 SET SEARCH, 8-9 SET TAB, 8-9 SET TERMINAL, 8-11 SET TRUNCATE, 8-11 SET VERIFY, 8-13 SET WRAP, 8-13 SHL, 9-10 SHOW, 8-14 SHOW BUFFER, 8-14 SHOW CASE, 8-15 SHOW CURSOR, 8-16 SHOW ENTITY, 8-16 SHOW KEY, 8-16 SHOW SCREEN, 8-16 SHOW SEARCH, 8-16 SHOW TERMINAL, 8-16 SHOW VERSION, 8-16 SHR, 9-10 SN, 9-12 SUBSTITUTE, 1-3, 7-11 SUBSTITUTE NEXT, 1-3, 7-13 TAB, 9-7 TADJ, 9-18 TC, 9-9 TD, 9-11 TOP, 9-9 TYPE, 1-3, 2-7, 7-14 TYPE WHOLE, 2-8 UNDC, 9-11 UNDL, 9-11 UNDW, 9-11 WRITE, 1-3, 7-16 Command format action on an entity, 9-4 fixed, 9-4 variable count and direction, 9-4 COMMAND function description of, 10-34 example, 2-31, 10-34 lndex-2 purpose of, 10-34 Command level prompt, EDT, 2-1 Command line, EDT, 2-3, 6-1 Commands character editing, 9-1, 10-1 control command, 1-2, 8-1 EDT, 1-2 line editing, 1-2, 7-1 nokeypad, 9-3 Consistency check description of, 3-3 purpose of, 3-1, 3-3 Contiguous line ranges, example, 4-4 COPY command description of, 1-2, 7-1 DUPLICATE, 7-2. See also qualifier example, 7-2 examples of, 2-13 purpose of, 7-1 QUERY, 7-1. See also qualifier CTRL/A function, description of, 10-37 CTRL/C function, description of, 10-36 CTRL/D function, description of, 10-37 CTRL/E function, description of, 10-37 CTRL/K function description of, 10-37 example, 10-42 CTRL/U function description of, 10-21 example, 10-22 purpose of, 10-21 CTRL/U function, description of, 10-36 CTRL/W function, description of, 10-36 CTRL/Y, entering of, 2-5 CTRL/Z function, description of, 10-36 Cursor moving, 2-21 VTlOO, 2-2 VT52, 2-2 Cursor movement, 10-10 arrow keys, 2-22 BOTTOM function, 2-21, 10-16 DOWN arrow key, 2-22 DOWN function, 10-11 LEFT arrow key, 2-23 LEFT function, 10-12 RIGHT arrow key, 2-23 RIGHT function, 10-13 TOP function, 2-21, 10-16 UP arrow key, 2-22 UP function, 10-10 CUT command description of, 9-13 example, 2-18, 9-13 purpose of, 9-13 CUT function description of, 10-24 example, 2-25, 10-7, 10-25, 10-28, 10-31, 10-33 purpose of, 10-24 D D command description of, 9-14 example, 9-14 purpose of, 9-14 DCL command prompt, 2-2 CONTINUE command, 2-6, 3-2 directory command, 2-6 DEFINE KEY command description of, 10-38 example, 10-40 purpose of, 10-37 Define key function, 10-42. See also CTRL/K DEFINE MACRO command, 1-2 description of, 7-2 example, 7-3 purpose of, 7-2 DEL C function description of, 10-19 purpose of, 10-19 DEL EL function description of, 10-22 purpose of, 10-22 DEL EOL function description of, 10-22 example, 2-29, 10-22 purpose of, 10-22 DELL function, example, 2-27 DEL W function description of, 10-20 example, 2-26, 10-20 purpose of, 10-20 DELETE command character editing, 2-15 description of, 1-2, 7-4 example, 2-10, 7-4, 7-5 purpose of, 7-4 QUERY, 7-4. See also qualifier DELETE function description of, 10-19 example of, 10-19 purpose of, 10-19 Deleting characters, 2-5 example of, 2-17 Deleting characters and lines, 2-5 Deleting lines, 2-5 Deleting words, example, 2-17 Deletions of characters with keypad, 10-19 of lines with keypad, 2-27, 10-22 of words with keypad, 10-20 DOWN function description of, 2-22, 10-11 example, 2-23, 10-12 purpose of, 10-11 E Editing, character, 1-3, 9-1, 10-1 Editing, line, 1-2, 7-1 EDT features of, 1-1 purpose of, 1-1 EDT command files description of, 6-4 example, 6-5 purpose of, 6-4 EDT command level prompt, 2-1 EDT command line, 2-3 example, 6-4 examples, 2-3 format of, 6-1 purpose of, 6-1 qualifiers, 6-1 EDT control commands, 1-2 example, 8-1 EL entity, description of, 9-2 Ending an editing session, 2-5 ENTER function description of, 10-33 purpose of, 10-33 Entity BL, 9-2 BPAGE, 9-3 BPAR, 9-2 BR, 9-3 BSEN, 9-2 BW, 9-2 C, 9-2 EL, 9-2 EPAGE, 9-3 EPAR, 9-2 ER, 9-3 ESEN, 9-2 EW, 9-2 L, 9-2 NL, 9-2 PAGE, 9-3 PAR, 9-2 SEN, 9-2 SR, 9-3 "string", 9-3 V, 9-3 Index-3 W, 9-2 [EOBJ description of, 2-21 End of buffer symbol, 2-3 EOL function description of, 10-15 purpose of, 10-15 EPAGE entity, description of, 9-3 EPAR entity, description of, 9-2 ER entity, description of, 9-3 Error messages description of, 3-3 list of, B-1 purpose of, 3-1, 3-3 ESEN entity, description of, 9-2 EW entity, description of, 9-2 EX command description of, 9-5 pupose of, 9-5 EXIT command, 2-4 description of, 1-2, 8-2 example, 2-5, 2-9, 2-13, 8-3, 10-6 fixed line numbers, 8-3 purpose of, 8-2 SAVE, 8-3. See also qualifier SEQUENCE, 8-3. See also qualifier EXIT function, 10-6 EXT command description of, 9-5 example, 9-5 purpose of, 9-5 F File examples of revising, 2-9 message describing, 2-5 specification version number, 3-1 File generation EXIT command, 2-4 INSERT command, 2-4 Files, multiple, 2-11 FILL command description of, 9-15 example, 9-15 purpose of, 9-15 FILL function description of, 10-35 example, 10-36 purpose of, 10-35 FIND command description of, 1-2, 7-6 example, 7-6 purpose of, 7-5 FIND function description of, 10-16 Index-4 example of, 10-18 purpose of, 10-16 Fixed line numbers, 7-17 assigning, 4-1 definition of, 1-4, 4-1 saving of, 4-1 source of, 4-1 FNDNXT function description of, 10-17 purpose of, 10-17 Function ADVANCE, 10-16 APPEND, 10-27 BACK SP ACE, 10-15 BOTTOM, 2-21, 10-16 CHAR, 10-14 CHNGCASE, 2-31, 10-35 COMMAND, 2-31, 10-34 CTRL/A, 10-37 CTRL/C, 10-36 CTRL/D, 10-37 CTRL/E, 10-37 CTRL/K, 10-37, 10-42 CTRL/U, 10-21, 10-36 CTRL/W, 10-36 CTRL/Z, 10-36 CUT, 10-7, 10-24 CUT, 2-25 DEL C, 10-19, 10-20 DEL EL, 10-22 DEL EOL, 2-29, 10-22 DELL, 2-27 DEL W, 2-26 DELETE, 10-19 DOWN, 2-22, 10-11 ENTER, 10-33 EOL, 10-15 EXIT, 10-6 FILL, 10-35 FIND, 10-16 FINDNXT, 10-17 GOLD, 2-20, 10-6 GOLD/A, 8-11 GOLD/D, 8-10 GOLDIE, 8-10 GOLD/T, 8-11 HELP, 10-7 LEFT, 2-23, 10-12 LINE, 10-15 LINE FEED, 10-20 OPEN LINE, 10-9 PAGE, 10-16 PASTE, 2-26, 10-7, 10-26 QUIT, 10-6 REPLACE, 10-30 RESET, 10-8 RIGHT, 2-23, 10-13 SECTION, 10-16 SELECT, 2-24, 10-23 SELECT ranges, 2-26 SPECINS, 10-34 SUBS, 10-32 TOP, 2-21, 10-16 UND C, 10-19 UND L, 2-28, 2-30, 10-22 UND W, 2-26, 10-21 UP, 2-22, 10-10 WORD, 10-15 G GOLD function description of, 10-6 example, 10-7 GOLD key, description, 2-20 GOLD/A function description of, 8-11 example, 8-11 purpose of, 8-11 GOLD/D function description of, 8-10 example, 8-10 purpose of, 8-10 GOLDIE function description of, 8-10 example, 8-10 purpose of, 8-10 GOLD/T function description of, 8-11 example, 8-11 purpose of, 8-11 H Help, to obtain, 1-4, 2-20, 8-3, 10-7 HELP command, 1--4 description of, 1-2, 8-3 example, 8-3 purpose of, 8-3 Help facility, definition of, 1-4 HELP function description of, 2-20, 10-7 purpose, 10-7 purpose of, 2-20 I command description of, 9-6 example, 9-6 purpose of, 9-6 Implied TYPE command, 2-7. See also null command INCLUDE command description of, 1-2, 7-6 example, 2-11, 2-12, 7-6 purpose of, 7-6 Indentation level counter decrementing, 8-11, 9-9 definition of, 8-11 incrementing, 8-11, 9-9 using, 8-9 Input file, prompt for, 3-2 'INSERT command, 2-4 description of, 1-3, 7-7 example, 2-5, 2-7, 2-8, 2-9, 2-10, 7-7 exiting, 2-5, 2-7 purpose of, 7-7 INSERT END command, 2-8 INSERT mode EDT entry into, 2-4 exiting, 2-5, 2-7 Inserting text, 10-8 J Journal file definition of, 1-4 description of, 2-5 example, 3-1 executing contents of, 3-2 purpose of, 3-1 saving, 3-1 K Key, definition of, 10-3 Keypad and nokeypad, comparison of, 10-2 Keypad editing cursor movement, 2-21 definition of, 1-3 deleting lines, 10-22 deleting results of, 10-6 deleting text, 2-26, 10-19 deleting words, 10-20 description of, 10-2 entering, 2-19, 10-3 essential functions, 10-6 exiting, 2-31, 10-6 HELP, 2-20 inserting text, 2-20, 10-8 moving text, 2-24 quitting, 10-6 saving results of, 10-6 to start, 10-2, 10-3 undeleting text, 2-26 Index-5 Keypad functions VTlOO, 10-5f VT52, 10-4f Keypad functions, how to use, 10-3 Keypad keys VTlOO, 10-5f VT52, 10-4f Keypad layout, description of, 10-3 L L entity, description of, 9-2 LEFT function description of, 2-23, 10-12 example, 2-24, 10-12 purpose of, 10-12 Level prompt, EDT command, 2-1 Line, EDT command, 2-3 Line buffer purpose of, 5-2 using, 5-2 Line editing commands, 2-4 abbreviations for, 7-1 example, 7-1 LINE FEED function description of, 10-20 purpose of, 10-20 LINE function description of, 10-15 purpose of, 10-15 Line numbers assigning, 4-1 changing, 2-11 decimal numbers, 4-1 definition of, 1-4 display of, 2-5 fixed, 4-1 purpose of, 4-1 range of, 4-1 renumbering, 4-1 Lines, deleting, 2-10 Login command file, 2-2 Login procedure example, 2-2 password, 2-2 user name, 2-2 M MAIN, text buffer, 5-1 MOVE command description of, 1-3, 7-7 example, 2-13, 7-7 purpose of, 7-7 QUERY, 7-7. See also qualifier Index-6 N New files example of, 2-6 generation of, 2-4 NL entity, description of, 9-2 N okeypad character editing definition of, 1-3 description of, 2-14, 9-1 entering, 9-1 entities, 9-1 N okeypad commands buffer definition, 9-4 command definition, 9-3 command formats, 9-4 count definition, 9-3 description of, 9-3 direction definition, 9-4 element sequence, 9-4 elements of, 9-3 entity definition, 9-4 format of, 9-3 Noncontiguous line ranges, example, 4-4 Null command description of, 1-3, 7-7, 9--16 example, 7-7 purpose of, 7-7, 9-16 0 OPEN LINE function description of, 10-9 example, 10-9 p PAGE entity, description of, 9-3 PAGE function description of, 10-16 purpose of, 10-16 PAR entity, description of, 9-2 PASTE, text buffer, 5-1 PASTE command description of, 9-17 example, 2-19 purpose of, 9-17 PASTE function description of, 10-26 example, 2-26, 10-7, 10-26, 10-29 purpose of, 10-26 Position marker, 2-2. See also cursor PRINT command description of, 1-3, 7-8 example, 2-13, 7-8 purpose of, 7-8 Prompt, EDT command level, 2-1 Prompts, DCL command, 2-2 Q Qualifier BRIEF, 7-11, 7-14 of COPY command, 7-1, 7-2 of DELETE command, 7-4 DUPLICATE, 7-2 EDT command line, 6-2, 6-3t EDT command line, description of, 6-3 of EXIT command, 8-2 of MOVE command, 7-7 NOTYPE, 7-11 QUERY, 7-1, 7-4, 7-7, 7-11 of QUIT command, 8-4 RECOVER, 2-6 RECOVER, example, 2-5, 2-6, 3-1 of RESEQUENCE command, 7-9 SA VE, 8-3, 8-4 SEQUENCE, 7-9, 7-16, 8-2 STAY, 7-14 of SUBSTITUTE command, 7-11 of TYPE command, 7-14 of WRITE command, 7-16 QUIT command description of, 1-2, 8-4, 9-6 example, 8-4 purpose of, 8-4, 9-6 SAVE, 8-4. See also qualifier QUIT function, 10-6 R R command description of, 9-17 example, 9-17 purpose of, 9-17 Range specification ALL "string", 4-4 AND, 4-4 BEFORE, 4-4 BEGIN, 4-2 BUFFER, 4-5 contiguous line, 4-4 default, 2-10 definition of, 4-2 description of, 4-1 END, 4-2 example, 4-2 FOR or, 4-4 LAST, 4-2 minus(-), 4-2 noncontiguous line, 4-4 number, 4-2 ORIGINAL number, 4-2 period (.), 4-2 plus(+),4-2 purpose of, 4-2 REST, 4-4 single line, 4-2 "string" 4-2 text buffer, 4-4 THRU or:, 4-4 WHOLE, 4-4 Ranges, CUT function and SELECT, 2-26 RECOVER, 2-6, 2-6. See also qualifier, example RECOVER qualifier, example, 2-5, 3-1 REF command description of, 9-7 purpose of, 9-7 REPLACE command description of, 1-3, 7-8 example, 7-9 purpose of, 7-8 REPLACE command, example, 2-7 REPLACE function description of, 10-30 example, 10-31 purpose of, 10-30 RESEQUENCE command description of, 1-3, 7-9 example, 2-11, 2-13, 7-10 purpose of, 7-9 SEQUENCE qualifier, 7-9 RESET function example, 10-8 purpose of, 10-8 Revising files, examples of, 2--9 RIGHT function description of, 2-23, 10-13 example, 2-23, 10-13 purpose of, 10-13 s S/sl/s2/ command description of, 9-12 purpose of, 9-12 Screen display, nokeypad, 2-14 SECTION function description of, 10-16 purpose of, 10-16 SEL command description of, 9-7 example, 9-7 SELECT command, example, 8-10 SELECT function Index-7 description of, 10-23 example, 2-25, 10-23 example of, 10-31 purpose of, 10-23 SELECT range and CUT function, 2-25 marking text with, 2-24 SEN entity, description of, 9-2 SET CASE command description of, 8-5 example, 8-5 purpose of, 8-5 SET command description of, 1-2, 8-4 example, 8-4 purpose of, 8-4 SET CURSOR command description of, 8-5 example, 8-6 purpose of, 8-5 SET ENTITY command description of, 8-6 example, 8-7 purpose of, 8-6 SET KEYPAD command description of, 8-7 purpose of, 8-7 SET LINES command description of, 8-7 example, 8-7 purpose of, 8-7 SET MODE command description of, 8-7 purpose of, 8-7 SET NOKEYPAD command, example,2-14, 2-15, 8-2 SET NUMBERS command description of, 8-8 purpose of, 8-8 SET QUIET command description of, 8-8 purpose of, 8-8 SET SCREEN command description of, 8-8 example, 8-8 purpose of, 8-8 SET SEARCH command BOUNDED parameter, 8-9 description of, 8-9 END parameter, 8-9 EXACT parameter, 8-9 example, 8-9 purpose of, 8-9 SET TAB command lndex-8 description of, 8-9 example, 8-10, 9-8 purpose of, 8-10 SET TERMINAL command description of, 8-11 purpose of, 8-11 SET TRUNCATE command description of, 8-11 example, 8-12 purpose of, 8-11 SET VERIFY command description of, 8-13 purpose of, 8-13 SET WRAP command description of, 8-13 example, 8-13 purpose of, 8-13 SHL command description of, 9-10 example, 9-10 purpose of, 9-10 SHOW BUFFER command description of, 8-14 example, 2-12, 5-2, 8-14 purpose of, 8-14 SHOW CASE command description of, 8-15 purpose of, 8-15 SHOW command description of, 1-2, 8-14 purpose of, 8-13 SHOW CURSOR command description of, 8-16 purpose of, 8-16 SHOW ENTITY command description of, 8-16 purpose of, 8-16 SHOW KEY command description of, 8-16 example, 8-16 purpose of, 8-16 SHOW SCREEN command description of, 8-16 purpose of, 8-16 SHOW SEARCH command description of, 8-16 purpose of, 8-16 SHOW TERMINAL command, purpose of, 8-16 SHOW VERSION command, purpose of, 8-16 SHR command description of, 9-10 example, 9-10 purpose of, 9-10 Single line ranges, example, 4-3 SN command description of, 9-12 example of, 9-12 purpose of, 9-12 SPECINS function description of, 10-34 example, 10-34 purpose of, 10-34 SR entity, description of, 9-3 Startup command files, definition of, 1-4 String search buffer purpose of, 5-3 using, 5-3 "string" entity, description of, 9-3 SUBS function description of, 10-32 example, 10-32 purpose of, 10-32 Substitute buffer purpose of, 5-3 using, 5-3 SUBSTITUTE command BRIEF, 7-12. See also qualifier description of, 1-3, 7-11 example, 2-10, 7-12 NOTYPE, 7-12. See also qualifier purpose of, 7-11 QUERY, 7-12. See also qualifier SUBSTITUTE NEXT command description of, 1-3, 7-13 example, 7-13, 7-14 purpose of, 7-13 T TAB command description of, 9-7 example, 9-8 purpose of, 9-7 TADJ command description of, 9-18 example, 9-18 purpose of, 9-18 TC command description of, 9-9 example, 9-9 purpose of, 9-9 TD command description of, 9-11 example, 9-9 purpose of, 9-11 Text, to insert, 2-20 Text buffer definition of, 5-1 displaying contents of, 2-8 inserting text, 2-8 MAIN, 2-4 MAIN, example, 3-1, 5-1 others, example, 5-1 PASTE, example, 5-1 transferring between, 2-13 Text buffers definition of, 1-3 examples of using, 5-2 limits on, 5-2 TI' command description of, 9-11 example, 9-9 purpose of, 9-11 TOP command description of, 9-9 purpose of, 9-9 TOP function description of, 2-21, 10-16 example of, 2-21 purpose of, 10-16 TYPE command BRIEF, 7-14. See also qualifier description of, 1-3, 7-14 example, 2-7, 2-8, 2-10, 7-14, 7-15 implied, 2-7 purpose of, 7-14 STAY, 7-14. See also qualifier TYPE WHOLE command, 2-8 u UND C function description of, 10-19 purpose of, 10-19 UND L function description of, 10-22 example, 2-28, 2-30, 10-23 purpose of, 10-22 UND W function description of, 10-21 example, 2-26, 10-21 purpose of, 10-21 UNDC command description of, 9-11 purpose of, 9-11 UNDL command description of, 9-11 purpose of, 9-11 UNDW command description of, 9-11 purpose of, 9-11 UP function description of, 2-22, 10-10 Index-9 example, 2-22, 10-10, 10--11 purpose of, 10-10 User buffers, definition of, 5-2 v V entity, description of, 9-8 VT52 and VTlOO Keypad numbers, 10-39f w W entity, description of, 9-2 Word buffer purpose of, 5-3 using, 5-3 . WORD function description of, 2-24, 10-15 example, 2-24 purpose of, 10-15 WRITE command description of, 1-3, 7-16 example, 7-16, 7-17 purpose of, 7-16 SEQUENCE, 7-16. See also qualifier Index-IO VAX-11 EDT Editor Reference Manual AA-H944A-TE Reader's Comments Note: This form is for document comments only. Digital will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. Did you find errors in this manual? If so, specify the error and the page number. Please indicate the type of user/reader that you most nearly represent. D D D D D D Assembly language programmer Higher-level language programmer Occasional programmer (experienced) User with little programming experience Student programmer Other (please s p e c i f y ) - - - - - - - - - - - - - - - · Name Date Organization _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _~ Street _____________________________________ CitY---------------~ State Zip Code or Country - - - -Do Not Tear - :Fold Here and Tape - - - - - - - - - - - - - - No Postage 111111 Necessary if Mailed in the United States POSTAGE WILL BE PAID BY ADDRESSEE ATTN: Commercial Engineering Publications MK1-2/ H3 DIGITAL EQUIPMENT CORPORATION CONTINENTAL BOULEVARD MERRIMACK N.H. 03054 - - - Do Not Tear - Fold Here and Tape - - -- - - - - - - - - - - - - - - -
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies