WPE Users' Guide WPS-PLUSTM for ASCII files WPE Version 2.5 Includes the MORE utility April, 1988 The WPE editor is similar to WPS-PLUSTM, but is intended for general use in editing ASCII files (e.g., LOGIN.COM, documentation, etc.). It matches WPS-PLUSTM where practical, and provides several extended capabilities including two-window editing. WPS-PLUSTM Digital Equipment Corporation Using WPE Accessing WPE: from the VMS prompt - $ WPE filename (After you have done WPE once with a filename, it will "remember" your last edited filename - so you only have to type WPE) Exiting WPE: Press F or key F10 to "file" your document. WPE works with VT2xx and VT3xx series terminals. Your VT2xx/VT3xx setup should be some variant of VT2xx/VT3xx (NOT VT100 ID). WPE also works with VT100s, with slightly reduced capability (no function keys). With terminal emulators on PCs, you're on your own. MORE is a "read-only" version of WPE - see the description. WPE was originally produced (using saved keystrokes) by Dale E. Coy. The current version, using TPU source, was produced by Dale E. Coy and Karl Nielsen. Both are with Los Alamos National Laboratory. WPE Mini-Tutorial This tutorial will assume that you are a DP professional, or are familiar with the WPS-PLUSTM document editor. WPE is useful in either case: it provides enhancements to the EVE editor (and is much better than EDT), and gives a uniform keyboard "feel" when editing ASCII files (if you also use WPS-PLUSTM). WPE uses the "Gold Key" standards, which means that to use many of the editing functions you need to press the Gold key (the PF1 key on the keypad) first, and then another key. In this document, we usually use the convention . For instance, T means to press the key and then press T to go to the top of the file you are editing. You may use either upper or lower case: T and t do the same thing. We will also use the terms "file", "document", and "buffer" interchangeably, except where we need to be specific. Each of these terms refers to the text you are editing at the time. There are often several ways to do the same thing in WPE. We will describe the most convenient way, and sometimes list alternatives. The descriptions assume you have a VT-2xx terminal. If you are using a VT-1xx, there is a list of alternatives later in this document. WPE and MORE WPE is used to create and edit ASCII text files. It is particularly tuned to editing .COM files, and is also excellent for regular text. MORE is used when you only want to look at a file (but want to make sure you don't change it). You can't edit a new file with MORE. Accessing WPE: from the VMS prompt - $ WPE filename Exiting WPE: Press F or F10 to "file" your document (exit). You can press K if you want to quit without saving any changes you have made in your editing session. (Note: the '3' key on the keypad, labeled Upper Case, is also a "file" key). After you have done WPE once with a filename, it will "remember" your last edited filename - so you may omit the filename. You then only have to type WPE to edit the same file again. Note: this "memory" is not retained when you LOgout. Accessing MORE: from the VMS prompt - $ MORE filename(s) When using MORE, you may use VMS wildcards, as well as lists of files, in the filename, and MORE will present the files in sequence (only the latest version of each file is used unless you specify x.y;*). Switches may also be used (anything legal for the DIR command). To exit MORE, use any of the methods listed for exiting WPE: they are all equivalent to "quit". MORE is essentially identical to WPE. We will first concentrate on a description of WPE. A separate section is provided near the end of this document which summarizes the few differences in MORE. Help Press the Help key (or H ) to obtain help on the WPE keys. There are several screens which provide diagrams of the keys. You may also press any key, and receive a description of its functions. For advanced functions, you may access the help for the underlying EVE and TPU editors. Press the Do key (or [ ). At the Command: prompt, type help or help tpu. Editing WPE works on ASCII text files (including programs, .COM files, etc.). It is capable of working on other types of files, with some restrictions on file organization (see the VAXTPU reference). The functions implemented on the main keyboard are a subset of those included in the WPS-PLUSTM editor, as well as several useful extensions. A list of the few WPS-PLUSTM features not implemented in WPE is provided later in this document. Special functions are called "Gold" functions - to use them, you press the key (the PF1 key on the keypad), and then press another key. The other key may be either upper or lower case ( T and t both do the same thing). Entering Text WPE is similar to most word-processing editors, in that you will not have to press Return if you are editing normal text. The editor will automatically "wrap" your text to the next line for you. Your right margin is normally set at column 79. WPE works with an eight-character "hot zone"; new words will not begin past column 71. However, you may construct lines longer than this default by inserting text in the middle of an existing line (this pushes the end of the line to the right). Of course, you will press Return to leave space between your paragraphs. You may use the Tab key to move over to another column. WPE has default tab settings every 8 spaces, and this setting may be changed if you wish. You may move the cursor throughout your file by using the arrow keys. Several other methods for moving the cursor are given in a later section. When you enter WPE, you are in "insert" mode. This means that any text you type is placed at the cursor location, and any text to the right is pushed over to make room. If you wish, you may use "overstrike" mode by pressing F14. Your current mode is shown on a status line at the bottom of the screen. (You may toggle back to "insert" by pressing F14). Erasing Text There are several methods for deleting portions of the text: oo Delete words or characters by pressing Del Word or Del Char. The text is erased forward from the cursor. oo Press DEL ( DEL) and Rub Sentence ( F13) are also implemented in WPE. Oops WPE maintains four separate internal buffers for the last text removed by these functions. If you make an error, you can restore text accidentally deleted by pressing: oo PF4 to restore the last Character deleted. oo PF3 to restore the last "word" deleted (by Del Word, Rub Line, Delete to End of Line, or Rub Sentence). oo F6 to restore the last Line deleted by Delete Line. oo Paste to restore text deleted with Cut or Remove. The contents of these buffers is not destroyed by the restore operation. Therefore, you may use these operations repetitively to place the same text at many places in your document. Correcting Text To interchange two transposed characters: oo Move the cursor to the first character. oo Press Enter (Swap). To change characters or words: oo Move the cursor to the start of the incorrect text. oo Delete words or characters by pressing Del Word or Del Char. oo Type the correct text. Or: oo Move the cursor to somewhere in the word, and press F13 to ERASE WORD. oo Type the correct text. Or, for large amounts of text: oo Move the cursor to the start of the text to be deleted. oo Press Sel or Select. oo Move the cursor to the end of the text to be deleted. You will notice that the region will be shown in reverse video. oo Press Cut or Remove. All of the selected text will be deleted. Selecting Regions of Text You will frequently need to designate an area of text for use by a WPE operation (such as Cut). To select a region of text: oo Move the cursor to the start of the text to be selected. oo Press Sel or Select. oo Move the cursor to the end of the text to be deleted. You will notice that the region will be shown in reverse video. The region in reverse video is the "select region". The select region may be constructed in either direction; that is, you may move either forward or backward from the place you press Sel. To cancel a select region, if you decide not to use it, press Sel or Select again. The reverse video highlighting will be removed. Moving the Cursor You will be moving the cursor around a lot, and just using the arrow keys would take a long time. WPE provides many other ways to move the cursor. Several of these methods travel in small steps, moving in the "current direction". This is either Forward or Reverse. The current direction is shown in the status line at the bottom of the screen. To change it, press F11 (which toggles the direction). You may also change the current direction by using the Advance and Back Up keys. Short-Range Movements Word Moves one word in the current direction. Line Moves one line in the current direction. (The F12 key - Move by Line - has the same effect). Sent Moves one sentence in the current direction. Para Moves one paragraph in the current direction. Page Moves one page in the current direction (see discussion of page marks below). Tab Pos Moves to the next Tab Position, if one exists on the current line; otherwise, moves to the next line. Gold <= (Arrow key) Moves the cursor to the beginning of the line. Gold => (Arrow key) Moves the cursor to the end of the line. Next Screen Moves down in the file by one "screen" (about 21 lines). Prev Screen Moves up in the file by one "screen". Long-Range Movements The Ends of the File: To go to the top of the document, press T. To go to the bottom, press B. ( Prev Screen and Next Screen have the same functions). Scrolling: To continuously scroll through the document, press UpArrow or DownArrow. ( Back Up and Advance have the same functions). To stop the scrolling at any point, press Ctrl/C (the Ctrl key and the 'C' key at the same time). The Paste Buffer The Paste buffer can contain large amounts of text, and is used for several purposes. One of the uses is to move large amounts of text from one place in the file to another place. This is called a "Cut and Paste" operation. You put text into the Paste buffer by first selecting the region of text. Then press: Cut To remove (delete) the text from the file, and place it in the Paste buffer. The Remove key does the same thing. Cut To place the text in the Paste buffer, without deleting it from its current place. This is useful if you want to make a Copy of the text to place elsewhere. Remove does the same thing. You can then copy the contents of the Paste buffer anywhere in your file (one or many times) by pressing Paste. If you should need to clear the Paste buffer, press Sel and then Cut. Searching & Replacing WPEs searching and replacement operations are an enhanced version of those in WPS-PLUSTM. Find (Srch) To search your file for a text string, press Find. You will be prompted to enter the text you wish to find. If you enter text in lower case, WPE will consider either lower or upper case text to be a match. Anything you enter in upper case must be matched exactly. For instance, xYz will match XYZ but not xyz. ( Comma - labeled Srch on the WPS-PLUSTM keyboard - will also do this operation). The find operation looks in the current direction (Forward or Reverse). If the string is not found in that direction, it looks in the other direction (but asks if it should go in that direction). If a match is found, WPE will position you to that location. Note: If you are presently at the only matching string in the file, WPE will not "find" it. This is a feature. After doing Find, you may wish to repeat the operation with a slightly different text string. Press Find, and then the up-arrow key, to recall the previous command. You may then edit the command and press Return to execute it. Find Again (Cont Srch) To continue to search (for the next occurrence of the same string), press Period - labeled Cont Srch on the WPS-PLUSTM keyboard. (You may also press Find, or press Find twice, to continue the search). Continue Search & Select The Cont Srch function can be automatically combined with a Select of the matching text by pressing / - labeled Cont Srch & Sel on the WPS-PLUSTM keyboard. After the matching text is selected, you may then press ' (quote) to replace the select region with whatever is in the Paste buffer. (This is labeled Replc on the WPS-PLUSTM keyboard). Global Search and Replace To search for and optionally replace all matching strings in the file, press ; - you will be asked for the search string, and then for the replacement string. In WPS-PLUSTM this function is somewhat annoying: you can't see what is being done, and all matching strings are replaced. In WPE, as each match is found, you are asked whether or not to replace it. Your choices are yes, no, all, last, and quit. Last means "do this one and then quit". All means "do all the rest of them in the current direction". You will also be asked if you wish to change directions, at the end of the file. Pressing ; followed by up-arrow will recall the previous search string. You may edit this string, and repeat the operation. Find > Pressing the Enter key will search for the next occurrence of the character '>'. You might use this as a "bookmark". Page Markers and Pagination There is only one type of page marker in WPE (WPS-PLUSTM has 2). It is a true "form feed", and is displayed as two Fs in one column. You can insert this marker in your file by pressing N or P. Although WPE will automatically place this marker at the left margin, you may move it elsewhere in your file. To nicely paginate your file for printing, you sometimes want to count the lines and put page markers at appropriate places. Press Page (PF2). WPE will first back up to the last page marker, and will then move forward 60 lines and insert a page marker. If this is not an appropriate place, you can delete the page marker and move up to an appropriate location and insert it there. Then continue on through your file with Page. If WPE finds an existing page marker before it gets to 60 lines, it will ask you whether you want the existing marker removed. If you answer "no", WPE will stop at that point. The number of lines in a page (60 by default) is controlled by the CT (Current Text length) parameter. To change this number you must use a WPE command. First, press the Do key. You will get a Command: prompt. Type CT, and you will be asked for the new number. (You may also type CT nn, where nn is the number of lines you want). Carriage Returns (Return) Although you can't see it, there is an implicit carriage return at the end of each WPE line. It may be there because you pressed the Return key, or because WPE "wrapped" your text to another line. It is useful to think of the Return as being located between lines of text. You can delete it by either: going to the end of one line and pressing Del Char; or going to the beginning of the next line and pressing DEL ( Para, your paragraph of text will be adjusted so that all of the lines fit the current margin. The cursor can be anywhere in the paragraph you want to wrap. Have several paragraphs to wrap? You can press Para repetitively to do them one after the other, or you can first establish a Select Region so that Para will wrap them all in one operation. (Hint: T, Sel, B, Para will re-wrap your whole file). Bookmarks It is sometimes helpful to place invisible "bookmarks" in your text, so that you may return to a place quickly. To insert a bookmark at the current location, press KP9 (labeled UnderLine). You will be asked for a name for the bookmark. Return to a bookmark by pressing KP9. You will be asked for the name of the mark you wish to go to. This function even works across multiple windows and buffers (see below). Windowing Two Windows (F18) splits the screen, but (initially) displays the same file in both windows. Since it's the same file, any change in one window affects the file and MAY be displayed in the other window. However, you can scroll each window independently, cut from one and paste in the other, etc. (Pressing F18 again toggles back to a single window). Other Window (F19) puts your cursor in the other window, so you may edit there. One Window (F17) expands the window your cursor is in, and "hides" the window where your cursor isn't. Get File ( F18) replaces your current buffer with a new file (with a new buffer name). The old buffer is still around somewhere, and you may switch back to it with the BUFFER command. GET FILE is most useful in the two-window mode, as it lets you copy stuff from one file (window) into another file. Buffer ( F19) changes the name (and contents) of your current window. Since you may have several buffers in WPE, your editing changes are not lost unless you exit without saving them. If you are working on BUFFER B.TXT, you may change back to BUFFER A.TXT by issuing the appropriate command. Two-Window Editing As an example, if you wish to copy some material from document SECOND.TXT to document FIRST.TXT, do the following: WPE FIRST.TXT - starts editing the file TWO WINDOWS (F18) - you now have two views of FIRST.TXT OTHER BUFFER (F19) - your cursor is now in the top window GET FILE ( F18) - SECOND.TXT the top window now contains SECOND.TXT Select and cut material from the top window; OTHER BUFFER (F19) - your cursor is now in the bottom window Paste material in the bottom window. etc.................. Working with Multiple Files Two-Window editing provides an easy way to work with multiple files. You may have as many buffers as you wish, created using the Get File or Buffer commands. The only restriction is that each buffer must have a unique name. You use Get File to create a new buffer and fill it with the contents of a file. Buffer is used to switch between existing buffers (and also to create empty buffers). You may be viewing a buffer full-screen, or may be viewing two buffers in separate half-screen windows. You could also be looking at two parts of the same buffer using two windows. Move your cursor between the two windows using the Other Buf (F19) key. Change buffers using the Buffer ( F19) key, or by using bookmarks. If you want to include the contents of one file in the buffer you are editing, use the G command to copy the file into the buffer at the current location. Of course, you may select and cut portions of a buffer, and paste them in a different buffer. The Buffer Command The Buffer command will switch your editing context to a different buffer (if it exists), or will create an empty buffer if the one you name doesn't exist. If you are using a VT-2xx terminal, after pressing F19, you may press the up-arrow key to see a list of your available buffers. You may use the arrow keys to position to the name of a different buffer, and press Sel, Select, or Return to change buffers. (Note that the Message buffer is always listed). Multiple Files and MORE If you use MORE with a wildcard file specification (e.g. MORE *.for), it is possible to retain all of the files in the editor. When you press an Exit key, the current file will be retained if: (1) you are using two-window editing at the time, or (2) you are in a system buffer (such as the Messages buffer). This is useful for comparing the contents of files, as well as for other purposes. Tab Positions You may check the tab positions by pressing R to receive a message. Tab positions affect only how the text is displayed, and not necessarily how it might look when printed, etc. If you wish to change the tab positions, press Do (or [) and then type: set tabs every nn or set tabs at n nn nn nn Wide Text If there are lines longer than about 80 characters in your input file, you will be asked if you want to use 132-column mode. If you answer yes, your terminal will be switched to wide screen (and will be returned to regular mode when you exit). This automatic function is not perfect - it counts characters only, so Tab characters are a confusion factor. If your file is wider than the screen, you can still edit it. Press Do and then type Shift Left nn or Shift Right nn until you can see the desired part of the text. The Message Buffer If a message is sent to you by VMS, you will only see one line of it at the bottom of the screen. To read the entire message, press Buffer and type Message. This will place you in the message buffer. When you are finished, return to editing by using Buffer and the file name you were editing. Writing Files WPE saves the results of your editing session when you exit (and also keeps a journal file for recovery from a "crash"). However, occasionally you will want to save intermediate results, or copy parts of a file you are editing to another file. Pressing W will write the entire current buffer to a file you name. If you want to recall (and use) the full name of the file you are editing, press up-arrow when you are prompted for the file name to write. To write only a portion of the buffer, establish a Select Region before pressing W. Inserting Special Characters If you press F7, you will be prompted to press a key to be inserted. This may be used to insert control and special characters into your text. For instance: Pressing Inserts Ctrl/G Bell Ctrl/H Backspace Ctrl/J Line Feed Ctrl/[ Escape Some characters cannot be inserted by this method (Ctrl/S, Ctrl/Q, Ctrl/Y, etc.). For these, press Do (or [) and then type (for the example of Ctrl/Y): tpu copy_text (ascii(25)) using the ASCII decimal equivalent of the key code. The Escape character is used frequently in terminal control. To insert this character, press F7. Functions Available Only from Command Mode In addition to the EVE and TPU functions, which are available from command mode, the following WPE commands are available: Press Do and enter the Command: Command: CT nn Changes the Current Text length (for the paginate command). Command: Print Prints a copy of the current buffer or select range, with control characters translated to printable form. This command will let you print files which have form feeds, and "unprintable" characters. When you use this command, a buffer named "Translate" is created for further editing, saving, etc. Command: Fix Creates a copy of the current buffer with CR and LF characters properly removed. This command is often used to convert .MEM files to a more reasonable format for further editing, saving, etc. The buffer containing the fixed copy will be named either filename.LIS or filename.TXT Command: Numeric Places the keypad in Numeric mode. The keypad keys will now enter numbers, rather than having the functions shown in this document. This is useful if you need to enter many numbers in a table, etc. Command: Application Returns the keypad to Application mode (keypad keys have functions as indicated in this document). Command: Notab Replaces all tab characters in the current buffer with an appropriate number of spaces, and redefines the TAB key to insert spaces. Sets tab stops to "every 8". Miscellaneous Functions Capitalizing (Uppercase/Lowercase) The following keys are available to change the case of text in your file: Bold Changes the current character to Uppercase. May be used with a Select Region to change the case of larger amounts of text. Bold Changes the current character to Lowercase. May be used with a Select Region to change the case of larger amounts of text. F8 Cap Word - makes the first character of the word Uppercase, and all other characters in the word Lowercase. F8 Uppercase Word - makes all characters in the word Uppercase. Note carefully that the '3' key on the keypad is not used for the Uppercase function (although it may be labeled Upper Case). Instead, the '3' key is used for "exit", and will cause your document to be filed. This incompatibility with WPS-PLUSTM is deliberate - it enhances compatibility with DM (also available through DECUS). Note also that the '9' key on the keypad (Underline) is not implemented in as underline in WPE. It is implemented as the "Mark" function. Paired Characters Pressing ( inserts a pair of parentheses (), and positions the cursor to insert text between them. Similarly: ( or ) - Inserts paired () { or } - Inserts paired [] " - Inserts paired "" C Centers the current line of text. \ Inserts the current date and time. Insert/Overstrike Mode Change from Insert to Overstrike (strikeover) mode by pressing F14. Pressing this key again changes back to Insert mode. I (Interrupt) Prompts you for ONE DCL command. The screen goes to two-window mode, and the results of the DCL command appear in the second window. Among other things, this lets you copy the results of a DCL command to another file (by cut and paste). V (View) Allows you to see Tab (HT) characters on the screen. Pressing V again returns to the normal mode. If you want to see the screen appearance of line graphics, press Do and then type tpu set (text, current_window, no_translate). Pressing V returns to the normal mode. X (Find matching parenthesis) Positioning the cursor to a ( and pressing X will find and highlight the matching ) in a complex expression. ? (What character?) Positioning the cursor to any character and pressing ? will display the name of the character, the numerical codes in decimal, octal, and hexadecimal, and (if appropriate) the Ctrl/code. | (What line?) Pressing | will display the current line number, and ask if you want to go directly to another line. $ This takes you out of WPE into VMS. You can do any reasonable DCL command (including A1). You are actually in a "spawned" sub-process, so YOU MUST LOGOUT ($ LO) to get back to WPE. Your ORIGINAL editing environment is preserved. Z Shows the STATUS of your buffers. Also shows the Version numbers of WPE, EVE, and TPU. @ Copies the file SIGNATURE.WPE from your login directory into the buffer you are currently editing. This is called the Signature function because it is often used to place a signature block (plain or fancy) in a memo or other document. However, the file can contain anything you wish. Command Recall Use the up-arrow to recall the previous commands after you press Do, or the previous single command when using Find or Global Replace. Press Ctrl/B to immediately recall the last Command: you typed. Ctrl/W Pressing Ctrl/W will refresh the screen, in case extraneous characters have appeared due to communications line errors, etc. Ctrl/F Some EVE and TPU functions leave you in a non-editing buffer (such as the SHOW buffer). Pressing Ctrl/F will return to the last editing buffer. Special File Types WPE provides special handling for some common types of files. They are recognized by the file "type". .TPU Source files for the TPU text utility are recognized. When editing these files, pressing Return will insert a TPU comment line. .HLP Help files are recognized, and you are asked if you want WPE to tailor for them. If you answer Yes, the margins are set at columns 2 and 66. When editing these files, pressing Return will insert a HLP comment line. To add a topic line (which must begin in column 1), position to column 2 and use the left-arrow key to move to column 1. .FOR FORTRAN files are recognized. When editing these files, pressing Return will insert a line beginning with a Tab. (To add a statement label, use left-arrow, type the label, and then press right-arrow). Pressing Return will insert a FORTRAN Comment line. Long Lines If a file has lines longer than 80 characters, you will be asked if you want to go to 132-column mode. When WPE changes to 132-column mode, there is no way to change back (except to exit an re-enter). .COM Files WPE automatically tailors itself when the buffer contains a .COM file. Several functions are different for these files: Del Word stops deleting when the characters )]}"'_/;:.,- are encountered. Return inserts a line beginning with $ and a Tab (and Delete will delete this first tab, if desired). Continuation lines are also properly handled. Return inserts a DCL comment line. NoTab Mode WPE can be placed in NoTab mode by pressing the DO key and then typing NoTabs. The current buffer is set to have tab stops "every 8". All tab characters in the current buffer will be replaced with the appropriate number of spaces. (The command may be used again for other buffers). The TAB key is redefined to insert an appropriate number of spaces. NOTE: Cut-and-paste operations between buffers, and other operations where the material contains tabs, may still cause tabs to be placed in the buffer. Special handling of .FOR and .COM files may also cause tabs to appear. In these cases, re-issue the NoTab command before saving your file or exiting WPE. /Recovery of WPE sessions WPE journals your input every few keystrokes. Should you be so unfortunate as to suffer a "crash" while editing (or should you accidentally press Ctrl/Y), there is a good chance that the editing results are not lost. When you enter WPE, a check is made for the existence of an applicable .TJL (journal) file. If one exists, WPE will automatically try to recover the results of your interrupted edit session (probably missing the last few keystrokes). You will be informed of this automatic action if it occurs. The recovery applies only if you edit the same file you were editing at the time of interruption. If you do not want recovery to take place, delete the journal file from your directory. If you were editing the file TEST.TXT, the journal file will be named TEST.TJL (or, infrequently, TPU.TJL). Your first keystroke after a recovery will be "eaten" by WPE. This action appears to be a bug in TPU. Recovery is not provided by MORE. Features Not Implemented in WPE There are several WPS-PLUSTM functions which are not implemented in WPE. They either don't make sense for ASCII files, or they would be extremely difficult to implement. Examples are: BOLD function (WPE uses the BOLD key for UPPERCASE) UNDERLINE function "Strange" HYPHEN functions DEAD KEY SUBSCRIPT and SUPERSCRIPT GOLD L, M, S, U, ] GOLD Space If you try to use functions which are not implemented, you will receive an explanatory message. You are welcome to define these keys in any manner you wish. The Help for EVE, and the associated documentation, explain how to use Learn, Remember, and Define_Key to add your own functions to WPE. Using WPE as your VMS Mail editor It is possible to use WPE as the editor for messages you send using VMS Mail (VAXMail). Some additions will need to be made to your LOGIN.COM file. See the system manager for assistance. Extending WPE WPE uses the capabilities of TPU and EVE, as supplied by Digital Equipment Corporation. Ideas (and some code) were also borrowed from the EVE_PLUS capabilities. Of course, the basic user interface is from the de-facto standard WPS-PLUSTM. If you write a TPU Command File to extend the capabilities of WPE, we believe that plagiarism is the sincerest form of flattery (credit would be appreciated). WPE was designed to be extended. You could either edit the source, or start with Edit/tpu/section=wpe.tpu$section/command=your_command.tpu WPE will issue a call to your procedure "WPE$LOCAL_INIT" during startup. MORE MORE is a read-only version of WPE. It is designed to allow you to "examine" files, without fear of changing something you didn't mean to change. The command is: MORE filename(s) MORE has every feature of WPE, except that MORE will not write out a changed version of the file when you exit, and it does not remember the last file edited. There is one added capability: you can use MORE with multiple files in a single command. For example: MORE X.FOR,X.LIS,A.*,B%%.C You can use wild-cards (e.g., MORE *.*) and lists (e.g., MORE x.y,a%.b,c.*) in which case, when you exit ( K or F), you will get the next file. Only the latest version of the file is presented, unless you use a wild-card specification for the version (like x.x;*) Switches may be used with the list of filenames: MORE *.*/SINCE=TODAY Any switches which can be used with the DIRectory command may be used with MORE. The switches must be applied to the end of the filename(s), not to the MORE command. When switches are used, the effect is as if you had typed MORE once for each selected file. Everything which can be done in WPE can be done in MORE. This is sometimes convenient (e.g., when a line extends beyond the right edge of the screen, just insert a somewhere to break it up - and then don't save the changed file). However, the similarity to WPS and WPE sometimes causes us to think we are really editing - when we're in "read-only" mode. Sometimes we make a lot of changes to the buffer while in MORE, and then press EXIT. Although MORE will not automatically save these changes, all is not lost. There is a way out: If you have made any "changes" while using MORE, when you try to exit you will get a message: Changes will not be saved. Continue quitting? (y/n). If you want to quit, just answer "y" -- but if you really want to save the changes, answer "n"; then press W to write the buffer contents to a file. You will be prompted for the name of the file to write - you can use the same (or another) file name. If you want to recall (and use) the full name of the file you are editing, press up-arrow when you are prompted for the name of the file. This is useful to prevent confusion about rooted directories, and also saves time. If you use MORE with a wildcard file specification (e.g. MORE *.for), it is possible to retain all of the files in the editor. When you press an Exit key, the current file will be retained if: (1) you are using two-window editing at the time, or (2) you are in a system buffer (such as the Messages buffer). Note: This applies only to a single item in a list of files, and only if switches are not used. Summary of Commands Press (PF1) and then another key... B - Bottom of file C - Center text F - File (Exit) G - Get file (Include) H - Help I - 1 DCL Command (Interrupt) K - Quit (Kill) N - New Page mark P - New Page mark R - Show tab settings (Ruler) S - [Reserved for Spell Check] T - Top of file V - View tabs W - Write file X - Find the ) matching this ( Z - Show Status of Buffers < - Prev Screen > - Next Screen , - Search . - Continue Search / - Continue Search Select ? - Display facts about this character ; - Global Replace ' - Replace \ - Insert Date | - What line is this? @ - Insert Signature Block # - [Reserved for Calculator Function] $ - Spawn [ - DO Command ( or ) - Insert paired () { or } - Insert paired [] " - Insert paired "" Return - (.FOR, .COM, .TPU, .HLP) Comment Line Summary of Ctrl/ Commands Press Ctrl simultaneously with another key (upper and lower case are equivalent): Ctrl/ B - Recall last Command: Ctrl/ F - Return to editing buffer (from Show, etc.) Ctrl/ R - Remember (after Command: Learn) Ctrl/ V - Quote (Press the key to be added) Ctrl/ W - Refresh (repaint) the screen. Ctrl/ Z - Exit. Seldom used: Ctrl/ H - Move to start of current line. Ctrl/ U - Erase to start of current line. Using WPE and MORE on VT100 Terminals Since VT100 terminals don't have a DO key, you must press [ before entering special (EVE) commands. You will receive a Command: prompt. Type the appropriate command: Command: buffer test.txt - Change to buffer with this name. Command: get file test.txt - New file & new buffer. Command: one window - One window editing (from 2). Command: two windows - Two window editing (from 1). Command: other - Move cursor to other window. Command: forward - Change direction to Forward. Command: reverse - Change direction to Reverse. Command: insert mode - Change to Insert mode. Command: overstrike - Change to Overstrike mode. Command: CT nn - To change the Current Text length. Command: print - To print the file, with controls made printable. Command: fix - To remove CRs and LFs from a file copy. Command: numeric - Sets the keypad to Numeric mode. Command: application - Returns the keypad to Application mode. Command: notabs - Removes tabs and enters NoTab mode. Command: help - For HELP on these and other EVE commands. Press CTRL/V to invoke the QUOTE function. You will be prompted: "Press the key to be added:" KEYPAD FUNCTIONS Press the "HELP" key to display the keypad diagrams. The inner keypad (with the arrow keys) works as it is labeled (Remove = Cut, etc.). Also: Gold <- moves the cursor to the beginning of the line. Gold -> moves the cursor to the end of the line. The main keypad works mostly like WPS-PLUSTM Note that some WPS-PLUSTM functions are not present, and that the KP3 (Upper Case) key has been re-defined to be "Exit" (for compatibility with DM). Bold will Uppercase a selected range of characters, and Bold will lowercase a selected range of characters. +--------+--------+--------+---------+ | | Page | Del | Del | | GOLD | | Word | Char | | |Paginate|Undelete|Undel. C | +--------+--------+--------+---------+ Cut deletes a select range (puts it | | Tab | Mark | Cut | in the Paste buffer). | Sent | Pos | | | Gold Cut puts in Paste buffer | | | Go To |Gold Cut | without deleting. +--------+--------+--------+---------+ | | Para | Upper | | | Word | | Case | Paste | | | Wrap | Lower | | Wrap wraps a paragraph to margins. +--------+--------+--------+---------+ |Back Up | | | Go To | | | Line | Exit | Next | | Top | | | > | +--------+--------+--------+ | | Advance | | | | | Select | | | Bottom |(Toggle)|Gold Swap| Gold Swap exchanges current and next +-----------------+--------+---------+ characters. Function keys F6, F7, F8, and F10 thru F20 have useful functions as described in the following diagrams. F6 F7 F8 F9 F10 +-----------+-----------+-----------+-----------+-----------+ |Delete Line| Quote | Cap Word | | | (Normal Functions +-----------+-----------+-----------+ | Exit | ----------------- |Undelete Ln| Escape |Upper Word | | | (Gold Functions) +-----------+-----------+-----------+-----------+-----------+ Quote Lets you enter any "strange" key (e.g., CTRL G) Escape Inserts an ESC character in the document Cap Word Capitalize WORD (first letter only) Upper Uppercase WORD (does not require select) Exit Just like GOLD F . . F11 F12 F13 F14 +-----------+-----------+-----------+-----------+ | Forward | Move |Erase Word | Insert/ | | Reverse | by +-----------+Overstrike | | Toggle | Line | Rub Sent. | Toggle | +-----------+-----------+-----------+-----------+ Erase Word is not exactly like WPS+ +-----------+---------------------+ | | | | Help | Do | Do lets you directly enter EVE commands. | | | +-----------+---------------------+ F17 F18 F19 F20 +-----------+-----------+-----------+-----------+ | | 2 Windows | Other Buf.| Delete | (Normal Functions) | 1 Window +-----------+-----------+ to | ------------------ | | Get File | Buffer |End of Line| (Gold Functions) +-----------+-----------+-----------+-----------+ See the discussion of Windowing. KEY LABELS FOR VT2xx/VT3xx TERMINALS The WPE labels are reproduced here. Reduce this page to 74% to properly fit the key strip on VT2xx terminals. +-----------+-----------+-----------+-----------+-----------+ |Delete Line| Quote | Cap Word | | | +-----------+-----------+-----------+ | Exit | F6 -F10 |Undelete Ln| Escape |Upper Word | | | +-----------+-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+ | Forward | Move |Erase Word | Insert/ | | Reverse | by +-----------+Overstrike | F11-F14 | Toggle | Line | Rub Sent. | Toggle | +-----------+-----------+-----------+-----------+ +-----------+-----------+-----------+-----------+ | | 2 Windows | Other Buf.| Delete | (Normal Functions) | 1 Window +-----------+-----------+ to | -------------- F17-F20 | | Get File | Buffer |End of Line| (Gold Functions) +-----------+-----------+-----------+-----------+ For VT300s and LK250 keyboards: (reduce to 65%) +-------------+-------------+-------------+-------------+-------------+ | Delete Line | Quote | Cap Word | | | +-------------+-------------+-------------+ | Exit | |Undelete Line| Escape | Upper Word | | | +-------------+-------------+-------------+-------------+-------------+ +-------------+-------------+-------------+-------------+ | Forward | Move | Erase Word | Insert/ | | Reverse | by +-------------+ Overstrike | | Toggle | Line |Rub Sentence | Toggle | +-------------+-------------+-------------+-------------+ +-------------+-------------+-------------+-------------+ | | 2 Windows |Other Buffer | Delete | | 1 Window +-------------+-------------+ to | | | Get File | Buffer | End of Line | +-------------+-------------+-------------+-------------+