Article 128034 of comp.os.vms: Newsgroups: comp.os.vms,vmsnet.tpu,vmsnet.source Path: nntpd.lkg.dec.com!pa.dec.com!decwrl!pacbell.com!ihnp4.ucsd.edu!mvb.saic.com!news.mathworks.com!tank.news.pipex.net!pipex!news.sprintlink.net!noc.netcom.net!ix.netcom.com!netcom.com!deleyd From: deleyd@netcom.com (deleyd@netcom.com) Subject: EDX text editor - Overview Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) Date: Mon, 28 Aug 1995 07:27:20 GMT Lines: 312 Sender: deleyd@netcom21.netcom.com Xref: nntpd.lkg.dec.com comp.os.vms:128034 vmsnet.tpu:1550 ABSTRACT EDX is a powerful TPU based EDT style text editor for the VAX/VMS or the Alpha AXP/OpenVMS computer system. It offers an EDT-style keypad and supports all the major line mode functions of the EDT editor plus many other advanced features not available in the EDT editor or the newer EVE editor. It is intended for users familiar with the EDT editor who would like to switch to a faster, more powerful editor without having to learn a new editor all over again. EDX also supports a WPS-style keypad mode for users who prefer the WPS-style keypad. Following are some of the advanced features of the EDX editor which are not available in EDT or EVE: * Built in spelling checker with 90,000 word dictionary. Spell check a buffer, range, word, or display the dictionary and browse. Includes guessing algorithms and personal supplemental dictionary support. * Edit modules within VMS text libraries. * Obtain a directory listing including optional /SIZE and /DATE qualifiers. Read in a selected file from the directory listing, delete a selected file, or lock a selected file. * Wildcard search and replace mode, with optional string to exclude as a match, case sensitive or insensitive. * List all lines containing a specified string or wildcard pattern along with the corresponding line number. * Search for and highlight matching parentheses. * Lock files, preventing others from editing them while you do. * Sort a buffer, range, or columnar range. * Columnar cut and paste in insert or overstrike mode. * Translate a buffer from EBCDIC to ASCII, and vice versa. * Compare two buffers line by line. * Translate DCL symbols and logical names. * Create DCL symbols and logical names. Note that all of the above features are performed within the editor, without spawning a subprocess. EDX is built on the VAX Text Processing Utility (VAXTPU). Users familiar with VAXTPU can dynamically extend the editor's abilities by adding new functions which perform complex tasks. EDX makes this job easier by defining over 50 general purpose functions not available in VAXTPU itself. (SEE vmsnet.tpu or vmsnet.source for the EDX editor) HEADLINE: ARE YOU STILL USING EDT? If you are still using the old EDT editor, you are missing a lot of capabilities available in the new EDX editor. And there is no reason not to change; the EDX screen mode works just like the EDT screen mode, so you don't have anything new to learn. Just type EDX instead of of EDT. Why should you change? The reasons are endless, so I will list just a few: First, you get a status line at the bottom telling you what buffer you're in (initially MAIN), the name of the file in the buffer (try to find that out in EDT!) and whether you are in INSERT or OVERSTRIKE mode (EDT doesn't even have an overstrike mode). Use "CTRL A" to switch between INSERT and OVERSTRIKE modes. Below the status lines are two lines reserved for messages. Ever wonder what line you are on and what column you are in? Press "GOLD CTRL L" to get your line number, column position, and the character your cursor is on (and its ASCII value in decimal, hex, and octal.) Second, there are numerous features that you can't do at all in EDT or can do much more easily in EDX. Let me list just a few (try them as I describe them): o Buffers. Like EDT, EDX permits an unlimited number of buffers to be opened. To open a new buffer in EDX, simply press "GOLD B". It will ask you for the name of the buffer. If the buffer is new (i.e., empty) it will prompt for the name of a file to enter into the buffer. Type the file name and RETURN, or just press RETURN if you don't want a file. If you type a file name, the file will be entered into the buffer and the cursor will be at the TOP of the file (rather than at the bottom as when you use the EDT line-mode command INCLUDE.) You can go directly to the MAIN buffer from another buffer by typing "GOLD M". You can see the names and status of all of your buffers with "GOLD S". You can also go to another buffer by putting the cursor on its name (after typing "GOLD S") and pressing RETURN. o Windows. You can divide the screen in half vertically with different buffers in the top and bottom halves. This simplifies comparing two files and cutting material from one buffer to another. "GOLD W" gets you a second window, another "GOLD W" returns you to a single window. "CTRL V" moves the cursor to the other window. o Locking files. The line-mode command LOCK FILE prevents others from editing the same file you are editing. The LOCK BUFFER command provides the same security for files in buffers. o Directory. You say you don't remember what the name of the file you want to put in a buffer is? No problem with EDX. Simply press "GOLD D" and you will be asked for a directory specification. Give it one, of just press RETURN, and a second window will open up with the directory information in it. Put your cursor on the file you wan to include and press return. You will then be asked what buffer you want the file in. You have the choice of accepting the default empty buffer offered (by pressing return), naming your own empty buffer, or putting the file at the cursor of an existing buffer. That's all there is to it. o Search. The search commands ("GOLD PF3" for "FIND" and PF3 for "FIND NEXT" as in EDT) are lightning fast compared with EDT. "GOLD period" lets you search for a given character (the next character you type). And you can "SET SEARCH WILD" in the line mode or in your initialization file (more about this file later) and get additional search features such as using % as a single-character wildcard, * as a multi-character wildcard, and other features described in the manual. (As in EDT, a line-mode command can be performed by first pressing GOLD keypad-7.) o Columnar cut/past mode. You can cut and paste a rectangular region, rather than just the whole screen. After using the line-mode command SET COLUMNAR, move the cursor to one corner of the rectangle, press the SELECT key (keypad period) and follow the directions at the bottom of the screen. o Differences. You can compare two buffers line-by-line; the cursor will stop when there is a difference. Use the line-mode command DIFFERENCES. o Moving around. You can set a temporary mark in your file to aid in rapidly moving about. Use "GOLD CTRL G" to set a mark, use "GOLD G" to go to the mark. You can also go to a given line with "GOLD #". o Screen width. Type "GOLD CTRL W" to toggle between 80 and 132 characters. o Insert date. You can insert today's date by simply pressing "GOLD CTRL D". Example: October 12, 1988. You can change the format with the SET DATE_FORMAT line-mode command. o Saving, exiting, and quitting. You can periodically save a new version of any buffer by typing the line-mode command WRITE while in the buffer. The file name is unnecessary. When you exit and save the main buffer ("GOLD X") or quit without saving ("GOLD Q"), if you have any modified buffers that will not be saved you will be told which buffers were changed and asked if you really want to continue exiting or quitting. o Initialization files. Like EDT, EDX permits the use of initialization files. Two companion articles ("EDX FOR TEXT PROCESSING" and "EDX FOR WRITING CODE") describe useful initialization files for text and code. There are many other features. A detailed description of all EDX commands is available. (See file EDX_DOCUMENTATION.DOC) =============================================================================== HEADLINE: EDX FOR WRITING CODE A companion article ("ARE YOU STILL USING EDT?") describes some of the main features of the powerful new EDX editor. This article describes some of the other features especially useful for writing code, and also describes an initialization file for code processing. This initialization file is designed to replace the commonly used EDT initialization file used by EDTC. Simply type EDXC instead of EDTC. First the features: o Find matching parentheses. You'll love this command for checking for matching parentheses in complicated expressions. "GOLD single-quote" (i.e., GOLD ') searches the current line beginning at the cursor for one of the characters ()[]{}<>. If a match is found, a search is made in the appropriate direction for the corresponding matching item. If a match is made, the matching items are highlighted. This process is continued by again pressing GOLD '. o Upper/lowercase. "GOLD U" uppercases the current word, "GOLD L" lowercases the current word. These can be especially useful for writing code in a language that is case sensitive (e.g., "C") or uses uppercase and lowercase words by convention (e.g., ADA). o Insert ruler. "GOLD R" inserts a ruler above the current line. This ruler numbers the columns. "GOLD CTRL R" places a ruler at the top of the screen (but not in the text). o Insert a separating line. "GOLD dash" prompts for a character, then places a series of the character across the page. The first character will be the appropriate comment character for the language being used. For example, the line will begin with a "C" if the file extension is .FOR, .DK, .IFT, or .FTN. The appropriate comment character(s) will also be inserted for ADA (.ADA), "C" (.C), command files (.COM), macro (.MAR), and Pascal (.PAS). As examples, "GOLD --" will produce: C---------------------------------------------------------------------- in Fortran and /*-------------------------------------------------------------------*/ in C. A useful initialization file for writing editing FORTRAN or SIMULTRAN programs might have the name EDXCINI.TPU and have the following contents: (FILE EDXCINI.TPU) do_command("SET SCREEN 72"); do_command("SET TAB_KEY SPACES"); do_command("SET TABS 7,9,11,13,15,17,19,21,23"); do_command("SET SEARCH WILD"); do_command("SET SHIFT_AMOUNT 16"); define_key('do_command("FIND=Z")',key_name("Z",SHIFT_KEY)); define_key('do_command("FIND=A")',key_name("A",SHIFT_KEY)); define_key('enter_text(" *")',key_name("E",SHIFT_KEY)); define_key('enter_text("C ")',PF2); define_key('keypad_help',key_name(PF2,SHIFT_KEY)); To use the above initialization file, place the following line in your LOGIN.COM file: $ EDXC :== 'EDX'/COMMAND=EDXCINI.TPU and invoke it with: $ EDXC filename The above initialization file does the following: o The screen will display 72 characters only; the existence of characters beyond column 72 is denoted by the usual diamond. o The tab key will provide 6 blanks, so is useful for beginning FORTRAN code lines. Additional pressing of the tab key will provide two more blanks, useful for indenting structured code in FORTRAN or SIMULTRAN. o The wildcard characters (%, *, and others) can be used in the search. o "GOLD left arrow" and "GOLD right arrow" will each produce a shift of 16 characters. o "GOLD Z" and "GOLD A" can be used to go to buffers named "Z" and "A". o The keypad key PF2 produces a "C" followed by five blanks, useful for beginning comment lines. o "GOLD E" produces five blanks followed by a "*", useful for beginning continuation lines. o "GOLD PF2" obtains the HELP screen =============================================================================== HEADLINE: EDX FOR TEXT PROCESSING A companion article ("ARE YOU STILL USING EDT?") describes some of the main features of the powerful new EDX editor. This article describes some of the other features especially useful for text writing, and also describes an initialization file for text processing. First the features: o Fill paragraph. Press "GOLD F" to rewrap the paragraph the cursor is in. A paragraph is delimited by two successive returns (i.e., a blank line above and below). o Center line. Press "GOLD =" to center the line the cursor is on. o Transpose. Press "GOLD PF2" to transpose the two characters under and after the cursor. o Upper/lowercase. "GOLD U" uppercases the current word, "GOLD L" lowercases the current word. A useful initialization file for text editing might have the name EDXTINI.TPU and have the following contents: (FILE EDXTINI.TPU) do_command("SET WRAP 72"); do_command("SET SEARCH WILD"); define_key('do_command("FIND=Z")',key_name("Z",SHIFT_KEY)); define_key('do_command("FIND=A")',key_name("A",SHIFT_KEY)); define_key('keypad_help',key_name(PF2)); To use the above initialization file, place the following line in your LOGIN.COM file: $ EDXT :== 'EDT'/COMMAND=EDXTINI.TPU and invoke it with: $ EDXT filename The above initialization file does the following: o The text automatically wraps after 72 characters. o The wildcard characters (%, *, and others) can be used in the search. o "GOLD Z" and "GOLD A" can be used to go to buffers named "Z" and "A". o The keypad key PF2 obtains the HELP screen. -David Deley deleyd@netcom.com (See vmsnet.tpu or vmsnet.source for EDX)