QEDIT/UX Version 4.5.01 Full-Screen Text Editor for HP-UX Enhancements Since the last major release, Qedit/UX has been enhanced with the following new features. Full-Screen Editing on VT Terminals The new Screen mode, Qedit's second full-screen mode, now supports full-screen editing on VT terminals. The original Visual mode is still available to HP terminal users. See the "Screen Mode" section later in this document for a complete description. List Command There are several enhancements to the List command. Indented Include Directives The $include option now recognizes indented $include directives, which commonly occur when $if compiler options are used. /list $include main.source "debug_init" Contents of main.source ... $if 'debug'$ $ include 'debug.source'$ $endif$ ... .Include The $include option now recognizes the ".include" command. These types of Include files most commonly occur with Prose files. Note that the file must use the full ".include" command. Abbreviated versions such as ".inc" will not be searched. This is the start of my book. .include chapter1 {this will be searched} .include chapter2 {this will be searched} .inc appendix {*** this won't be searched ***} The end $Use Option The new $use option works very much like the $include option. With $use, Qedit searches usefiles that are specified in this form: use filename Usefiles commonly occur with PowerHouse source files, as well as Qedit and Suprtool command files. The following example searches for the string "leapyear" in the file "source" as well as the usefile "dbschema.template.mis." /list $use source "leapyear" contents of source ... use dbschema.template.mis ... $Device Option Qedit now has a List command option to specify the HP-UX printing device directly. For example, this command prints lines 1 through 10 of the current file to the printer name or class called Printer. list $device printer 1/10 The name specified after the $device keyword must be a valid printer name or class. $LP, $LPA, $LPB, and $Record Options Qedit now supports printing to an HP-UX device or to an attached printer. To specify the selected device, you must set the $LP, $LPA, or $LPB environment variable to the printer name. For example, if you wish to print on the printer defined as Laser in HP-UX, you must set the $LP environment variable to Laser. LP=LASER export LP Then, from within Qedit, you can print to the selected printer name (Laser) by specifying $LP in your List command. /list $lp You can define other devices by setting up environment variables for $LPA and $LPB. If the $LP environment variable is not set, the printout will go to the system default printer. If the $LPA and $LPB variables are not set, then you will get an error. Printing to an attached printer only requires that you specify the $record keyword on the List command. /list $r 1/10 Screen Mode Introduction Qedit's full-screen mode on VT terminals is called Screen mode, which works with most VT terminals (i.e., VT100 and VT220). To use Screen mode, you must have a VT terminal or terminal emulator, and you must have a terminfo entry for your VT terminal in your HP-UX configuration (use untic vt100 or untic vt220 to check your terminfo entries). Screen mode differs from Visual mode by not relying on the block-mode feature of HP terminals. It enables you to page forward and backward through your file, as well as to move, copy, mark and delete blocks of text with Screen mode's cut-and-paste functions. Screen mode is a good introduction to the HP operating system for users who don't work on HP computers all day. Those who may particularly benefit are novice users, or users who run Qedit only to update a report skeleton once a week. Screen mode provides a familiar environment where novices can make changes to the entire screen, just as they do on PC editors. You can even configure some electronic mail packages (e.g., Xpress, HPDesk, elm) to put your users directly into Screen mode when they edit a message. Home and End Keys On PC's running a terminal emulator, the Home and End keys correspond to the Home and End keys on your keyboard. On VT100 terminals, these keys correspond to keypad-7 for Home and keypad-1 for End because there are no keys labeled Home and End. In addition to these keypad equivalents, VT220 terminals also correspond Home to the Find key and End to the Select key. Starting Screen Mode After you have invoked Qedit, and used Text or Open to access a file, you can switch from Line mode to Screen mode by typing "vi." If you don't have a file open when you type "vi", Qedit will open an empty scratch file and fill it with a blank line. In Line mode you must type command and text lines, and press Return after each line. In Screen mode you can edit a full screen of text by moving the cursor around the screen, inserting and deleting lines and characters, and joining and splitting lines. To move through the file, use PF3 and PF4 (or the Prev and Next keys if you have a VT220 or above). You can perform additional editing functions by using control-key sequences. For example, to mark the first line in a cut-and-paste operation, press ^L. When you are finished editing, use ^E to exit Screen mode. Troubleshooting If your TERM environment variable is set to a VT terminal, Qedit will automatically use Screen mode when you type "vi." If you are running Reflection with HP and VT emulation, and Qedit is still using Visual mode, you should check the following items: * The RCRTMODEL environment variable is set to 0. * The TERM variable has been exported. Use export to see a list of your exported variables. * You have a valid terminfo entry for your TERM. Type untic TERMvalue to check this. You can also put Qedit into Screen mode manually by typing the following command: set vis screen on Screen Layout The screen starts with the status line, continues with several text lines, and ends with the message line. Status Line The first line shows the current line number and column location of your position in the file, the insert/replace mode, and the name of the file you are editing. For example, L 11 C 5 I monthly.report Text Lines By default, the number of lines on the screen is LINES-2. The default value of LINES is specified in the terminfo entry for your terminal. You can override terminfo's default value by setting the shell environment variable LINES. Message Line The last line on the screen is the message line. When you first enter Screen mode, this line displays a list of commonly used control keys. As you edit a file, Qedit uses this line to display messages about your editing operations. When you move to another screen, the displayed message is replaced by the list of commonly used keys. Otherwise, the display message remains on the screen. Using Your Keyboard In Screen mode, the keyboard gives you the power to move around the screen, to edit text, and to control the flow of Qedit. Moving the Cursor You can use the cursor keys and the numeric keypad to move around the screen. VT100 and Up Cursor Left Move one space to left Cursor Right Move one space to right Cursor Up Move one space up Cursor Down Move one space down PF1 Display help screen PF3 Previous page of text PF4 Next page of text Home Go to beginning of line End Go to end of line Home Home Go to beginning of file End End Go to end of file Keypad Layout [ 7 ] [ 8 ] [ 9 ] Home Cursor Previous Up Page [ 4 ] [ 5 ] [ 6 ] Cursor Cursor Left Right [ 1 ] [ 2 ] [ 3 ] End Cursor Next Down Page [ 0 ] [ . ] Insert Remove VT220 and Up Prev Page Previous page of text Next Page Next page of text Find Home Select End Insert Toggle insert/overwrite mode Remove Delete current character If you are using a modem to access your HP-UX computer, you can try pressing ^O to toggle the fast scroll option. This option, whose default is Off, may speed up single-line scrolling operations. However, the screen update with fast scroll may be annoying visually. Editing the Text Lines You can revise the screen image by using these keys: Return Insert mode: split line at current position Overwrite mode: move to start of next line Backspace Delete previous character Insert mode: rest of line shifts left Overwrite mode: rest of line unchanged At end of line, join line to previous line Insert Toggle insert/overwrite mode Remove Delete character at current cursor location, rest of line shifts left ^N Insert blank line above current line ^D Delete line at current cursor ^U Undo changes to current line before you move cursor off the line Control Functions To return from Screen mode to Line mode: ^E Exit to Line mode Browsing Through Your File ^G Go to a particular line ^F Find string ^A Find next You can go to a specific line number by pressing ^G. The first line in the file is line 1. You can quickly go to line one by pressing Home twice. Similarly, you can go to the last line by pressing End twice. The Home key equivalent is keypad-7 (or Find on VT220), and the End key equivalent is keypad-1 (or Select on VT220). You can also go to a line by searching for a string. Press ^F to begin searching. Qedit asks you for two pieces of information: the string you want to find and the search options. The search options are as follows: I Ignore type case of words Default: case-sensitive search P Specified string is a pattern Default: use no patterns W Search string must be a "word" (surrounded by blanks or punctuation) Default: string can be anywhere in line 1 Start searching from line 1 Default: start from current line To search for the next occurrence of a string, press ^A. Qedit does not return to the start of file after the last string has been found. Cut-and-Paste ^L Begin marking lines ^C Copy marked lines to hold0 file ^X Cut marked lines to hold0 file ^V Paste lines from hold0 file before current line Screen mode's model for cut-and-paste is similar to the cut-and-paste of MS-Windows. First you mark a block of text. Then you either copy or cut the text to a "clipboard." Copied text remains in the original file, but cut text is deleted. To paste the text, put the contents of the clipboard into the new location. If you have not marked a block of text when you perform a copy or cut, the current line becomes the marked block. When you start marking a block, Qedit highlights lines as you move through the file. The highlighted lines are your marked block. Resetting Cut-and-Paste You can cancel the current marked block by pressing ^L. Copying a Block of Text Suppose you want to copy a section of text from one place in your file to another. Here is one way to do it: 1. Use a string search to locate the start of the block. Move the cursor to the first line you want to copy and press ^L. You should see the current line highlighted. 2. Go to the the last line you want to mark and press ^C. 3. Go to the screen where you want to insert a copy of the text. Move the cursor to the line after the desired insertion point and press ^V to add the block. Splitting and Joining Lines To split a line, move the cursor to the position where you want the new line to start. Make sure you're in insert mode and then press Return. To join two lines, move the cursor to the beginning of the second line, and then press Backspace. Bugs Fixed Change. Qedit can now accept 'nnn as a target string when a string line range is used. List. The $hex option no longer causes a core dump. Help. Qedit now correctly displays on-line help for Set commands. Renumber. Auto-renumber near the end of the file now works correctly in Visual mode. Text. Qedit no longer creates a Jumbo file with the Set Work Jumbo Off command.