.STYLE HEADERS 6 ################# .BLANK 10 .CENTER; EDTEM .BLANK 2 .CENTER; An Advanced TPU Text Editor .BLANK 4 .CENTER; User's Manual .BLANK 10 .CENTER; Pacific Power _& Light Company .BLANK 2 .CENTER; Mike Latshaw <> March 1988 .! ------- .! Preface .! ------- .CHAPTER About This Manual EDTEM has evolved over the period of almost two years, and has experienced major rewrites at least twice (once since the last release). This will help to explain some inconsistencies (such as in prompting syntax, available online help, etc.). And, being an unassigned project on the author's part, little time has been given to its documentation - this is the first official user's manual written. This lack of documentation is also reflected in the near absence of online help - the author just has not had the time to keep a help facility up-to-date with all of the changes. .BLANK 1 As the base of EDTEM users has grown, it has become apparent that more documentation - manuals, online help, etc. - is a requirement. Without it, the editor will become a frustration to its user community. .BLANK 1 This submission is a first hopeful step towards a solution of the above dilema. Also, online help is being slowly upgraded. Two functions (Find, and Selective Find and Replace (R)) now have full online help support. This support is a prototype, having been developed only a week before this submission, and is by no means complete; but it does offer a glimpse as to the author's desired direction. .BLANK 1 The intended reader of this manual is, as stated, the user. This person is assumed to have a working understanding of EDT and its application keypad mapping. .BLANK 1 That EDTEM has so many capabilities above EDT is sometimes intimidating, especially to the newer users of a VAX. "I don't need to know all that" is a commonly heard statement. However, most of the capabilities of this editor were incorporated at the request of users - and, thus have legitimate reasons for existence. .BLANK 1 In an effort to avoid scaring off the reader by swamping him/her with all the whistles and bells up front, the first few chapters will deal only with the basics of EDTEM. .BLANK 1 Subsequent chapters deal with various topics, such as window/buffer operations, language support functions, and so forth. .BLANK 1 Finally, it will be noted that quite a few of the functions can be invoked from either the keyboard or the keypad. Initially, when the editor was first written, only the keyboard version of a keystroke existed. As I settled into everyday use of EDTEM, it became apparent that a subset of the functions were used much more often than others, and in addition, a large number of these oft-used features did not require any additional input (such as the "go to previous buffer" function). .BLANK 1 As these functions were used frequently, it was required to constantly bounce back and forth from keypad to keyboard, and back, again. Also, some people tend to move their eyes from keys to screen and back as they shift from keypad to a keyboard function. In an effort to reduce this right-hand and eye dance, these often-used features were also mapped to double-shifted () keystrokes on the keypad. .BLANK 1 Although, it might initially seem less efficient to execute three keystrokes (as opposed to two), to those at my site and others who have tried it, there is a definite improvement over the keyboard map method. .BLANK 1 Thus, I suggest learning the keypad version, if possible (or both). I believe you'll benefit in the long term. .! ------------ .! Introduction .! ------------ .CHAPTER So What Exactly is EDTEM? EDTEM (EDT EMulator) is a powerful TPU-based screen text editor which can be successfully employed by the novice user, the advanced programmer, and the site manager. .BLANK 1 The EDT-style application keypad mapping allows the beginner to use EDTEM in almost the same manner as screen mode EDT. .BLANK 1 The many window and buffer manipulation capabilities, as well as the language and VMS support features, give the programmer the ability to produce source code more quickly. .BLANK 1 And, the site manager can use the basic word processing features, such as auto-wrap and auto-indent modes, to prepare documents more quickly and easily. .BLANK 1 EDTEM is a windowing text editor with the ability to interface with the VMS environment under which it runs. This includes fetching additional files into the editing session, obtaining output from DCL commands, and interactive development of modules written in high-level languages, such as FORTRAN. .BLANK 1 Some of the ideas for features were borrowed from the EMACS series of editors, notably directory-driven file fetching. The interactive high-level language source development concepts were inspired by DEC's LSE. .BLANK 1 A few functions were adapted from DECUS and PAGESWAPPER submissions, such as the spelling checker and pattern searching. .BLANK 1 However, many of the concepts came from the user community, suggesting in great part both EDTEM's diversity and growing popularity. .BLANK 1 And, even the author contributed a few ideas... .BLANK 1 Here are some of the basic capabilities of EDTEM: .LIST .LIST ELEMENT; In its simplest sense, it emulates screen mode EDT .LIST ELEMENT; It can be used to edit any mixture of RMS files and library modules (directly from a library) on both the local and any remote node .LIST ELEMENT; It can replace edited library modules back into a library .LIST ELEMENT; Any number of buffers and/or windows may be created and employed by the user .LIST ELEMENT; Text can be easily moved between the files (via buffers and/or windows) of an editing session .LIST ELEMENT; Extensive searching and replacing of standard text, control characters, and patterns is supported .LIST ELEMENT; Basic word processing functions, such as fill, justify, margins, auto-wrap, auto-indent, etc., are supported .LIST ELEMENT; High level language features include comment framing and re-framing, inline compilation, and for some languages, interactive diagnostic support is present .LIST ELEMENT; Subprocesses may be spawned and entered without leaving the editor .LIST ELEMENT; DCL commands may be issued and captured for further editing .LIST ELEMENT; Checking of spelling is available .END LIST With all of the above functions come the myriad supporting capabilities, including extensive buffer/window commands, the ability to memorize keystrokes, and so on. .BLANK 1 As can be seen, this is already getting a bit complicated, so let's back up and start with the real basics. .! ------------------------------------------ .! Concepts And Other Things You Need To Know .! ------------------------------------------ .CHAPTER Concepts And Other Things You Need To Know .HEADER LEVEL The Application Keypad and Other Special Keys - A Name Glossary In this manual, there are some repeatedly referenced keys called out by something other than what is often stamped on that key. They include: .LIST .LIST ELEMENT; is the carriage return key .LIST ELEMENT; is the cursor up arrow key .LIST ELEMENT; is the cursor down arrow key .LIST ELEMENT; is the cursor left arrow key .LIST ELEMENT; is the cursor right arrow key .LIST ELEMENT; is the tab key .LIST ELEMENT; is the line feed key .LIST ELEMENT; is the space bar key .LIST ELEMENT; KPn, where n represents a number 0-9; these are the number keys on the application keypad .LIST ELEMENT; MINUS is the "-" key on the application keypad .LIST ELEMENT; COMMA is the "," key on the application keypad .LIST ELEMENT; PERIOD is the "." key on the application keypad .LIST ELEMENT; denotes the control key .LIST ELEMENT; _^ also denotes the control key .END LIST .HEADER LEVEL The Key and Shift Levels As in EDT, there exists in EDTEM the idea of a momentary shift key, affectionately labeled the "gold" key. In this manual, it is specified as and is mapped to PF1. .BLANK 1 Unlike EDT, EDTEM supports multiple maps of both the keyboard and the application keypad. In other words, pressing .BLANK 1 .INDENT +5 C .BLANK 1 results in one action, while entering .BLANK 1 .INDENT +5 C .BLANK 1 initiates a totally different function. .BLANK 1 If a key is mapped to level n (that is, the key is pressed n times), but not to level n+1, entering n+1key will result in nkey. That is, if EDTEM cannot find an assignment at the level indicated, it will search downward through lower levels until it finds a match (if any). .BLANK 1 The current level is reflected in the status line of the current buffer (unless the user has enabled brief mode, useful for slow-speed interfaces). .BLANK 1 Specifying a "letter" function (that is, a character on the main keyboard) is not case sensitive (c and C do the same thing). .HEADER LEVEL Prompts TPU, the language in which EDTEM was written, supports DCL line editing. In particular, it is possible to use the DCL line editing commands on the answers you enter in response to prompts. .BLANK 1 Only the last entry is recallable (as opposed to the normal 20-entry recall in DCL). .HEADER LEVEL Buffers and Windows When you invoke an editing session, EDTEM creates a storage region called a buffer to accept and hold the initial file you specified. .BLANK 1 EDTEM supports multiple buffers, and the contents of these regions may be anything you wish. For example, you can create empty buffers for doing scratch work; or, you can load other files into different buffers (a single buffer may also contain several files, but that's getting ahead of the game). .BLANK 1 Buffers in themselves are useless without a way to view them. Windows are the linkage between buffers and the screen. Each buffer may have one or more windows mapped to it. In the case of multiple windows mapped to the same buffer, the mapping can be over the same or different portions of the buffer. .BLANK 1 In turn, windows are mapped to different sections of the user's screen. As many windows as the screen can hold may be viewable at any one time. The only limitation is that a window must be mapped to all the columns of each screen line it occupies; that is, windows may not be mapped side-by-side. .BLANK 1 Windows may be of any size, vertically (subject to screen size, of course). EDTEM does give the user the ability to change the size of a window, but most of the time, EDTEM's mapping algorithm is quite suitable (which is to give each window, except the message window, approximately equally sized chunks of the screen; there are a few exceptions, but this rule is usually enforced). .BLANK 1 Buffers are identified by names (shown on the status line of the associated window(s)). The mapped (viewable) windows do not have names (they are simply portals to the screen for the named buffers). Thus, we will refer to the viewable sections on the screen by their buffer names. .! -------------- .! Obtaining Help .! -------------- .CHAPTER Obtaining Help There are several ways to summon online help: .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 H .BLANK 1 and a very brief synopsis of commands will be listed. .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 PF2 .BLANK 1 to display a keypad diagram for the base level (level <0>) keypad keystrokes .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 PF2 .BLANK 1 to display a keypad diagram of the level <1> keypad keystrokes .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 PF2 .BLANK 1 to display a keypad diagram of the level <2> keypad keystrokes .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 PF2 .BLANK 1 to display a keypad diagram of the level <3> keypad keystrokes .LIST ELEMENT; For those functions which indicate prompt level help is available (currently only Find, and Selective Find and Replace), press PF2 at any time for help with the current prompt. .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 ` (under the "~" on most VT220 keyboards) .BLANK 1 and then, enter the keystroke in question (such as R). A brief, one-line description of the keystroke will be displayed in the message window. .END LIST .BLANK 1 The keypad help files may be printed by specifying SYS__MANAGER:EDTEM.GOLD__%__HLP to a DCL print command. (They are also contained in the appendices of this manual.) .BLANK 1 The synopsis of commands is located in SYS__MANAGER:EDTEM.HLP. (This also is located in an appendix in the this manual.) .! ------------------ .! Starting A Session .! ------------------ .CHAPTER Starting A Session Now that we are talking the same language, let's start a simple session. The following section assumes use of the parent process method (that is, invocation of command procedure SYS__MANAGER:EDTEM (or, optionally, in non-library module cases, SYS__MANAGER:PRE__EDTEM). If you are employing the kept subprocess method (by use of command procedure SYS__MANAGER:EDTEM__START), then see the section on starting a kept editor. .HEADER LEVEL Starting A Session Using Parent Process Mode To edit a file, specify the command indicated by your site manager, followed by the file specification. If EDTEM is your editor command, then the command becomes .BLANK 1 .INDENT +5 EDTEM filespec .BLANK 1 The file specification may include a node name. By default, the modified buffer is written (upon session EXIT) to a file of the same name (including node), but of a new version number. (As an aside, it is more efficient to edit a remote file by specifying the node, than by SETting HOST to the node and editing it locally - TPU buffers the entire file locally, thus cutting down extensively on network activity.) .BLANK 1 TPU qualifiers such as READ__ONLY and RECOVER may be applied after the file specification. .BLANK 1 A module may edited directly in a library (without having to issue a librarian command to extract it, first). To do so, specify .BLANK 1 .INDENT +5 EDTEM library_\modulename .BLANK 1 The backslash is a required part of the syntax, as this informs EDTEM to search the library before the backslash for the module named after the backslash. Also, don't forget to include the library's file type, such as .TLB (the VMS default is .OLB). In addition, a file type for the module name may be included (such as A.FOR). The file type of a library module is ignored when loading the module, but it is employed when performing an inline compile (described in a later chapter). .BLANK 1 The initial screen produced by EDTEM consists of the following: .LIST .LIST ELEMENT; A buffer containing the contents of your file specification. This buffer is called MAIN, and is mapped to the screen by a window which uses all but the last three lines of the CRT. (If you are editing a library module, the buffer name will be the same as the module name. This will still be referred to as the "main" buffer.) .LIST ELEMENT; A status line showing the state of buffer MAIN. On the left side is the name of the buffer. The lower case word "write" indicates that any modification to the buffer will cause its contents to be written to the file specification shown on the right (unless the user QUITs the session). (If you are editing a library module, by default you will be placed into "read" mode, meaning that modifications for the buffer will not be reflected in the module in the library. There is a way to write the module directly back into the library from EDTEM, and is covered in a later chapter. Also, the name of the library between parentheses is the declared file specification displayed on the status line.) .BLANK 1 All other attributes of a buffer are displayed by exception. That is, there is a set of default characteristics which are not displayed - only if there is an exception to the default is it shown on the status line. .BLANK 1 As an example, a typical exception displayed on a status line is the direction sense, "reverse". The normal (and default) direction is forward. If "reverse" is shown, then the current direction of the current buffer is upwards, or from right-to-left. The absence of "reverse" implies downward, or left-to-right direction. .LIST ELEMENT; A buffer into which user messages and assistance is written during the course of the session. The mapped window is two lines in length. There is no status line associated with this buffer, which is called the message buffer (and often referred to as the message window). .END LIST The cursor is placed in the upper left hand corner of buffer MAIN's window, which in turn is mapped to the top of the buffer. The user may now begin entering commands. .HEADER LEVEL Starting A Kept Editor Session Much of the above also applies with this mode, except: .LIST .LIST ELEMENT; It is necessary to first create the kept subprocess by invoking command procedure SYS__MANAGER:EDTEM__START. .LIST ELEMENT; This mode does not remember previous session filetypes .LIST ELEMENT; The transition from parent process to invocation of the editor (for starting a new session) is a two-step process: .LIST .LIST ELEMENT; You must first attach to the kept subprocess (by invoking procedure SYS__MANAGER:EDTEM__START) .LIST ELEMENT; Then, the file must be specified .END LIST .END LIST .! ---------------- .! Ending A Session .! ---------------- .CHAPTER Ending A Session Once you have made your modifications (if any), you need to know the ways of ending an editing session. .HEADER LEVEL Quiting A Session Without Saving Any Changes .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 Q .LIST ELEMENT; If you did make any changes (even if the buffer now looks the same as when you started), you will be prompted as to the certainty of this action. The modified, writable buffers are listed on the bottom line. .BLANK 1 If you wish to abort the action (that is, remain in the session), enter .BLANK 1 .INDENT +5 N .BLANK 1 Otherwise, enter .BLANK 1 .INDENT +5 Y .BLANK 1 (upper or lower case - also, here, as in all other circumstances requiring a non-keypad or non-special character response to a prompt in the message window, all answers are terminated by pressing ). .BLANK 1 A variation on quitting a session is to enter .BLANK 1 .INDENT +5 Q .BLANK 1 Here, the editor will bypass any "are you sure" checking - that is, any modified buffers are not reported, and you are not given a second chance to cancel the action. .END LIST .HEADER LEVEL Exiting A Session Exiting a session by default implies that you wish to save any changes made to ANY of the buffers whose current output mode is "write". (Buffers containing library modules are never written by exiting - see the next section.) .BLANK 1 To exit a session, enter one of the following keystrokes: .LIST .LIST ELEMENT; E .LIST ELEMENT; F10 .BLANK 1 (function key F10, VT200 mode, only) .LIST ELEMENT; Z .BLANK 1 (not effective when in inline source repair mode) .END LIST A special test of buffer MAIN is performed, providing one the opportunity of saving the contents of that buffer in the case where MAIN has been set to readonly mode (just about every programmer has come across the time when he/she thought the primary buffer was set to "write" mode, made hours of changes, and then exited the session, only to lose everything). .BLANK 1 As in quitting a session, there exists a variation on exiting the editor. Here, the keystroke is .BLANK 1 .INDENT +5 E .BLANK 1 This mode will bypass the checking of your main editing buffer (buffer MAIN), thus not permitting a "second chance" to save the contents if that buffer was (perhaps accidentally) set to readonly mode. .HEADER LEVEL Exiting A Library Module Session Buffers containing library modules are always set to "read" output mode. This status for such buffers cannot be set to "write". Rather, an alternate method exists for saving the modifications made to a library module (that is, replacing the module back into the library directly from the editor): .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 O (the letter O) .BLANK 1 This command will cause the contents of the current buffer to be replaced into the library (shown at the right on the status line) under the module's (buffer's) name .LIST ELEMENT; Quit or exit the session, as described above in the previous sections .END LIST .HEADER LEVEL Leaving A Kept Editor Session If you are employing the kept subprocess editor method (that is, you invoked command procedure SYS__MANAGER:EDTEM__START instead of SYS__MANAGER:EDTEM or SYS__MANAGER:PRE__EDTEM), then it is possible to drop out of the editing session back to your parent process, without quiting or exiting the session. .BLANK 1 To perform this action, enter .BLANK 1 .INDENT +5 X .BLANK 1 This will place you in control of the parent process of the spawned subprocess currently (and still) running the editor. .BLANK 1 To continue the editing session, simply re-invoke command procedure SYS__MANAGER:EDTEM__START. The screen will be repainted to the condition in which you last left the editor. .! ----------------------------------- .! Bringing Other Files Into A Session .! ----------------------------------- .CHAPTER Bringing Other Files Into A Session More than one file may be viewed and/or edited during a particular session. In addition library modules may also be viewed and/or edited. .BLANK 1 The load target may be either the current position in the current buffer, or a new buffer. .BLANK 1 The desired file or library may be located on any node. .HEADER LEVEL Defaults Many of the following methods require specifying the desired file or library_\module by name. When the user begins the fetch command, a summary of defaults will be listed in the message window. The specification on the left indicates current default node (listed if not the local entity), device/directory, and file type. Between the parentheses is the current default library (initially null if no library has been accessed). And, the field following the backslash is the current default file type applied to library modules (the file type takes on importance only when performing an inline compilation). .BLANK 1 These two components of the default summary are maintained separately: that is, including a library module has no effect on the regular, left-hand default. The converse is also true: fetching a regular file has no effect on the current library defaults. .BLANK 1 These defaults allow the user to omit parts of a file and/or library module specification, where a particular component of the specification is the same as the default. .PAGE For example, assume the default summary is .BLANK 1 .INDENT +5 USER:[DOE].FOR () .BLANK 1 Here is a sample series of file and library module fetches (by name specification): .BLANK 1 .LEFT MARGIN +5 ABC loads USER:[DOE]ABC.FOR .BLANK 1 NODE1::USER:[DEF]XYZ loads NODE1::USER:[DEF]XYZ.FOR .BLANK 1 A123 loads NODE1::USER:[DEF]A123.FOR .BLANK 1 B123.COM loads NODE1::USER:[DEF]B123.COM .BLANK 1 [GHI]C loads NODE1::USER:[GHI]C.COM .BLANK 1 SYS$LIBRARY:FORSYSDEF.TLB_\$SMGDEF loads module $SMGDEF from library SYS$LIBRARY:FORSYSDEF.TLB .BLANK 1 _\$ACCDEF loads module $ACCDEF from library SYS$LIBRARY:FORSYSDEF.TLB .BLANK 1 ::USER1:[NNN]C loads USER1:[NNN]C.COM .BLANK 1 NODE2::SYS$LIBRARY:MYLIB.TLB_\MYMODULE.FOR loads module MYMODULE from library NODE2::SYS$LIBRARY:MYLIB.TLB (and explicitly assigns a file type of .FOR to the module - the default library module file type is also set to .FOR if the loading operation was not "include into current buffer") .BLANK 1 [XXX]N12 loads USER1:[XXX]N12.COM, leaving a default of USER1:[XXX].COM (NODE2::SYS$LIBRARY:MYLIB.TLB;) .LEFT MARGIN -5 .BLANK 1 Use defaults with caution when changing default nodes - logical names may not translate identically on different nodes. .HEADER LEVEL Loading A File Into A New Buffer There are two methods by which a file may be loaded into a new buffer. .BLANK 1 Regardless of the method employed, a new buffer and window pair is created for the file, the contents are loaded into the new buffer, and the cursor is positioned to the top of that buffer (making the new buffer the current buffer). .HEADER LEVEL +1 Fetching By Naming .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 I .LIST ELEMENT; Respond to the prompt by entering the name of the file. Defaults are applied as described, above. (Just pressing will abort the operation.) .LIST ELEMENT; The file will be collected and displayed in its own buffer .END LIST .HEADER LEVEL Fetching By Pointing .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 D .BLANK 1 (at this point, the operation may be aborted by pressing ) .LIST ELEMENT; In response to the prompt, enter .BLANK 1 .INDENT +5 a DIRECTORY command .BLANK 1 (with or without qualifiers) targeted to the directory containing the desired file. .LIST ELEMENT; A DCL__COMMAND buffer containing the output of the DIRECTORY command will be displayed. Position the cursor over any portion of the file's name, and then enter either .BLANK 1 .INDENT +5 F (keyboard method) .BLANK 1 or .BLANK 1 .INDENT +5 ENTER (keypad method) .LIST ELEMENT; The DCL__COMMAND buffer will be removed from the screen, and a new buffer containing the file will be shown. .END LIST; Note that it is not necessary to reissue the DIRECTORY command each time to produce the directory display: .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 B .BLANK 1 or .BLANK 1 .INDENT +5 KP7 .LIST ELEMENT; Press .BLANK 1 .INDENT +5 KP4 .BLANK 1 or .BLANK 1 .INDENT +5 KP5 .BLANK 1 until the buffer "DCL__COMMAND" is listed on the hi-lighted status line .LIST ELEMENT; Press ENTER .END LIST The DCL__COMMAND buffer will reappear on the screen, ready for your use. (Some functions use buffer DCL__COMMAND for intermediate steps, so the above short cut may not always work if you have issued other commands before recalling the DCL__COMMAND buffer.) .HEADER LEVEL -1 Loading A File Into An Existing Buffer .LIST .LIST ELEMENT; Position the cursor to the position at which the loading should begin .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 I .LIST ELEMENT; Enter a file specification in response to the prompt (press to abort the operation). Again, the listed defaults apply here. .END LIST .HEADER LEVEL Loading A Library Module Into A New Buffer As in the case of regular files, there are two methods of loading library routines into new buffers. .HEADER LEVEL +1 Fetching By Naming .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 I .LIST ELEMENT; In response to the prompt, specify the target module using library_\module syntax (as illustrated in the Defaults section). Again, the operation may be aborted at this point by simply pressing . .END LIST .HEADER LEVEL Fetching By Pointing .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 D .LIST ELEMENT; Respond to the prompt by issuing .BLANK 1 .INDENT +5 a DCL LIBRARY/LIST command .BLANK 1 (with or without qualifiers) on the target module's library. (Press at this point to abort the operation.) .LIST ELEMENT; Position the cursor anywhere over the module name in the resultant listing in buffer DCL__COMMAND. .LIST ELEMENT; Enter either .BLANK 1 .INDENT +5 F .BLANK 1 or .BLANK 1 .INDENT +5 ENTER .END LIST In either case, the library module's content will be displayed on the screen. .HEADER LEVEL -1 Loading A Library Module Into An Existing Buffer .LIST .LIST ELEMENT; Place the cursor at the position at which the load is to begin. .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 I .LIST ELEMENT; Respond by entering the module using the library_\module syntax as illustrated in the Defaults section. Again, the operation may be aborted by simply pressing . .END LIST .! ------------------------------------------------ .! Writing Buffers To Files, Libraries and Printers .! ------------------------------------------------ .CHAPTER Writing Buffers To Files, Libraries and Printers The entire contents (or a selected portion) of a buffer may be written to either a file or a printer. .BLANK 1 In addition, if the buffer was originally extracted from a library (via a I library extraction), it may also be directly replaced into the same library. .BLANK 1 All operations may run across node boundaries. .HEADER LEVEL Writing To File Or Printer .LIST .LIST ELEMENT; If the entire buffer is to be written, then skip the following special steps. Otherwise, if only a selected portion of the buffer is to be written, then: .LIST .LIST ELEMENT; Postion the cursor over the first (or last) character of the range to be selected .LIST ELEMENT; Press .BLANK 1 .INDENT +5 PERIOD .BLANK 1 on the application keypad .LIST ELEMENT; Position the cursor beyond the last (or before the first) character in the desired range. The hi-lighted region represents the range which will be written .END LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 P .BLANK 1 (press to abort (remember to cancel the (keypad PERIOD), it is possible to perform such operations as Invert Case (KP1) on it. .HEADER LEVEL Examples .LIST .LIST ELEMENT; Search for "ABC" in the current direction .LEFT MARGIN +5 .BLANK 1 PF3 .BREAK ABC .BREAK .LEFT MARGIN -5 .LIST ELEMENT; Search for "[T" in the reverse direction .LEFT MARGIN +5 .BLANK 1 PF3 .BREAK PF1 .BREAK _^[[T .BREAK KP5 .LEFT MARGIN -5 .LIST ELEMENT; Search for "DUA0" or "DUA1" in the forward direction .LEFT MARGIN +5 .BLANK 1 PF3 .BREAK KP7 .BREAK DUA% .BREAK KP4 .LEFT MARGIN -5 .END LIST .HEADER LEVEL -1 Selective Find And Replace This function consists of three phases: .LIST .LIST ELEMENT; Specification of the target string .LIST ELEMENT; Specification of the replacement string .LIST ELEMENT; Specification of the action to be performed on each match .END LIST To invoke the function, enter .BLANK 1 .INDENT +5 R .BLANK 1 Online help is available at any time. To obtain additional aid regarding a prompt, press .BLANK 1 .INDENT +5 PF2 .BLANK 1 The first step is to specify a search string. All three modes of searching (normal, control character, pattern) may be employed. The possible actions at this point are identical to that of the basic Find function, and won't be detailed, here. .BLANK 1 Once you have entered a search string (assuming you did not abort the operation), you will be prompted for a primary replacement string .BLANK 1 The replacement string is specified in much the same fashion as the target (search) string, except that pattern mode cannot be employed (that is, only normal or control character strings may be used). .BLANK 1 To enter a normal replacement string, enter the string. Then .LIST .LIST ELEMENT; Press either .BLANK 1 .INDENT +5 .BLANK 1 or .BLANK 1 .INDENT +5 ENTER .BLANK 1 to initiate the search in the CURRENT direction, or .LIST ELEMENT; Press .BLANK 1 .INDENT +5 KP4 .BLANK 1 to force the search in the FORWARD direction, or .LIST ELEMENT; Press .BLANK 1 .INDENT +5 KP5 .BLANK 1 to force the search in the REVERSE direction .END LIST The first match found (if any) will be shown in reverse video. .BLANK 1 The message window will show the following (from left to right): .LIST .LIST ELEMENT; The search string .LIST ELEMENT; The primary replacement string .LIST ELEMENT; The alternate replacement string (initially the same as the primary replacement string) .END LIST At this point, there are a sizable number of options at your disposal: .LIST .LIST ELEMENT; Replace the match with the primary replacement string by pressing .BLANK 1 .INDENT +5 .LIST ELEMENT; Or, replace the match with a one-time normal string entered from the keyboard (terminated with ) .LIST ELEMENT; Or, replace the match with an already-loaded alternate replacement string by pressing .BLANK 1 .INDENT +5 PF3 .LIST ELEMENT; Or, define the alternate replacement string and replace the match with it (in one operation). This is done by entering the new alternate replacement string (from the keyboard) and terminating the input by pressing .BLANK 1 .INDENT +5 PF3 .BLANK 1 (instead of pressing ) .BLANK 1 The string just entered becomes the alternate replacement string, until overriden by another one. .BLANK 1 Only normal strings may be specified using this method. .LIST ELEMENT; Or, define the alternate replacement string in a manner which allows specification of control characters as part of the string. To do it this way, first press .BLANK 1 .INDENT +5 ENTER .BLANK 1 At this point, the procedure becomes the same as when you were defining the primary replacement string. You can .LIST .LIST ELEMENT; Enter a normal string, or .LIST ELEMENT; Enter a control character string (using PF1), or .LIST ELEMENT; Abort the redefinition step (using Z). If this action is used, the current match will be left intact, and the search for another match will resume. .END LIST .LIST ELEMENT; Or, delete the matched string by pressing .BLANK .INDENT +5 MINUS (on the keypad) .LIST ELEMENT; Or, invert the matched field's case by pressing .BLANK 1 .INDENT +5 KP1 .LIST ELEMENT; Or, force the matched field's case to lower case by pressing .BLANK 1 .INDENT +5 KP2 .LIST ELEMENT; Or, force the matched field's case to upper case by pressing .BLANK 1 .INDENT +5 KP3 .LIST ELEMENT; Or, cause all remaining matches to be acted upon by the same command as was last issued. This done is by pressing .BLANK 1 .INDENT +5 PF4 .BLANK 1 For example, if the last keystroke in the current find-and-replace session was to press KP2 to set a matched field to lower case, then all remaining matches in the buffer (in the current direction) will have their fields set to lower case. .LIST ELEMENT; Or, force the search direction to be FORWARD by pressing .BLANK 1 .INDENT +5 KP4 .BLANK 1 The first matched field in the new direction will be located and hi-lighted. .LIST ELEMENT; Or, force the search direction to be REVERSE by pressing .BLANK 1 .INDENT +5 KP5 .BLANK 1 The first matched field in the new direction will be located and hi-lighted. .LIST ELEMENT; Or, don't perform any alteration on the current match, and locate the next match by pressing any other application keypad key (such as KP8) .LIST ELEMENT; Or, abort the find-and-replace session by pressing .BLANK 1 .INDENT +5 Z .BLANK 1 The cursor will be left at the previously visited match (or at the original position, if you abort on the first match). .END LIST KP9 performs the same action as , thus allowing the right hand to remain on the keypad. .BLANK 1 Upon termination of the function, a summary of replaced matches is shown in the message window. If the function was terminated due to no more matches being found, the cursor is positioned to its location at the start of the operation. .HEADER LEVEL Resuming A Selective Find And Replace Operation Sometimes, while in a find-and-replace operation, you may wish to temporarily drop out of the sequence to perform some other action (such as correcting a mispelled word you happen to spot), and then resume the function at the point of suspension. .BLANK 1 Assuming you have just aborted a find-and-replace action, and now wish to resume, enter .BLANK 1 .INDENT +5 R .BLANK 1 You will be positioned at the match last visited, where EDTEM will await your next replacement command. .HEADER LEVEL Producing A Summary of Search String Matches There are times when it is convenient to construct a summary of all the occurences of a particular search string (normal, control character, or pattern), and the respective location of each match. This is done by entering .BLANK 1 .INDENT +5 PF3 .BLANK 1 At this point, you then enter a string in the same manner as you do with with the simple Find operation (PF3). EDTEM will produce and transport you to a buffer containing a summary of all located matches to the specified string. .HEADER LEVEL Limiting The Search Scope It is possible to restrict the searching operations described in this chapter to a specified range of columns. This is sometimes useful in tabular output, for example. .BLANK 1 The following steps are prescribed to effect such a mode: .LIST .LIST ELEMENT; Position the cursor (on any line) to the first column to be included in the search range and enter .BLANK 1 .INDENT +5 V .LIST ELEMENT; Position the cursor to the last column to be included in the search range and enter .BLANK 1 .INDENT +5 V .LIST ELEMENT; To enable the specified column search range, enter .BLANK 1 .INDENT +5 V .END LIST A column range marker is shown with an underscore. The latest assigned marker can be cancelled by issuing .BLANK 1 .INDENT +5 V .BLANK 1 The other marker (if it exists) can be cancelled by repeating the above keystroke. Both markers can be simulataneously cancelled by entering .BLANK 1 .INDENT +5 PERIOD .BLANK 1 This method of marking is employed by several functions in EDTEM, by the way. .BLANK 1 The search range covers all lines which have subsets within the specified column area. .BLANK 1 When limited search range mode is active, the status line of each visible window will show "ls". .BLANK 1 The mode can be revoked by entering .BLANK 1 .INDENT +5 PERIOD .HEADER LEVEL Search Function Interaction The Find, and Selective Find and Replace functions both employ the same algorithm for specifying search strings. In fact, they remember each other's current search target. This means, for example, that if you use the Selective Find and Replace function and specify a search string of "ABC", after you terminate the function, you may press PF3 (Find Next) and be transported to the next match of the string "ABC". The reverse is not supported, though, as Selective Find and Replace always prompts for a new search string. .! -------------- .! DCL Operations .! -------------- .CHAPTER DCL Operations .HEADER LEVEL Issuing A DCL Command Any DCL command which produces non-interactive output to device SYS$OUTPUT may be issued from the editor (assuming the user has the privileges to perform such an action). Enter .BLANK 1 .INDENT +5 D .BLANK 1 and respond to the prompt with your DCL command. A buffer (called DCL__COMMAND) will be displayed showing the results of your action, and the cursor will be positioned to that buffer. The contents of the buffer are available for your further use. .BLANK 1 As a reminder, several specialized uses of this feature have already been discussed: .LIST .LIST ELEMENT; Fetching a file from a directory listing .LIST ELEMENT; Fetching a library module from the output of a LIBRARY/LIST command .END LIST It is also possible to specify a range (selected with the normal method of pressing keypad PERIOD and moving the cursor to form an inverted video map of the range) within a buffer containing DCL statements, or the entire buffer. To use .LIST .LIST ELEMENT; Position to the buffer containing the DCL statments .LIST ELEMENT; If a subset of the buffer is to be employed, select the range .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 D .END LIST The results will be displayed in buffer DCL__COMMAND, which will become your current buffer. .BLANK Note that the submission of the DCL statements is done in the context of a subprocess. This implies that one be aware of current default directory, UIC, SYS$INPUT, etc. In addition, the DCL statement EXIT will cause termination of the subprocess executing the commands. So, avoid EXIT as a DCL command, unless necessary (you'll pay the penalty of subprocess activation overhead on your next DCL-related command during the session, otherwise). .HEADER LEVEL Spawning A Subprocess It is possible to temporarily leave an editing session and perform some other action at DCL level. The method employed is to spawn a subprocess from EDTEM. To do this (assuming you have the necessary privileges), enter .BLANK 1 .INDENT +5 + .BLANK 1 At this point you can either .LIST .LIST ELEMENT; Press .BLANK 1 .INDENT +5 .BLANK 1 causing you to be placed at the DCL level of the spawned subprocess. This method permits one to perform several activities before returning to the editing session (which is currently in hibernation). To abort the subprocess and return back to EDTEM, type .BLANK 1 .INDENT +5 LOGOUT .LIST ELEMENT; Or, you can issue the DCL command directly, which will place you under the control of the specified action. When that command's activity has completed, you will automatically be returned to EDTEM. .LIST ELEMENT; Or, you can enter Z to abort the command. .END LIST .HEADER LEVEL Which Should I Use? A spawned subprocess can handle interactive (two-way input/output), whereas issuing a simple DCL command using D or D can usually accept only non-interactive operations. .BLANK 1 Translated into an example, + can be used to run the MONITOR utility, but D cannot. .BLANK 1 D or D has an advantage of being able to capture output and place it into a buffer; you cannot do that by spawning a subprocess. .HEADER LEVEL Moving Between Parent Process and Subprocesses Logging out of a subprocess is not the only way to return to the parent process. The DCL command ATTACH provides an alternative, and has the benefit of leaving the subprocess around for further use. .BLANK 1 The ATTACH command requires knowledge of the parent's name or PID. Also, ATTACH will not properly function when the user has changed the UIC group of the subprocess to something other than that of the parent process. .BLANK 1 To make it easier to reattach to the parent process from a spawned subprocess, the command procedure APR can be used. Assuming that one has defined the symbol APR to invoke the procedure, here are the capabilities: .LIST .LIST ELEMENT; Typing "APR" will reconnect the user to the parent process. .LIST ELEMENT; Typing "APR *" will produce a process tree. .LIST ELEMENT; Typing "APR n" will connect one to a subprocess of the form username__n (such as LATSHAW__3). If the subprocess was not in existence, it will be created. .END LIST So, the basic steps outlined thus far are: .LIST .LIST ELEMENT; Create the subprocess by using + .LIST ELEMENT; Return to the parent process by entering .BLANK .INDENT +5 APR .BLANK 1 from the DCL prompt of the subprocess. .END LIST OK, but how do I get back to the subprocess, again, you ask? Try entering .BLANK 1 .INDENT +5 X .BLANK 1 EDTEM will prompt you for the name of the subprocess to which you wish to attach. Respond with the full subprocess name (such as LATSHAW__3). .BLANK 1 To get back to the parent, enter APR. .BLANK 1 Now, to get back to the subprocess this SECOND time, enter X. However, you'll not be prompted for a subprocess name, as the command has memorized the name from the first time it was called. From this point on, the user can toggle from parent to subprocess and back by using the pair of X and APR. .BLANK 1 More than one subprocess can be started and maintained by EDTEM (by invoking +). To manually return to a specific subprocess (even if it was not started by EDTEM...), enter .BLANK 1 .INDENT +5 + .BLANK 1 This function will place you into the named subprocess. It will also alter the memorized subprocess name employed by X, so that subsequent invocations of X will transport you to the newly specified subprocess. .BLANK 1 If you read an earlier chapter which talked about kept editors, you saw mention of the use of X in an apparently different fashion. To avoid confusion, here is the a brief description of the algorithm employed by that command. .BLANK 1 X first attempts to attach to the parent process. This is the function which happens when returning from a kept editor to the parent level and is the effect described in the earlier chapter. .BLANK 1 If the user is already at parent level, an attempt is made to reattach to a memorized subprocess. On the first pass, this named subprocess will of course be undefined - this is why the user is prompted when he/she attempts the first re-connection to the subprocess. .BLANK 1 Finally, if the memorized subprocess no longer exists, an error message is displayed and control is returned to the user. (Unfortunately, display of the error message is all that TPU performs - it does not signal an error, so I have no way of recognizing the condition and asking for a substitute subprocess name.) .BLANK 1 End of technical discussion. .BLANK 1 With the above in mind, another possibility for X falls into place. Start up a subprocess (via +). Use APR to return the parent and then return to the new subprocess by employing + (so that the memory of X points to the new guy). In that subprocess start up another EDTEM session. Now, enter X until you get the point. .! ------------------------- .! Special Display Functions .! ------------------------- .CHAPTER Special Display Functions .HEADER LEVEL Auto Scrolling Auto scrolling is a mode by which the text in the current buffer is made to continuously scroll (on its own), until either the user issues a command to stop the action, or the buffer boundary (in the current direction) is reached. .BLANK 1 To invoke, press .BLANK 1 .INDENT +5 ENTER .BLANK 1 The text will continue to scroll until one of the above-mentioned conditions is encountered. .BLANK 1 To pause the scrolling action, press .BLANK 1 .INDENT +5 ENTER .BLANK 1 Subsequent depressions of that key will toggle the pause/scroll condition. .BLANK 1 To force the scroll go to in the FORWARD direction, press .BLANK 1 .INDENT +5 KP4 .BLANK 1 To force the scroll go to in the REVERSE direction, press .BLANK 1 .INDENT +5 KP5 .BLANK 1 Pressing any other key will abort the mode. .HEADER LEVEL Scrolling Modes .LIST .LIST ELEMENT; Jump / Smooth Scrolling .BLANK 1 To toggle the CRT between these modes, enter .BLANK 1 .INDENT +5 KP1 .LIST ELEMENT; Normal / VAXstation Scrolling .BLANK 1 By default, scrolling is performed by "pulling" or "pushing" lines of text up or down the screen. On normal CRTs, this method of hardware scrolling is faster, and is easier for the eye to follow. .BLANK 1 High-speed CRT interfaces, such as those used on the VAXstation, often can benefit from simply repainting the window, rather than scrolling it (especially if the scrolling is done in software). .BLANK 1 To toggle this mode, enter .BLANK 1 .INDENT +5 S .BLANK 1 When VAXstation scrolling mode is in effect, each scroll command (KP8) causes the entire current block of viewable text to be scrolled just out of sight (as opposed to moving MOST of the text out of sight, which is the action in normal mode). .BLANK 1 The default is normal scrolling. However, if the name of the section file is changed from EDTEM.TPU$SECTION to VWS__EDTEM.TPU$SECTION, then the default at session start will be VAXstation scroll mode. .END LIST .HEADER LEVEL Displaying Non-Printable Characters One of the weaknesses of TPU is that it does a rather poor job of displaying non-printable characters. As an effort to provide a partial solution, EDTEM has a feature which parses the current buffer and produces a buffer displaying non-printable characters in "control-letter" terminology (the same idea as employed in control strings). .BLANK 1 However, instead of showing a tab as "_^I", EDTEM displays a tab as reverse-video I in the translation buffer. The same method is applied to all control characters. This way, the one-to-one correspondance of character-on-screen to character-in-buffer is maintained. .BLANK 1 To translate the current buffer, enter .BLANK 1 .INDENT +5 ENTER .BLANK 1 At the end of the translation, you will be positioned into buffer TRANSLATION, where you may roam at will. The original (source) buffer is left unchanged. .BLANK 1 A word of warning - do not use this function on non-text files. The translation algorithm is quite slow when it works on a buffer containing hundreds of control characters (we're talking loads of minutes, here). .HEADER LEVEL Brief Mode A brief (expert users) mode can be enabled by entering .BLANK 1 .INDENT +5 B .BLANK 1 When in brief mode, much non-esential (cosmetic) output produced by EDTEM is suppressed (such as echoing on the status line each time that key is pressed). This can be useful when slower communications lines are employed, for example. .BLANK 1 This is a toggle keystroke: entering it again will restore the normal mode of operation. By default, brief mode is disabled. .! ------------------------- .! Special Buffer Operations .! ------------------------- .CHAPTER Special Buffer Operations .HEADER LEVEL Going To A Line Within A Buffer Sometimes, it is convenient to reference buffer positions by line number. For example, many compilers produce summaries which call out line numbers. EDTEM provides a function which allows the user to position to a given line number within a buffer. To use, enter .BLANK 1 .INDENT +5 L .BLANK 1 and then enter the target line number. .BLANK 1 An additional tool under this topic is the ability to display the current cursor position in terms of a line number. To use, enter .BLANK 1 .INDENT +5 S .BLANK 1 This summary display shows .LIST .LIST ELEMENT; Row within the window .LIST ELEMENT; Column within the window .LIST ELEMENT; Current buffer line .LIST ELEMENT; Total number of lines in the buffer .LIST ELEMENT; Current offset from beginning of current line in buffer .END LIST .HEADER LEVEL Removing Non-Printable Characters From A Buffer There are times when it is nice to strip commonly occuring control characters from a file (a good example is a runoff output file). .BLANK 1 EDTEM has a feature which will remove the following control characters from the current buffer: .LIST .LIST ELEMENT; Null .LIST ELEMENT; Line feed .LIST ELEMENT; Carriage return .END LIST To initiate the action, enter .BLANK 1 .INDENT +5 K .HEADER LEVEL Triming Trailing White Spaces EDTEM provides two methods for doing this one. .BLANK 1 To remove trailing blanks and tabs from the current line, enter .BLANK 1 .INDENT +5 } .BLANK 1 To remove trailing blanks and tabs from the entire buffer, enter .BLANK 1 .INDENT +5 { .HEADER LEVEL Upper Case Conversion It is possible to specify that a given range within the current buffer have all its characters set to upper case. The range can be specified via one of the following three modes: .LIST .LIST ELEMENT; Use keypad PERIOD and move the cursor to envelop the desired area, or .LIST ELEMENT; Mark a rectangular area by using the V keystroke (see the section on Rectangular Cut and Paste), or .LIST ELEMENT; If neither of above two are employed, the current word (up to the cursor position) becomes the applied range. If the cursor is between words, the previous word becomes the default target. .END LIST To invoke the function, enter .BLANK 1 .INDENT +5 U .HEADER LEVEL Lower Case Conversion It is possible to specify that a given range within the current buffer have all its characters set to lower case. The range can be specified via one of the following three modes: .LIST .LIST ELEMENT; Use keypad PERIOD and move the cursor to envelop the desired area, or .LIST ELEMENT; Mark a rectangular area by using the V keystroke (see the section on Rectangular Cut and Paste), or .LIST ELEMENT; If neither of above two are employed, the current word (up to the cursor position) becomes the applied range. If the cursor is between words, the previous word becomes the default target. .END LIST To invoke the function, enter .BLANK 1 .INDENT +5 L .HEADER LEVEL Text Compression It is possible to specify that a given range within the current buffer have all occurences of multiple spaces and tabs be replaced with a single space. The range can be specified via one of the following three modes: .LIST .LIST ELEMENT; Use keypad PERIOD and move the cursor to envelop the desired area, or .LIST ELEMENT; Mark a rectangular area by using the V keystroke (see the section on Rectangular Cut and Paste), or .LIST ELEMENT; If neither of above two are employed, the current line (minus the leading whitespace forming the left indentation) becomes the applied range. .END LIST To invoke the function, enter .BLANK 1 .INDENT +5 .HEADER LEVEL Column Rulers Back in the old days, one used special coding paper with marked columns to develop program displays or output. Thanks to the modern miracle of CRTs, one can do it faster on the screen with a text editor. But, we still need the steadying influence of marked columns to help out on the display coding (or for just plain spreadsheet-like tabular reports, for that matter). .BLANK 1 To insert a ruler into the current buffer (at the current position), enter .BLANK 1 .INDENT +5 / .BLANK 1 To instead display the ruler on the status line of the current buffer (thereby not upsetting the contents of the buffer), enter .BLANK 1 .INDENT +5 _\ .BLANK 1 This second method will have its ruler erased whenever any action forces an update to the buffer's status line. .HEADER LEVEL Rectangular Cut And Paste EDTEM provides a method of removing and/or copying a defined rectangular piece of text from the current buffer. .BLANK 1 The function is not perfect: any tabs on a line which contributes a portion of the rectangle will often upset the desired effect. Specifying a rectangle which includes a portion beyond the end of a line may also not work quite as you expected. .BLANK 1 However, if you observe the following rules, you should have no problems: .LIST .LIST ELEMENT; Do not use tabs in the buffer. EDTEM supports a simulated tab mode (which employs spaces). It is recommended that you use that mode for all editing, if possible (see the chapter on word processing features). .LIST ELEMENT; Cut only rectangles which have no ragged right edges. That is, the right boundary of the rectangle should not extend beyond the end of any line. Otherwise, EDTEM will be forced to pad the lines with enough blanks to fill out the rectangle. .END LIST To mark a rectangle coordinate, position the cursor to any corner of the rectangle and enter .BLANK 1 .INDENT +5 V .BLANK 1 An underscore will mark the coordinate just posted. A rectangle is fully marked when two diagonally opposite corners have been marked. .BLANK 1 Only two markers are permitted at any one time. Issuing a third marking command will cause the first mark to be lost. .BLANK 1 To cancel the latest existing marker, enter .BLANK 1 .INDENT +5 V .BLANK 1 The other marker (if it exists) can be cancelled by using the same command. .BLANK 1 Both markers may be cancelled simultaneously be entering .BLANK 1 .INDENT +5 PERIOD .BLANK 1 Once the rectangle has been defined, cut out the area by entering .BLANK 1 .INDENT +5 K .BLANK 1 Any text to the right of the cut region will be pulled to the left to fill in the gap. .BLANK 1 To paste the cut region into a buffer (it doesn't have to be the same buffer), position the cursor to the target rectangle's upper left coordinate and enter .BLANK 1 .INDENT +5 K .BLANK 1 If the editing mode of the buffer is INSERT, the rectangle of text will be inserted at the cursor. Otherwise, any text in the target rectangle is overlayed. .HEADER LEVEL Lateral Text Shifting EDTEM has the capability to shift a block of text laterally either to the left or to the right. The unit of shifting is a tab (real or simulated, depending on the current tab mode). .BLANK 1 To invoke: .LIST .LIST ELEMENT; Position the cursor onto the first line to be shifted, and move it to tab stop representing the base of the shift. This is the left-most point from which "tabs" will either be added or deleted. Then enter .BLANK 1 .INDENT +5 V .BLANK 1 The position will be marked with an underscore. .LIST ELEMENT; Position the cursor onto the last line to be shifted (the column position is ignored) and enter .BLANK 1 .INDENT +5 V .BLANK 1 This position is also marked with an underscore. .LIST ELEMENT; Once the starting column/line and ending line have been successfully marked, the function can be invoked by entering .BLANK 1 .INDENT +5 KP5 .BLANK 1 You will be prompted for the number of tabs to remove (negative number) or add (postive number). Press to abort the operation. .END LIST The latest existing marker can be cancelled by entering .BLANK 1 .INDENT +5 V .BLANK 1 Both markers can be simultaneously erased by entering .BLANK 1 .INDENT +5 PERIOD .BLANK 1 When a negative shift of text is requested, the resulting action of this function may at first be confusing until it is realized that characters are being pulled in from the right (via a erase current character keystroke) until a non-blank character is encountered. This is why placing the cursor at the left edge of a non-blank block of text results in nothing happening - EDTEM ran into the non-blank character, right away, and stopped pulling. .BLANK 1 This effect is intentional, as the main purpose of this function is to allow shifting of high-level language source a number of indents to the left or right, without endangering the source statements (in case the user goofs on the indentation shift). Thus, the best use for this feature is to place the cursor in column one of the first line to be shifted, mark it, place the cursor in column one of the last line to be shifted, mark it, and then invoke the function. .BLANK 1 Blank lines can be included in the marked range: they are left unaffected (that is, tabs are not added to such lines). .HEADER LEVEL Sorting EDTEM provides several approaches to sorting the contents of a buffer. All sorts are applied against the entire record (which may be only a subset of a line, depending upon the method employed). .BLANK 1 To invoke the function, enter .BLANK 1 .INDENT +5 = .BLANK 1 At this point, the user is given the opportunity to enter additional qualifiers to the command that will be issued to the VMS SORT utility. A typical one is the KEY qualifier, which can be used to further direct the sorting activity. Refer to the VMS manual describing the use of the DCL SORT utility for more information on qualifiers. All qualifiers should be specified using normal DCL qualifier syntax, such as .BLANK 1 .INDENT +5 /KEY=(POS:23,SIZ:4,DESC) .BLANK 1 If an erroneous qualifier sequence is submitted, EDTEM will restore the current buffer to its original contents. However, current cursor position is lost, and the cursor will be placed at the top of the buffer. .BLANK 1 To abort the function, enter .BLANK 1 .INDENT +5 Z .HEADER LEVEL +1 Sorting A Block Of Lines To sort a contiguous block of lines within the current buffer, select the target area (by using keypad PERIOD and moving the cursor to hi-light the desired range). Then, enter the above keystroke. Note that the selected range must both start and end at the beginning of a line. This artificial limitation is imposed to protect the user against some otherwise undesirable side effects, which are possible when a range is begun or ended in the middle of a line. .BLANK 1 This mode of the function uses the paste buffer, so any current contents of that buffer will be destroyed. .HEADER LEVEL Sorting A Rectangular Block This mode allows the user to specify that a sort be performed on a block of text whose boundaries are not necessarily on record boundaries. The method of marking the corners is identical to that of the rectangular cut function. Simply use the V keystroke to mark the opposite corners of the desired area, and then invoke the sort function. .BLANK 1 If the /KEY qualifier is used, remember to adjust the POSITION specification to reflect the beginning of the rectangle. .BLANK 1 This mode of the function uses the rectangular paste buffer, so any current contents of that buffer will be destroyed. .HEADER LEVEL Sorting The Entire Buffer The contents of the entire buffer will be sorted if neither of the two above methods of marking is employed. .! ---------------- .! Language Support .! ---------------- .CHAPTER Language Support .HEADER LEVEL Language Recognition EDTEM uses the filetype of the buffer's output file specification as the determining factor as to type of language represented by the buffer's source. .BLANK 1 The official list of filetypes versus languages is: .LITERAL FORTRAN .FOR PL/I .PLI DCL .COM TPU .TPU MACRO .MAR C .C or .H RUNOFF .RN% (.RNO, .RND, etc) .END LITERAL .HEADER LEVEL Automatic DCL Command Procedure Dollar Sign Insertion By default, whenever you are editing a buffer containing a filetype of .COM, EDTEM will automatically insert a dollar sign at the beginning of a new line. .BLANK 1 This mode of operation can be toggled through keystroke .BLANK 1 .INDENT +5 $ .BLANK 1 When the auto-insertion mode is in effect, the buffers containing a command procedure will have their status lines display a dollar sign. .HEADER LEVEL Indentation Often, source language coding employs indentation to signal logical blocks (such as nesting levels) within a module. EDTEM has the capability to position the cursor to the same level of indentation as that of the current line (that is, the line containing the cursor). In fact, the editor will employ the same combination of tabs and spaces as the current line to construct the indentation. .BLANK 1 To create a new line below the current line, and indent to the same level, enter .BLANK 1 .INDENT +5 N .BLANK 1 To create a new line ABOVE the current line, and indent to the same level, enter .BLANK 1 .INDENT +5 P .BLANK 1 The cursor may be anywhere on the current line (it does not have to be at the end of the line). .BLANK 1 If the current line is empty (that is, it has zero length), then the indentation of the first non-blank, non-commented (within the definition of the language implied by the buffer's filetype) above the current line is substituted. Supported languages (for comment detection) are .LIST .LIST ELEMENT; FORTRAN .LIST ELEMENT; TPU .LIST ELEMENT; MACRO .LIST ELEMENT; PL/I .LIST ELEMENT; C .END LIST The key's action can be modified to indent to the current level. To do this, enter .BLANK 1 .INDENT +5 KP3 .BLANK 1 Once armed (shown as "indent" on the status line), pressing and (as a pair) will have basically the same effect as entering N. The only difference is that you should be at the end of the line before pressing , while it does not matter with N. .BLANK 1 Of course, you may enter several keystrokes to open up empty lines (for aesthetics) before issuing the tab keystroke. .BLANK 1 As this is a toggled action, entering .BLANK 1 .INDENT +5 KP3 .BLANK 1 will subsequently restore the key to its normal mode of operation. .HEADER LEVEL Comment Framing EDTEM allows the user to enter one or more lines of comment statements (within the constructs of the language implied by the buffer's filetype), and then, through one keystroke, neatly frame the comment block. The one major restriction is that there be no mixture of comments and source statements on the same line(s). And, of course, a block of comment lines (by definition) contains no empty lines (a comment delimiter without anything else is permitted). .BLANK 1 Supported languages are: .LIST .LIST ELEMENT; FORTRAN .LIST ELEMENT; PL/I .LIST ELEMENT; C .LIST ELEMENT; MACRO .LIST ELEMENT; TPU .LIST ELEMENT; DCL .LIST ELEMENT; RUNOFF .END LIST To use this function: .LIST .LIST ELEMENT; Prepare the comment block (one or more lines of comment), while observing the afore-mentioned rules. Users editing a language which uses a leading and trailing delimiter to denote comments (such as C or PL/I) should not append the trailing delimiters (it will be done for you). .LIST ELEMENT; With the cursor positioned over any character within the comment block, press .BLANK 1 .INDENT +5 F .END LIST Note that any framing you add manually will be framed in turn by that keystroke. .HEADER LEVEL Re-Framing A Comment Block Coding changes, and so do the comments that go with it. The resultant comments often require a noticeable amount of work to get them justified and re-framed by hand. EDTEM offers an automated method of reconstructing a previously framed (and probably modified) comment block. .BLANK 1 All languages supported by F are also supported by this feature. .BLANK 1 To re-frame a comment block constructed according to the previous section's rules, position the cursor over any character of the comment block (including the top or bottom frame) and enter .BLANK 1 .INDENT +5 F .BLANK 1 The comment block will be reformatted, justified and re-framed. The current setting of the right margin dictates the right edge of the newly reframed block. .HEADER LEVEL Re-Framing A Comment Block Without Refilling Sometimes it is not desirable to reformat and justify an existing block. This would be true, for example, in the case where a comment block contains text in tabular or summary format. Perhaps all that was done was to add some new lines and now one wishes to reframe the expanded block. If reframing is the only thing needed, then enter .BLANK 1 .INDENT +5 F .HEADER LEVEL Inline Source Compilation And Repair It is possible to compile inline (with or without object file produced) the source contained within the current buffer, without leaving the editor. The supported languages are .LIST .LIST ELEMENT; FORTRAN .LIST ELEMENT; PL/I .LIST ELEMENT; MACRO .LIST ELEMENT; C .LIST ELEMENT; RUNOFF .END LIST In addition, several languages are supported for interactive diagnosis of error location and repair. They are .LIST .LIST ELEMENT; FORTRAN .LIST ELEMENT; PL/I .LIST ELEMENT; C .END LIST To initiate an inline compilation of the current buffer's source, WITHOUT permanently saving the source (or object) to file, enter .BLANK 1 .INDENT +5 KP3 .BLANK 1 To initiate an inline compilation AND write the source to file, enter .BLANK 1 .INDENT +5 ? .BLANK In the case of the second command, the contents of the buffer are written to the proper directory, filename and filetype (new version). In addition, if the compilation produces an object file, it too is retained. .BLANK 1 Again, note that the first command (KP3) does not permanently store the source (or an object file). .BLANK 1 If the buffer being compiled contains a library module, then one of the following will occur: .LIST .LIST ELEMENT; If the user did not provide an explicit file type when the module was originally loaded, then EDTEM will ask for a file type. Either the current default (listed between brackets) may be supplied, or a file type may be manually entered. Once a file type has been associated with the buffer, subsequent compilations of the buffer's contents will use that file type. .LIST ELEMENT; If the user provided a file type at load time, then that information will be used to choose the proper compiler. .END LIST As can be seen, it is important to specify the proper file type at load or initial compile time, as one will not get a second chance. .BLANK If an error is detected by the compiler, AND the source buffer contains text of a language supporting interactive repair mode, you will be transported to a buffer containing a synopsis of the errors. The user can move around and examine the buffer via the standard-definition keys KP0, KP4, KP5 and KP8. You will be queried as to whether or not you wish to enter interactive repair mode (an exception is described below). To activate repair mode, press the key to signify "yes", and you will be transported back to the original source buffer, where you will have an opportunity to fix each error as EDTEM points them out to you. .BLANK 1 After you have repaired the error currently pointed out by the editor, enter .BLANK 1 .INDENT +5 ? .BLANK 1 or .BLANK 1 .INDENT +5 KP3 .BLANK 1 and EDTEM will position you to the approximate location of the next error. .BLANK 1 Repair mode is terminated in one of the following ways: .LIST .LIST ELEMENT; Enter .BLANK 1 .INDENT +5 Z .LIST ELEMENT; All errors have been repaired by the user .END LIST Note that if you attempt to exit the editing session, and repair mode is still active, the only action performed by EDTEM will be to terminate repair mode (you may then enter another exit command). .BLANK 1 If you decline to enter repair mode (by entering "N"), then you will be left in the source listing buffer, free to move around at will. .BLANK 1 If errors are detected in a source of filetype not supported for repair mode, then you will be transported to the source listing buffer and positioned to the location of the first diagnostic message. .BLANK 1 If no errors are detected, the user is given the opportunity to view the source listing. If that offer is declined, the user is given control in the current working buffer. .BLANK 1 Two supported languages deserved special attention. .BLANK 1 The C compiler treats fatal errors in a way different from other compilers. Normally, a compiler will parse through the entire source and produce a complete listing and summary. However, C terminates the construction of the source listing upon detection of a fatal error. As EDTEM uses the source listing as the foundation of repair mode, fatal errors in C result in a different action by the editor, namely, no support of repair mode for C sources containing fatal errors. In this case, the user is position to the location of the fatal error in the listing and nothing further is attempted. .BLANK 1 Still more unusual is the behavior of the RUNOFF compiler. Unlike all other compilers, RUNOFF has no separate output stream for a listing file. The only listing output goes to its object stream (The /MESSAGE /LOG output is not a true listing stream, as only diagnostics are produced.) Hence, when the user instructs that the output of a RUNOFF compilation be written to file (?), there is no listing stream available to EDTEM (not without adding a lot of special case logic, at least). All that is produced for viewing in the editor is a summary. So, the user will see different behavior with inline RUNOFF compilation, depending on which of the inline commands (KP3 or +) was employed. .HEADER LEVEL Language Variable Declarations Coding is often done "on screen" these days, where the programmer is mentally building the algorithms on the fly as he/she enters the code. This leads to the state where the coder is somewhere down at the bottom of the buffer adding new statements using new variables, while the declarations for the variables are at the top of the buffer. This results in frequent "elevator" trips up and down the buffer, adding new declarations, adding new statements, adding new declarations, and so it goes... .BLANK 1 The coding of declaration blocks are often sacred territory to programmers (placement, format, etc.), but if you are willing to adhere to EDTEM's method, and are using either FORTRAN or PL/I, the editor does give you an alternative to motion sickness. And, the declarations are done without visibly moving around in the buffer. .BLANK 1 If you are using PL/I, you must add the comment line .BLANK .INDENT +5 /* <*> */ .BLANK 1 to your source. EDTEM uses this as a reference point, placing all declarations below that line. .BLANK 1 If you are using FORTRAN, then EDTEM requires that you have the following line in your source: .BLANK 1 .INDENT +5 IMPLICIT NONE .BLANK 1 (The author's coding preference is showing through, here - he views the above statement as good coding practice, as it saves lots of headaches down the road, due to typos, etc.) .BLANK 1 EDTEM will use the IMPLICIT NONE statement as the reference point, placing all declarations below that line. .BLANK 1 The FORTRAN user also has the option of telling the editor where to start the main declarations area. This is done by adding the line .BLANK 1 .INDENT +5 ! <*> .BLANK 1 to the source. EDTEM will then use that line as the reference point. .BLANK 1 The editor will block variables by type (that is, all INTEGER*4 variables will be placed together, etc.). However, EDTEM makes no attempt to alphabetize entries within a block. .BLANK 1 Supported FORTRAN variable types are .LIST .LIST ELEMENT; BYTE (specify B) .LIST ELEMENT; INTEGER*2 (specify W) .LIST ELEMENT; INTEGER*4 (specify L) .LIST ELEMENT; CHARACTER*n (specify Cn, where n is the size) .LIST ELEMENT; LOGICAL*1 (specify T) .LIST ELEMENT; REAL*4 (specify S) .LIST ELEMENT; REAL*8 (specify D) .LIST ELEMENT; EXTERNAL (specify X) .END LIST Supported PL/I declarations are .LIST .LIST ELEMENT; FIXED BINARY(7) (specify B) .LIST ELEMENT; FIXED BINARY(15) (specify W) .LIST ELEMENT; FIXED BINARY(31) (specify L) .LIST ELEMENT; CHARACTER(n) (specify Cn, where n is the size) .LIST ELEMENT; BIT(1) (specify T) .LIST ELEMENT; FLOAT BINARY(24) (specify S) .LIST ELEMENT; FLOAT BINARY(53) (specify D) .LIST ELEMENT; GLOBALREF FIXED BINARY(31) VALUE (specify X) .END LIST To declare a variable using this function, enter .BLANK 1 .INDENT +5 D .BLANK 1 The prompts are fairly self-explanatory, but some additional information will be useful. .BLANK 1 You will be prompted for the name of a variable. If you enter .BLANK 1 .INDENT +5 a period (decimal point), .BLANK 1 the last word typed will be assumed to be the name of the variable. Otherwise, you may enter the name of the variable (the entry is not case sensitive). (You may abort the process by pressing .) .BLANK 1 EDTEM will then check the name against the already declared variables OF THE SUPPORTED TYPES. If it finds the variable to be presently declared, it will display the current declaration and ask if you wish to modify the declaration (this is a good way to see if a variable has been declared). If you answer in the affirmative, the editor will give you a choice of modifying or deleting the declaration. If you indicate that you would like to modify the declaration, then you will be presented a menu of variable types. Specify one of the types by letter (such as T). Character declarations require C, plus the variable size (such as C12). If you abort the function at this point, the declaration WILL BE DELETED. After you have entered a variable type, you will be asked if you wish to append a comment to the line on which the variable is declared. If so, type in the comment, but don't make it long - you have some 40 characters, or so, to work with, here. .BLANK 1 On the other hand, if the variable has not been declared, the menu of declaration types will be presented, and you can proceed in a similar fashion in declaring the item. .! ------------------------ .! Word Processing Features .! ------------------------ .CHAPTER Word Processing Features .HEADER LEVEL Tabs Tabs are an editor writer's nightmare. They cause all kinds of headaches because they don't maintain the rule of one character, one position on the screen. This results in the dizzy zig-zagging seen as you move the cursor down through text which holds imbedded tabs. .BLANK 1 They cause other people migraines, too, especially when it comes to printing a carefully indented subject on a printer which has different tab stops... .BLANK 1 As an alternative to tabs (which are known in this manual as real tabs), EDTEM offers you a no tab mode, one which simulates tab stops and tabs, but uses spaces as the place holders. .BLANK 1 There are two immediate advantages to this method: .LIST .LIST ELEMENT; The abrupt lateral moves of the cursor are greatly reduced as you scroll it around a buffer .LIST ELEMENT; The finished product is more transportable. Printers (or other CRTs with different tab stops) will all have the same view of the text. .END LIST There are a few disadvantages, too: .LIST .LIST ELEMENT; A file using spaces as opposed to one employing real tabs takes more disk space .LIST ELEMENT; It takes longer to copy such a file (to either disk, printer or terminal) .LIST ELEMENT; Coders of modules using a language such as FORTRAN, which allows only a certain number of columns for source statements (per line) will run out of room more quickly (because a real tab consumes only one column, while a simulated tab may take six or more columns). .END LIST Still, the advantages generally outweigh the disadvantages in many cases. .HEADER LEVEL +1 Enabling Simulated Tab Mode Enter the toggle .BLANK 1 .INDENT +5 KP2 .BLANK 1 The pseudo word "notab" on the status line confirms that you are in simulated (notab or space tab) mode. Repeat the sequence to return to normal (real tab) mode. .HEADER LEVEL Modifying Simulated Tab Stops Enter .BLANK 1 .INDENT +5 KP1 .BLANK 1 You will see the current settings (the stops are marked with a T). Use the left and right arrow keys to position to desired locations. Pressing .BLANK 1 .INDENT +5 .BLANK 1 sets a tab stop, while pressing .BLANK 1 .INDENT +5 .BLANK 1 clears a tab stop. .BLANK 1 Pressing any other key terminates the modification mode. .HEADER LEVEL Establishing Default Custom Tab Stops EDTEM will supply you with a standard set of simulated tab stop settings. However, it is possible to instruct the editor to use your own, pre-defined settings. .BLANK 1 To do this, create a single-line file called SYS$LOGIN:EDTEM__TAB__SETTINGS.TXT, and place the capital letter "T" at each location where you desire to have a tab stop. .BLANK 1 Once this file is in place, EDTEM will use those settings as the default when you are using "notab" (simulated tab) mode. .BLANK 1 It is still possible to use the "factory" EDTEM simulated tab stop settings. Just enter the toggle .BLANK 1 .INDENT +5 COMMA .BLANK 1 and the deed is done. Of course, you can get back to your settings by entering that sequence, again. .BLANK 1 Both sets of tab stops (yours and the factory default) can be modified during the session (any changes won't be saved for the next session, though). In case your memory is short, use .BLANK 1 .INDENT +5 KP1 .BLANK 1 to modify either set. .HEADER LEVEL Advancing By Simulated Tab Stop EDTEM provides an analagous way of moving the cursor by tab stop (as opposed to moving by word, for example). The movement is in the current direction. To use, press .BLANK 1 .INDENT +5 (keyboard comma) .BLANK 1 One use of this function would be to quickly check the relationship of text in a buffer to tab stops. .HEADER LEVEL -1 Setting Margins The margins (left and right) are the driving force for several word processing functions, including auto-wrapping, filling and justifying text. EDTEM initiates a session by setting the margins to the boundaries of the screen. .BLANK 1 To change the value of the left margin, enter .BLANK 1 .INDENT +5 > .BLANK 1 The new amount must be greater than zero, and less than (or equal to) the right margin's setting. The operation may be aborted by pressing .BLANK 1 .INDENT +5 .BLANK 1 To change the value of the right margin, enter .BLANK 1 .INDENT +5 < .BLANK 1 The new amount must be greater than (or equal to) the amount of the left margin, and less than (or equal to) the width of the window. The operation may be aborted by pressing .BLANK 1 .INDENT +5 .HEADER LEVEL Auto Wrap Normally, when you continue to type characters on a line beyond the edge of the window, the extended text does not automatically wrap around when it reaches the edge of the window. (One usually sees the special "diamond", instead.) .BLANK 1 The above default action can be changed by enabling auto-wrap. In this mode, text is automatically wrapped from the right margin boundary around to the left margin boundary (as soon as a new word is begun, or the user presses ). .BLANK 1 To enable auto-wrap mode, enter .BLANK 1 .INDENT +5 KP6 .BLANK 1 The status line reflects the presence of this mode with the word "wrap". All buffers are affected by the mode when it is activated. .BLANK 1 Enter the same keystroke, again, to disable the mode. .HEADER LEVEL Filling And Justifying Text DEC's EDT provided a means to fill blocks of text. That capability is also provided by EDTEM, using the same series of keystrokes. For those unfamilar with EDT's Fill operation, the steps are repeated, here: .LIST .LIST ELEMENT; Select the block of text by positioning the cursor to the starting location and pressing .BLANK 1 .INDENT +5 PERIOD .LIST ELEMENT; Next, move the cursor so as to completely define the fill range (it is the area in reverse video) .LIST ELEMENT; Then, press .BLANK 1 .INDENT +5 KP8 .BLANK 1 to invoke the fill operation .END LIST Notice that the text was filled to the boundaries specified by the left and right margin settings. .BLANK 1 The same basic steps apply to the next two functions. .BLANK 1 To justify a block of text, first select the block (as was done in the Fill operation), and then enter .BLANK 1 .INDENT +5 KP8 .BLANK 1 to complete the operation. Again, notice that the text was filled to the boundaries specified by the left and right margin settings. .BLANK 1 To combine the operations of filling and justifying text, first specify the range, and then enter .BLANK 1 .INDENT +5 KP7 .BLANK 1 It is best to use simulated tabs in conjunction with filling and justifying text. If actual tabs are in the specified range, the results may be unpredictable. .! ----------------- .! Spelling Checkers .! ----------------- .CHAPTER Spelling Checkers EDTEM currently supports two inline spelling checkers. Each has its own advantages, and both are described below. .HEADER LEVEL JPL Spelling Checker The older of the two options, this checker is largely derived from a DECUS submission by Thomas Wolfe of Jet Propulsion Laboratory, with modification to allow the checking of words from the prompt line (I also made it necessary to prefix menu commands with a percent sign, so that individual words could be specified). The site manager must manually install the speller's dictionaries and supporting files in order for this package to function. .BLANK 1 The biggest strengths of this checker, versus the other version, is the relatively rapid activation (it is callable, not spawned as a subprocess), and its easy, single-word checking capability. .BLANK 1 To use, enter .BLANK 1 .INDENT +5 C .BLANK 1 You may then either .LIST .LIST ELEMENT; Enter a word from the keyboard, or .LIST ELEMENT; Specify a particular action on the buffer by entering a percent sign, followed by the first letter of a topic from the menu in the message window, or .LIST ELEMENT; Press to abort the operation .END LIST Refer to the submission by Mr. Wolfe to obtain more information on the various capabilities presented by the checker (keeping in mind that I added the word-check capability - all other features are from Mr. Wolfe's submission). .HEADER LEVEL Vassar Spelling Checker This is a rather powerful function which has several advantages over the previously discussed checker. These include .LIST .LIST ELEMENT; Large master dictionary .LIST ELEMENT; Memory of previously unrecognized words .LIST ELEMENT; Optional guessing of correct spelling .LIST ELEMENT; Check can be applied to partial or full range of buffer .LIST ELEMENT; Checker does editing of changes .END LIST The chief disadvantage of this implementation is the relatively slow activation of the function (due to it being spawned as a new subprocess). .BLANK 1 The range of text supplied to the checker can be specified by using one of the following modes: .LIST .LIST ELEMENT; Use the keypad PERIOD to initiate a range selection, and move the cursor so that the desired area has been hi-lighted, or .LIST ELEMENT; Use the V keystroke to mark the corners of a rectangular area which will become the section submitted to the checker (this method of marking is the same as when one marks a rectangle for cutting - see the section on Rectangular Cut and Paste), or .LIST ELEMENT; Simply invoke the function, and the entire buffer will be checked. .END LIST To initiate the spelling checker on the chosen text, enter .BLANK 1 .INDENT +5 C .BLANK 1 Follow the instructions supplied with the DECUS submission from Vassar for using the program. .! ---------------------- .! Miscellaneous Features .! ---------------------- .CHAPTER Miscellaneous Features .HEADER LEVEL Inserting The Date Enter .BLANK 1 .INDENT +5 D .BLANK 1 and the current VMS date will be inserted (or overwritten, depending on edit mode) at the current cursor position. .HEADER LEVEL Inserting The Time Enter .BLANK 1 .INDENT +5 T .BLANK 1 and the current VMS time (HH:MM:SS) will be inserted (or overwritten, depending on edit mode) at the current cursor position. .HEADER LEVEL Quick Word Case Invert Pressing .BLANK 1 .INDENT +5 K .BLANK 1 will cause the current (or previous) word's case to be inverted. This is quite useful for those of us who forget that caps lock is still on... .HEADER LEVEL Transpose Characters Pressing .BLANK 1 .INDENT +5 G .BLANK 1 will cause the positions of the last two typed characters to be swapped. .HEADER LEVEL Tabular Column Alignment When creating forms which consist of vertical sets of fields, often an annoying amount of time is spent in spacing from one vertical column to the next, especially if tab stops are not employed. EDTEM provides a shorthand keystroke which allows one to use the previously entered line as a template for column alignment. The keystroke is .BLANK 1 .INDENT +5 V .BLANK 1 and it works as follows. .BLANK 1 Whenever the user enters the above keystroke, an attempt is made to pad (with spaces) the current cursor position out to the column on which the NEXT non-blank FIELD in the PREVIOUS line is located. For example, if the current line's current cursor column is 10, and the previous line contains fields located in columns 8-11 and 25-31, then spaces are inserted at the current position until the current line's cursor is located at column 25. .BLANK 1 If the previous line is too short, a search is made upward through earlier lines until either a suitable reference line is located, or the beginning of the buffer is encountered. .BLANK 1 This action is also useful when coding language statements (such as CALL) where one wishes all parameters associated with a statement to be aligned to the same starting column. .HEADER LEVEL Learn Mode It is possible for the user to instruct EDTEM to remember a series of keystrokes, and to then have the editor replay those keystrokes at the user's command. .BLANK 1 To begin memorizing a sequence of keystrokes, you must enter what is known as learn mode. To do so, press .BLANK 1 .INDENT +5 R .BLANK 1 EXACT mode uses the responses you answer to prompts to functions within the learned sequence. For example, if your sequence includes an invocation of the Find function (PF3), EDTEM will store the answer you give. When you replay your keystrokes, the editor will substitute your responses (instead of allowing you to answer the prompts). .BLANK 1 If you don't use EXACT mode, then as you replay the sequence, at every prompt, EDTEM will let you provide the input. .BLANK 1 So, enter .BLANK 1 .INDENT +5 Y .BLANK 1 to use the EXACT mode of replay, or enter .BLANK 1 .INDENT +5 N .BLANK 1 to allow yourself to answer the prompts as they come, or simply press .BLANK 1 .INDENT +5 .BLANK 1 to abort the operation. .BLANK 1 Assuming you didn't abort learn mode, EDTEM will now allow you to enter any sequence of keystrokes (except the terminating keystroke). To end the learning process, press the terminating keystroke .BLANK 1 .INDENT +5 R .BLANK 1 You will next be asked to specify a key, which if pressed, will execute your learned sequence. This can be tough, as there just aren't many non-gold keystrokes around that are not already bound by EDTEM. A few that may be used are: .BLANK 1 .LEFT MARGIN +5 _\ .BREAK 2 .BREAK 4 .BREAK 5 .BREAK 6 .BREAK 7 .LEFT MARGIN -5 .BLANK If you attempt to use a key that is already defined, the editor will allow you to change your mind. Normal typing keys and shifted keys may not be bound. .BLANK 1 The learned sequence can be cancelled before it is bound by pressing .BLANK 1 .INDENT +5 Z .BLANK 1 If you successfully bind a key to the sequence, EDTEM will give you the opportunity to attach an optional function one-line description. This description can later be displayed by invoking the key definition help feature: .BLANK 1 .INDENT +5 ` (that is a backward tick mark) .BLANK 1 Bound keys may be reprogrammed by simply invoking the learn function and binding to the same key. .BLANK 1 A learned sequence can be saved for use in a later session. To do this, enter .BLANK 1 .INDENT +5 | (vertical bar) .BLANK 1 Execution of the above keystroke causes a private copy of EDTEM's section file to be placed into your SYS$LOGIN directory. When you invoke EDTEM in a subsequent session, a check is made for the existence of SYS$LOGIN:EDTEM.TPU$SECTION. If that file is found, it is used in place of the public copy. .BLANK 1 From a system manager's viewpoint, I would recommend against using this feature (it makes it harder to upgrade an editor when there are private copies all over the place), but it is available, never the less. .HEADER LEVEL Odds And Ends Pressing .BLANK 1 .INDENT +5 E .BLANK 1 moves the cursor to the end of the current line. Repeated invocations will not move the cursor to other lines (unlike KP2), thus more closely mimicking the DCL keystroke. This function also works on input for prompts. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 H (backspace) .BLANK 1 moves the cursor to the beginning of the current line (works on prompts, too). If the cursor was already at the beginning of the line, it is placed at the beginning of the previous line. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 J (line feed) .BLANK 1 deletes the previous word (works on prompts, too). .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 L .BLANK 1 inserts a form feed character into the current buffer at the current cursor position. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 U .BLANK 1 deletes all charactes from the beginning of the line to the cursor position (works on prompts, too). .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 .BLANK 1 followed by a number (such as 12), and then finishing with a defined keystroke (such as ), will result in the finishing keystroke being repeated the entered number's times (in the example, the keystroke would be executed 12 times). .BLANK 1 It is also possible to repeat a character in a similar fashion. In this case, press .BLANK 1 .INDENT +5 .BLANK 1 and the repeat factor, followed by .BLANK 1 .INDENT +5 ENTER .BLANK 1 and then the character to be repeated. Terminate the sequence with .BLANK 1 .INDENT +5 .BLANK 1 .BLANK 1 The editing keypad of a VT200 series keyboard is mapped to commonly used functions: .BLANK 1 .LEFT MARGIN +5 Find is mapped to PF3 .BLANK 1 Insert Here is mapped to the paste function (KP6) .BLANK 1 Remove is mapped to the cut function (KP6) .BLANK 1 Select is mapped to PERIOD. .BLANK 1 Prev Screen is mapped to KP8 with a direction of REVERSE temporarily in effect .BLANK 1 Next Screen is mapped to KP8 with a direction of FORWARD temporarily in effect .LEFT MARGIN -5 .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 .BLANK 1 will cause the screen to scroll 32 columns to the left. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 .BLANK 1 will cause the screen to scroll 32 columns to the right. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 .BLANK 1 will clear the message window. .BLANK 1 .BLANK 1 Pressing .BLANK 1 .INDENT +5 W .BLANK 1 will cause the entire screen to be refreshed. .APPENDIX Shift Level 0 Keypad Key Definitions .LITERAL +-----------------+-----------------+-----------------+-----------------+ | Gold | Help | Find Next | Delete Line | | | | | | | PF1| PF2| PF3| PF4| +-----------------+-----------------+-----------------+-----------------+ +-----------------+-----------------+-----------------+-----------------+ | Next / Previous | Next / Previous | Cut and Append | Delete Word | | Page | Section | | | | 7| 8| 9| -| +-----------------+-----------------+-----------------+-----------------+ | Set Direction | Set Direction | Cut | Delete Character| | Forward | Reverse | | | | 4| 5| 6| ,| +-----------------+-----------------+-----------------+-----------------+ | Advance by Word | End of Line | Advance by | Auto Scroll | | | | Character | | | 1| 2| 3| | +-----------------+-----------------+-----------------+ | | | | | | Advance by Line | Select Range | | | 0| .| ENTER| +-----------------------------------+-----------------+-----------------+ .END LITERAL .APPENDIX Shift Level 1 Keypad Key Definitions .LITERAL +-----------------+-----------------+-----------------+-----------------+ | Gold | Help | Find | Undelete Line | | | | | | | PF1| PF2| PF3| PF4| +-----------------+-----------------+-----------------+-----------------+ +-----------------+-----------------+-----------------+-----------------+ | TPU Command | Fill | Replace | Undelete Word | | | | | | | 7| 8| 9| -| +-----------------+-----------------+-----------------+-----------------+ | Go To | Go To | Paste | Undelete | | Top of Buffer | Bottom of Buffer| | Character | | 4| 5| 6| ,| +-----------------+-----------------+-----------------+-----------------+ | Invert Case | Delete to | Insert Character| Replace and | | | End of Line | by ASCII Code | Find Next | | 1| 2| 3| | +-----------------+-----------------+-----------------+ | | Open New Line | Reset | | | | | | | 0| .| ENTER| +-----------------------------------+-----------------+-----------------+ .END LITERAL .APPENDIX Shift Level 2 Keypad Key Definitions .LITERAL +-----------------+-----------------+-----------------+-----------------+ | Gold | Help | Visit Windows | Remove Window | | | | | | | PF1| PF2| PF3| PF4| +-----------------+-----------------+-----------------+-----------------+ +-----------------+-----------------+-----------------+-----------------+ | Go To Buffer | Go To | Remember | Go To | | | Previous Buffer | Current | Previous | | 7| 8| Position 9| Position -| +-----------------+-----------------+-----------------+-----------------+ | Create Window | Go To | Show Buffers | Go To | | | Main Buffer | | Beginning | | 4| 5| 6| Of Line ,| +-----------------+-----------------+-----------------+-----------------+ | Toggle Between | Display Window | Compile Buffer | Go To | | Smooth / Jump | Using Full | | Flagged | | Scroll Modes 1| Screen 2| 3| Buffer | +-----------------+-----------------+-----------------+ | | Re-Compute Window Sizes | Reset | | | | | | | 0| .| ENTER| +-----------------------------------+-----------------+-----------------+ .END LITERAL .APPENDIX Shift Level 3 Keypad Key Definitions .LITERAL +-----------------+-----------------+-----------------+-----------------+ | Gold | Help | String / Pattern| | | | | Buffer Search | | | PF1| PF2| Summary PF3| PF4| +-----------------+-----------------+-----------------+-----------------+ +-----------------+-----------------+-----------------+-----------------+ | Fill | Justify | Mark Current | Go To | | and | Selected | Position with | User Label | | Justify Text 7| Text 8| User Label 9| Position -| +-----------------+-----------------+-----------------+-----------------+ | Toggle Between | Source Shift | Toggle | Toggle Between | | Normal and | | Auto-Wrap Mode | Tab Stop Sets | | Free Cursor 4| 5| 6| ,| +-----------------+-----------------+-----------------+-----------------+ | Set / Clear | Toggle Real or | Toggle Regular | Translate | | Tab Stops | Space Tab Mode | or Auto-Indent | Non-Printable | | 1| 2| Tab Mode 3| Characters Into | +-----------------+-----------------+-----------------+ Visible | | Convert Real Tabs to Spaces | Reset | Characters | | | | | | 0| .| ENTER| +-----------------------------------+-----------------+-----------------+ .END LITERAL .APPENDIX Command Summary .LITERAL Keyboard -------- Quit the editing session without saving changes......... Q Quit the editing session with no verification on MAIN... Q Exit the editing session, saving all changes............ E Exit the editing session, saving all changes............ Z Exit the editing session with no verification on MAIN... E Return to previous process ............................. X Issue an inline DCL command............................. D Issue a range or buffer of DCL commands................. D Toggle between normal (80) and wide (132) column modes.. W Toggle between insert and overstrike modes.............. A Display active buffers with count of mapped windows..... S Show current cursor statistics.......................... S Go to specified line within current buffer.............. L Go to specified buffer.................................. B Go to flagged buffer or include flagged file............ F Go to the main editing buffer........................... M Go to the previously active buffer...................... L Create a scratch buffer................................. B Duplicate contents of current buffer into new buffer.... M Sort the specified range of the current buffer.......... = Remember current position within buffer................. [ Return to remembered position within buffer............. ] Read a file into a new buffer........................... I Read a file into the current buffer at current line..... I Redefine the output file/device of the current buffer... T Toggle buffer output status modes (readonly, write)..... O Replace the current buffer's text module into library... O Write the selected range to a device or file............ P Create and map a window to the current buffer........... C Display current buffer using full screen................ G Adjust the top and bottom limits of the current window.. A Set left margin of current window....................... > Set right margin of current window...................... < Step through the visible windows........................ W Delete the current window............................... U Scroll window contents from right to left............... Scroll window contents from left to right............... Construct a special-purpose marker...................... V Remove a special-purpose marker......................... V Enable limited column search mode....................... V Cut a marked rectangle.................................. K Paste a rectangle into the current buffer............... K Clear the message window................................ Sequential queried search and replace................... R Resume sequential queried search and replace............ R Toggle between application and numeric keypad modes..... N Spawn subprocess with optional one-shot command......... + Attach to specified (and already existent) subprocess... + Define user functions (learn mode)...................... R Describe function of mapped key (in one line)........... ` Save current function key definitions (user private).... | Trim trailing blanks and tabs from current line......... } Trim trailing blanks and tabs from current buffer....... { Convert buffer or specified range to upper case......... U Convert buffer or specified range to lower case......... L Compress contents of buffer or range to single spaces... Clean the current buffer of common non-printables chars.K Auto scroll.............................................ENTER Display ruler........................................... \ Insert ruler............................................ / Toggle auto dollar insertion mode (.COM files, only).... $ In-line compile (/NOOBJ) current buffer's source........ ? Declare a variable within context of source language.... D Transpose last two characters........................... G Toggle between normal and brief status line modes....... B Frame a comment (according to language)................. F Align/re-frame a comment block (according to language).. F Reframe (without refilling) a comment block............. F Invert case sense of previous or current word........... K Indent according to previous line (insert below line)... N Indent according to previous line (insert above line)... P Align against next non-blank column of previous line.... V Position to next tab stop (space tab mode, only)........ , Insert the date at the current location................. D Insert the time (standard) at the current location...... T Toggle between normal and workstation scroll modes...... S Invoke the Vassar spelling checker...................... C Invoke the JPL spelling checker.........................C Position to end of current line (direction independent). E Position to beginning of current line................... H Delete current/previous word............................ J Insert a form feed at the current cursor position....... L Delete from cursor to beginning of current line......... U Refresh screen.......................................... W Keypad ------ ..................................................PF1 Keypad level 0 help.....................................PF2 Find next occurence of loaded search string.............PF3 Delete current line (and its terminator)................PF4 Position to next page (looks for a form feed or eob)....KP7 Scroll a section of text................................KP8 Cut and append selected range to PASTE buffer...........KP9 Delete word.............................................MINUS Set current direction to FORWARD........................KP4 Set current direction to REVERSE........................KP5 Cut and move selected range to cleared PASTE buffer.....KP6 Delete character........................................COMMA Move to next word.......................................KP1 Move to end of line.....................................KP2 Move to next character..................................KP3 Move to next line.......................................KP0 Initiate selection of range.............................PERIOD Auto scroll text........................................ENTER Keypad level 1 help..................................... PF2 Find string............................................. PF3 Restore line previously deleted with PF4................ PF4 Execute a TPU command................................... KP7 Fill the selected range of text......................... KP8 Replace located search string with PASTE buffer text.... KP9 Restore word previously deleted with MINUS.............. MINUS Go to bottom of current buffer.......................... KP4 Go to top of current buffer............................. KP5 Paste text in PASTE buffer.............................. KP6 Restore character previously deleted with COMMA......... COMMA Inverted the case of the selected range of text......... KP1 Delete from cursor to end of current line............... KP2 Insert character specified by ASCII number........ KP3 Open a new (empty) line................................. KP0 Cancel the select range action / reset.................. PERIOD Replace matched string with PASTE buffer & locate next.. ENTER Keypad level 2 help..................................... PF2 Step through the mapped windows......................... PF3 Delete the current window............................... PF4 Go to specified buffer.................................. KP7 Go to the previously active buffer...................... KP8 Remember current position within current buffer......... KP9 Return to remembered position within current buffer..... MINUS Create and map a window to the current buffer........... KP4 Go to the main editing buffer........................... KP5 Display active buffers with count of mapped windows..... KP6 Go to beginning of line................................. COMMA Toggle between smooth and jump scroll modes............. KP1 Display current buffer using full screen................ KP2 In-line compile (/NOOBJ) current buffer's source........ KP3 Re-allocate window sizes................................ KP0 Cancel the select range action / reset.................. PERIOD Go to flagged buffer or include flagged file............ ENTER Keypad level 3 help..................................... PF2 String / pattern buffer search summary.................. PF3 Fill and justify (between current margin settings)...... KP7 Justify selected range (between current margin settings) KP8 Mark user-labeled position (marker)..................... KP9 Position to user-labeled marker......................... MINUS Toggle between normal and free cursor movement modes.... KP4 Execute a source shift between tab stops................ KP5 Toggle between normal and auto-wrap modes............... KP6 Toggle between default and user-specified tab stop sets. COMMA Set / clear tab stops................................... KP1 Toggle between real and space tabs modes................ KP2 Toggle between normal and auto-indent tab mode.......... KP3 Convert current buffer source from real to space tabs... KP0 Translate non-printables in current buffer.............. ENTER .END LITERAL