═══ 1. Introduction ═══ Compuware Corporation introduces a new code editor for demanding OS/2 programmers who need an editor they can tailor to their specific requirements. PREDITOR/2 is designed for OS/2 programmers who want to adjust their tools to reach peak productivity. PREDITOR/2, currently available by mail from Compuware and Indelible Blue, is a graphical, 32-bit editor equipped with powerful features, including the ability to display multiple windows, search across multiple files, edit and compile simultaneously, and emulate other editors. But for programmers who want more, Compuware has taken the unusual step of providing access to most of PREDITOR/2's own source code so you can customize existing features to your liking and create new options. With PREDITOR/2's Multiple Document Interface (MDI), you can view different files in separate windows, or different sections of the same file in multiple windows. You can work in as many windows, buffers, and files as you want and with as large a file as your system can handle. And you can undo and redo an unlimited number of changes. PREDITOR/2's dialog boxes enable you to quickly customize the editor's look and feel. You can also point and click to set the editor to emulate the commands and keystrokes of all previous generation editors--BRIEF, vi, Common User Access (CUA), Emacs, and ISPF--and to automatically launch the compiler appropriate for the programming language in use, whether it's C, C++, COBOL, REXX, or a host of others. To familiarize yourself with how PREDITOR/2 works with you to adapt to your programming style and increase your productivity, read through this document and test the product for yourself. ═══ 1.1. How to Use this Document ═══ The PREDITOR/2 Reviewer's Guide is designed to introduce you to the product's features and highlight a few features for you to test. Double-click on the section you want to review, or try out a few features that we have chosen to guide you through. For a list of sections, see the "Contents" window. ═══ 2. Installation and System Requirements ═══ PREDITOR/2 requires your system to have supporting hardware and software in order to install and run the product. System Requirements o IBM-compatible 386 or higher o Minimum of 8MB RAM o 5MB of available disk space for installation o OS/2 Version 2.0 with Service Pack 6055 or higher. In this Section. . . To Install Installation Utility ═══ 2.1. To Install ═══ You can install PREDITOR/2 in a matter of minutes. To install PREDITOR/2, 1. Insert Installation Diskette #1 into the A: drive. 2. In the OS/2 window, type A: at the command prompt. 3. Type install and press Enter. 4. Follow the screen prompts to complete the installation process. When the product is installed, the PREDITOR/2 folder icon appears on your display. 5. Reboot your system for the new paths to take effect. ═══ 2.2. Installation Utility ═══ Unlike most OS/2 products, PREDITOR/2 provides an installation utility which you use to update, restore, or delete the editor from your system. To perform one of these activities, 1. Double-click on the PREDITOR/2 folder icon. The PREDITOR/2 - Icon View window appears, displaying several icons. 2. Double-click on the Installation Utility icon. The Installation and Maintenance window opens, displaying a list of products you can work with. 3. Select PREDITOR/2 2.0 from this list. 4. Select the Action menu from the menu bar. This menu displays the different ways to modify the editor on your system. 5. Change the editor's state as you desire, or simply close the Installation Utility by double-clicking in the box at the upper left corner of the window or selecting Exit from the File menu. ═══ 3. Starting PREDITOR/2 ═══ You only have to load PREDITOR/2 once each time you reboot your system. After your initial load, you can minimize the editor and open it through the Stub program. In this Section. . . Loading The Stub Program ═══ 3.1. Loading ═══ To load PREDITOR/2, 1. Double-click on the PREDITOR/2 folder icon. The PREDITOR/2 - Icon View dialog box is displayed on your screen. 2. Double-click on one of two icons in this dialog box: The PREDITOR/2 icon opens the editor to a new empty file. The Execute me FIRST! icon opens the editor and the README.TXT file. This file contains code changes or additional product information not available at the time the documentation was printed, and is most useful to new users. or Type "C" at the OS/2 command prompt. The main editor window is displayed. Note: Personalizing the Editor The Personalizing PREDITOR/2 section shows you how to alter PREDITOR/2 so that your personalized preferences are automatically set each time you open the editor. ═══ 3.2. The Stub Program ═══ A benefit of using PREDITOR/2 is your ability to quickly load the editor from your OS/2 command line. The first time you run PREDITOR/2 (C.EXE), it starts an editor session. The stub program enables you to open a file in an already running editor session, at the exact location where you left off. Most products reload a copy of the product, while PREDITOR/2 opens the same copy. The stub program saves you time that other products require. To return to PREDITOR/2 via the stub program, 1. Open an OS/2 window. 2. Type C or C.EXE at the command prompt and press Enter. or 1. Double-click on the PREDITOR/2 folder icon. The editor window is displayed. ═══ 3.2.1. Advantages to Using the Stub ═══ Quick Loading Time The first time you run C.EXE, it loads the full editor. After that (assuming you do not exit the editor), C.EXE loads quickly and passes its command line parameters to the editor, which is already running. Any files specified are immediately opened. Convenient Access From an OS/2 window, you can easily start the editor using the stub program. If you know the names of files that you want to edit, you can have these files quickly loaded, open, and ready to edit. For example, typing "C C:\CONFIG.SYS *.CPP" displays the editor with the CONFIG.SYS file and all .CPP files in the current directory ready to edit. Drag and Drop As an alternative to typing a file name to start the editor with a specified file, you can use the drag and drop method. Simply drag and drop a file object onto the stub icon (this icon was automatically created for you) or onto the running editor. The editor is displayed in the foreground with the specified file loaded, open, and ready to edit. WorkFrame/2 Support If you use the IBM WorkFrame/2, use the -W parameter when invoking C.EXE. This parameter enables you to load files in one running editor rather than loading a new editor each time you double-click on a file name. PREDITOR/2 also uses the wf_goto_next_error() and wf_goto_prev_error() functions to step through the list of WorkFrame/2 compile errors. ═══ 4. Personalizing PREDITOR/2 ═══ PREDITOR/2 is designed as a powerful editor which you can so fully adapt to your personal preferences that the product becomes almost transparent. It is an editor that works the way you want it to work and doesn't get in your way. By personalizing the editor, you can more easily do your job without a lot of overhead. There are three approaches toward personalizing your editor: Customizing using the Settings notebook. Configuring by editing the CPE.CFG file and LOCAL.PEL file. Programming with the Professional Extension Language. ═══ 4.1. Customizing ═══ One of the ways in which PREDITOR/2 distinguishes itself from other text editors is its extensive customization options. Customizing your work environment to suit your needs can increase your productivity. However, if customizing your editor is a time-consuming and tedious task, you are not likely to do it. Fortunately, PREDITOR/2 enables you to make modifications easily and become more productive more quickly. In this Section. . . The Options Menu Notebook Settings Changing Notebook Settings More Features You Can Customize ═══ 4.1.1. The Options Menu ═══ To customize, simply click on the Options menu in the menu bar and select the feature you wish to modify. PREDITOR/2 has intuitive dialog boxes that quickly guide you through making changes. ═══ 4.1.2. Notebook Settings ═══ The first step to personalizing your editor is to open the Settings notebook. This notebook provides an easy, user-friendly method for customizing your editor, window, and buffer behaviors. In this Section. . . To Open the Settings Notebook... Notebook Topics Notebook Subtopics Changing Notebook Settings More Features You Can Customize. . . ═══ 4.1.2.1. To Open the Settings Notebook... ═══ 1. Select the Options menu on the menu bar. 2. Select the Settings option. The Settings dialog box is displayed. By default, this notebook opens to the Editor Settings tab. ═══ 4.1.2.2. Notebook Topics ═══ The Settings notebook is divided into three topics: Editor--settings which dictate how the editor behaves. These settings affect all buffers and windows. Window--settings which dictate how a specific window behaves. Buffer--settings which dictate how a specific buffer behaves. These topics are displayed on tabs along the right side of the notebook, as shown below. Clicking on a tab will "turn" the notebook page to that topic. ═══ 4.1.2.3. Subtopics ═══ Each topic has related subtopics which are named on the tabs appearing at the bottom of the notebook. These subtopics are specific to a topic and change accordingly. Not all editor subtopic tabs can appear along the bottom of the notebook at one time. By clicking on the arrows at the lower right corner of the notebook page, you can turn the pages and thus see additional subtopic tabs. The lists below name each Settings notebook subtopic and the preferences you can specify on the corresponding subtopic page. Editor Settings Subtopics Emulation--Select emulation mode. ISPF--Specify parameters for the ISPF emulation mode. Save--Specify Save preferences. Search--Specify Search preferences. Status bar--Set the status bar's behavior. (For example, select prompts for the Brief, vi, and Emacs emulations.) Message Level--Select the level of messaging you would like to see when working in the editor. Directories--Indicate the directories you would like to use for the editor's files. Extensions--Specify parameters for your compilers, such as: extension, compiler, template, matching pairs, tab stops, and margins. VCS--Specify the commands the editor executes when you have the version control system (VCS) enabled and want to use the get and put commands. Window Settings Subtopics Miscellaneous--Specify general information for the current window, such as scroll bar behavior and line number formats. Visible strings--Indicate how you want certain parts of the text in your window to appear. Scroll variables--Specify the number of lines or columns the cursor will move when you scroll. Buffer Settings Subtopics Buffer flags--Specify common buffer settings, such as word processing activities and read-only status. Tabs/Margins--Specify tabs and margins for buffers. ═══ 4.1.3. Changing Notebook Settings ═══ Most notebook settings can be changed by selecting or clearing a check box, selecting a radio button, or entering a value in a text box. Selections are implemented when you change notebook pages. Setting Default Values The Make default button is included on all Window and Buffer notebook settings pages. By clicking on the Make default button, you can apply the settings you select to all new windows or buffers. For example, 1. Select the Buffer topic tab at the right side of the notebook. 2. Click on the Margins/Tabs subtopic tab at the bottom of the notebook. 3. Type your tab and margin preferences in the text boxes. 4. Click on the Make default button. The preferences you entered will now apply to all new buffers. Applying Settings to All Windows and Buffers You will see Apply to all check boxes on all Window and Buffer notebook settings pages. By clicking on the check box (so that a check mark symbol appears in the box) you can apply your selected settings to all current windows or buffers. ═══ 4.1.4. More Features You Can Customize ═══ From the Options menu on the menu bar, you can also customize: Colors Fonts Key bindings Keyboard macros ═══ 4.2. Configuring ═══ When you load PREDITOR/2, it goes through an initialization process that includes executing the function local_setup(), and reading and executing the statements in the CPE.CFG (configuration) file. The function local_setup() is located in the LOCAL.PEL file. In this Section. . . CPE.CFG File LOCAL.PEL File ═══ 4.2.1. CPE.CFG File ═══ This file stores user options that are likely to change often. Because the CPE.CFG file does not have to be recompiled to implement changes, you can change options stored here and the editor will recognize these changes the next time it is started. Notebook settings and the state of the editor are also stored in the CPE.CFG file. The CPE.CFG file is similar to your AUTOEXEC.BAT file or CONFIG.SYS file, in that it initiates settings and performs tasks you want completed every time you start PREDITOR/2. Note: Online examples To learn more about configuring the CPE.CFG file, refer to the example.cfg file in the CPE directory. (By default, this directory is "C:\CPE".) Note: Quick Loading The initial loading of PREDITOR/2 may be slowed down if you store too many options in the CPE.CFG file. Therefore, use the LOCAL.PEL file to indicate options that are not likely to change often. ═══ 4.2.2. LOCAL.PEL File ═══ This file contains the local_setup() function, which reads and executes the statements in the CPE.CFG file. Here, you can specify options that will not change often. You can also specify keystrokes that correspond with activities you frequently perform. These key definitions are located in the local_keys() function. Key definitions are applied to all emulation modes. To modify LOCAL.PEL, 1. Select Open from the File menu. The Open dialog box is displayed. 2. Enter the directory and name of your LOCAL.PEL file in the Open Filename text box. For example, if you installed PREDITOR/2 in the default directory, type "c:\cpe\pel\local.pel" in this text box. 3. Click on the OK button. The LOCAL.PEL file appears in your current window. 4. Edit the file to include your preferred options. The editor will recognize your changes after you re-compile LOCAL.PEL. To recompile LOCAL.PEL, 1. Exit the editor. 2. Open an OS/2 window. 3. Make current the PEL subdirectory of your editor directory (the default directory is "C:\CPE\PEL"). 4. Execute the MAKE_AE.CMD file. You have just recompiled LOCAL.PEL. PREDITOR/2 will now recognize your options and key definitions every time you run the editor. ═══ 4.3. Programming ═══ For customers who want more, Compuware has taken the unusual step of providing access to most of PREDITOR/2's own source code, so you can personalize existing features to your liking and create new options. In this Section. . . Our C-Like Extension Language PEL Debugger Command Dialog Box PEL Compiler More About PEL ═══ 4.3.1. Our C-Like Extension Language ═══ PREDITOR/2's configurability lies largely with its Professional Extension Language (PEL). Therefore, you have the option to create a new function or change an existing function to your specifications. PEL encourages customization and configuration through its industry acceptance and ease-of-use. PEL is the piece of PREDITOR/2 that truly makes this editor unique. You can use PEL to make your editor work according to the way you do. ═══ 4.3.2. PEL Debugger ═══ The PEL debugger is a tool to help you quickly and easily debug your PEL functions. This debugger operates much like a "C" debugger. To use the PEL debugger, 1. Select the Tools menu on the menu bar. 2. Click on the PEL debugger menu item. The PEL debugger is displayed. 3. From the File menu, open the file you want to debug. 4. Set breakpoints (by double-clicking at the beginning of a line) wherever necessary. 5. Click on the Go button. The PEL debugger window is hidden and the PREDITOR/2 window is displayed. At this point you can continue using the editor normally until the PEL code in which you have set breakpoints executes. Before Debugging To debug PEL functions, you must first compile the .AE file without the -compress option. Make this change by editing the MAKE_AE.CMD file in your PEL subdirectory. Then rename the file CPE.AE to CPE.BAK and recompile the function library by executing MAKE_AE.CMD. When a breakpoint is executed, the editor window is disabled and the debugger window appears on your screen. This window highlights the source code of the current breakpoint. You can query the value of any variable, step through PEL code, and determine the source of errors. For more information on using the PEL debugger, refer to Chapter 5 in the PREDITOR/2 User's Guide, "Using the Professional Extension Language (PEL)." ═══ 4.3.3. Command Dialog Box ═══ PREDITOR/2 provides a command dialog box from which you can issue PEL commands or display the value of a variable. This provides you easy access to all PEL commands. To use the command dialog box, 1. Select the Tools menu from the menu bar. 2. Click on the Command dialog menu item. The Enter Command dialog box is displayed. 3. Enter a PEL command or select a command from the command history list. 4. Click on the OK button. Note: To display the value of a PEL variable, prefix it with a question mark. For example: ?editor_title displays the name of the editor. ═══ 4.3.4. PEL Compiler ═══ The benefit of the PEL compiler is that it is an incremental compiler, so that when you recompile your CPE.AE function library, only the changed modules are recompiled. Thus, you spend a minimal amount of time waiting for the function library to recompile after making minor changes. The PEL compiler supplied with PREDITOR/2 is a special version of Thompson Automation, Inc.'s AWK compiler. The AWK compiler creates stand-alone executables from AWK source code, while the PEL compiler produces programs that PREDITOR/2 can execute. ═══ 4.3.5. The PEL Advantage ═══ In addition to changing the LOCAL.PEL file, you can modify other PEL source files or make your own file. After compiling the editor, you can assign a key to your PEL functions. You can define keys for your new functions in the local_key() function, in the CPE.CFG file, or in the Keybindings dialog box (found on the Options menu). ═══ 5. Search and Change ═══ The ability to search for and change information is extremely valuable. Because PREDITOR/2 handles unusually large files, functional search and change support streamlines the process of updating your code. In this Section. . . Search Change Using Regular Expressions Group and Match Group Searching ═══ 5.1. Search ═══ The Search menu contains options that enable you to perform a variety of searches, based on different types of search criteria. When you invoke a search, the current default search settings are presented in the Find String dialog box. You can change any of these settings to search as you wish. To initiate a search, 1. Select the Search menu from the menu bar. The Search menu is displayed on your screen. The items in this menu guide you toward performing a detailed, direct search according to your needs. In this example, we will search for a string, using wildcards in the string's name. 2. Select the Find string option from the Search menu. 3. Type local_.*\( in the Search value text box. 4. In the Scope group box, select the File(s) radio button. 5. Enter the files you would like to search in the Files to search text box. For this example, type "c:\cpe\pel\*.pel" (or substitute your installation directory.) 6. Click on the Options button. The Find String dialog box enlarges, presenting options that enable you to further define your search. Click on any of these options that pertain to how you would like to conduct your search. This Options button has been selected in the example above. 7. Select the Find all button. The editor searches for all occurrences of the string local_.*\( in the PEL file. You can follow the editor's search progress by watching found string locations appear in the Find All List dialog box. When the search is complete, the number of files found is displayed in the status bar at the lower left of the Find All List dialog box. You can halt the search process at any time by selecting the Stop button from the dialog box. Use the buttons on the Find All List dialog box to view the strings matching local_.*\(. As you move through the strings listed in the Find All List dialog box, the cursor in the main editor window moves to the corresponding file and location. Note: ERR buttons The PREDITOR/2 toolbar displays two buttons which enable you to more quickly flip through a list of matching search strings without using the Find All List dialog box. These are the ERR buttons, located near the right end of the toolbar: When you have completed a search and the results are presented in the Find All List dialog box, 1. Minimize the Find All List dialog box by clicking on the upper right corner of the dialog box. 2. Click on the ERR buttons to move forward and backward through the results list. Your cursor will automatically move to the next occurrence found by the search process. Note: Quick Context-Sensitive Search Use the pop-up menu for a quick, context-sensitive search. Within the buffer you are searching, simply move the cursor to the word you are searching for, press and release the right mouse button, and select the Find String menu item from the pop-up menu that appears. ═══ 5.1.1. Change ═══ The Change option in the Search menu enables you to replace a specific string with a new string. This option works only in your current buffer. To replace a string, 1. Select Change from the Search menu. or Click on the Change icon on the toolbar. A Change String dialog box is displayed. 2. Type the string you want to replace in the String value text box. For this example, type cpe. 3. Type the new value for the string in the Change to value text box. For this example, type PREDITOR/2. 4. Select the Options button. The Change String dialog box will enlarge to display options for further defining your search. (This button has been selected in the figure above.) The buttons across the bottom of the Change String dialog box provide several approaches toward changing strings. Depending on how closely you want to supervise the change process, you can click on any of these buttons to initiate or cancel the process. For specific information on when to use these buttons, click on the Help button. ═══ 5.2. Using Regular Expressions ═══ PREDITOR/2 supports the following metacharacters used with regular expressions: \c Treats c as normal character: \$ finds $. ^ Matches the beginning of the line. $ Matches the end of the line. < Matches the beginning of the word. > Matches the end of the word. . Matches any character (except \n). r* Matches zero or more of r. .* Matches any string (except \n). r+ Matches one or more of r. r? Matches zero or one of r. | Alternation operator; e.g., is|are finds is or are. (r) Treats r as a group. {r} Treats r as a match group. [abc] Finds the character a or b or c. [^abc] Finds any character that is NOT a or b or c. [a-z] Finds any character in the range a-z inclusive. Positioning the Cursor When creating a regular expression, you can specify the location within a string where, after a search operation, you want to begin editing. For example, given the string Dear Dr\.[]+\c:, PREDITOR/2 searches for the text Dear Dr. followed by one or more spaces and a single colon and positions the cursor before the colon. If the cursor location were not specified, PREDITOR/2 would place the cursor at the beginning of the matching text (in this example, at the D of the word Dear). ═══ 5.3. Group and Match Group Searching ═══ A group is one or more characters treated as a unit. A match group is a type of group that encloses part of a regular expression in braces ({}). Groups are typically used to show association or precedence. The content of a match group has the same form as a group, except that PREDITOR/2 assigns a reference number (1 through 9) to each match group. Instead of typing the text, you can use the reference number. For example, 1. Type the following value in the Search value text box in the Change String dialog box: {Sailboat .*} (is|are) {fun.} This expression contains two match groups and one group. PREDITOR/2 assigns reference numbers 1 and 2 to the match groups. It does not assign a number to the group defined by parentheses. 2. In the Change to value text box, type : \1 can be \2 This replacement text tells PREDITOR/2 to reuse the first string, substitute the words can be for is or are, and reuse the second string. The table below shows two sentences that were found, and how they were changed: Found Text Changed to... Sailboat races are fun. Sailboat races can be fun. Sailboat racing is fun. Sailboat racing can be fun. ═══ 5.4. Additional Search and Change Features ═══ From the Search menu on the menu bar, you can also perform the following Search procedures: Find next occurrence of string Locate specific line number Find routines ═══ 6. Text Manipulation ═══ PREDITOR/2's text manipulation features enable you to work quickly with text, using either the keyboard or the mouse. In this Section. . . Unlimited Undo and Redo Bookmarks Editing Text with the Mouse Editing from the Toolbar Word Processing ═══ 6.1. Unlimited Undo and Redo ═══ When you edit text, there is no limit to how far you can undo and redo actions. With PREDITOR/2, this is quickly and easily accomplished through the Undo and Redo buttons on the toolbar. ═══ 6.2. Bookmarks ═══ Bookmarks represent marked locations within your file where you can position your cursor. This feature is especially useful when you are working with large files. By assigning a name to each bookmark, you can quickly return to that location by selecting the appropriate bookmark name using the Bookmark list option from the Search menu. Unlimited Availability While some code editors limit the number of bookmarks you can place, PREDITOR/2 sets no limits. ═══ 6.3. Editing Text with the Mouse ═══ PREDITOR/2 supports both mouse and keyboard use for editing text. You can use the mouse to move the cursor position, make an inactive window active, mark text, and create new windows. Supporting a 3-button mouse If your mouse has three buttons rather than two, you can add commands for the center button. Refer to the "User Interface" chapter in the PREDITOR/2 Professional Extension Language Functions and Variables by Category manual. The table below summarizes the mouse actions you can use when editing text in PREDITOR/2. Mouse Commands for Editing Text Activity Corresponding Mouse Action Position cursor Click in window. Mark text block Click and drag up or down. Mark column block Click and drag while pressing the Ctrl key or click with the right mouse button and drag. Mark a single line Click and drag across the line while pressing the Alt key. Mark multiple lines Click and drag up or down while pressing the Alt key. ═══ 6.4. Editing from the Toolbar ═══ Not only is text editing easy with PREDITOR/2, but your most basic editing commands are available right on the PREDITOR/2 toolbar. Cut Copy Paste Undo Redo ═══ 6.5. Word Processing ═══ The functions described below make word processing with PREDITOR/2 fast and easy. In this Section. . . Tabs and Margins File Extensions Word Processing Mode Word Wrap Paragraph Flow ═══ 6.5.1. Tabs and Margins ═══ The left and right margins are only used when you are in word processing mode. On the Tabs/Margins page of the Buffer settings notebook, set the left and right margins at 4 and 70, respectively. Also, set a tab stop to match your left margin, i.e., 4 7. ═══ 6.5.2. File Extensions ═══ On the Extensions page of the Editor Settings notebook, specify an extension for your text files. A commonly used text file extension is .TXT. From the selections on the Extensions page, you can specify settings for all of your .TXT files. Indicate your word wrap preference by selecting or clearing the Word Wrap check box. You can specify tab stops and margin settings for your extension. If you enter a tab stop or margin setting on this page, it overrides the default values you entered on the Tabs/Margins page. Once you've made the selections for your extension, whenever you edit a file with the specified text extension, you are automatically in word processing mode. ═══ 6.5.3. Word Processing Mode ═══ You can switch to word processing mode for a buffer by entering the wp command at an editor command prompt. You can access a command prompt through the Command dialog item on the Tools menu. There are two modes for word processing: o Mode 1--Does not automatically reflow the paragraph, and will only wrap at the end of a line. o Mode 2--Automatically reflows the current paragraph as you edit. If you do not specify a mode, the default is Mode 1. ═══ 6.5.4. Word Wrap ═══ When you are in word processing mode, text lines automatically wrap to the left margin when you type past the right margin. When you add text in the middle of a line, the current text is not overwritten, but the paragraph is reflowed (if you are in Mode 2). If you press Enter in the middle of a line, the line is split at the cursor position and the text to the right of the cursor is moved to the first column of the next line. You must then press the Tab key to move to the left margin. Note: Be sure to set a tab stop at your left margin. Note: Any text to the left of the left margin will be automatically copied at the beginning of the next line, when a line is automatically wrapped. Therefore, be sure you do not enter text before the left margin. ═══ 6.5.5. Paragraph Flow ═══ Paragraphs are delimited by empty lines. The wrap_paragraph command reflows a paragraph at the margins. This is useful when editing a text file that has different margins than those you have specified. Before you execute wrap_paragraph, you must manually move all of the text to the left margin. This is easily done in Brief emulation by selecting all of the text and pressing the Tab key. ═══ 6.6. Additional Text Editing Features ═══ Click on the appropriate item from the Edit menu to perform these additional text editing features: o Change text case - Uppercase - Lowercase - Reverse o Block indenting/outdenting ═══ 7. File Manipulation ═══ One of PREDITOR/2's strengths is its ability to handle large files while you work with and manipulate these files. Because PREDITOR/2 knows no limits, you can work with files of any size, in as many buffers and windows as you like. You can also compare the differences between two versions of a file. PREDITOR/2 makes manipulating large files a manageable task. In this Section. . . Using Multiple Document Interface (MDI) Mode Buffers and Windows Comparing Versions ═══ 7.1. Using Multiple Document Interface (MDI) Mode ═══ PREDITOR/2 enables you to display an unlimited number of windows at one time. This function is known as Multiple Document Interface (MDI) mode. MDI mode enables you to view multiple files at the same time, or view the same files in multiple places. When MDI mode is enabled, all currently opened windows can be displayed. If MDI mode is disabled, PREDITOR/2 displays only one window at a time. To enable MDI mode, 1. Click on the Windows menu on the menu bar. If the MDI mode is already enabled, a check mark symbol is shown next to the MDI mode option. You can close the menu and continue. 2. If the MDI mode option is disabled, click on the MDI mode option. A check mark symbol appears next to the MDI mode selection, indicating that MDI mode is enabled. Disabling MDI Mode To disable this option, select it from the Windows menu. The checkmark is removed, indicating that the option is disabled. ═══ 7.2. Buffers and Windows ═══ In PREDITOR/2, you open both buffers and windows to work with files. Although the two work together, buffers and windows have distinct uses. The following sections define buffers and windows. In this Section. . . Buffers Windows Creating Windows ═══ 7.2.1. Buffers ═══ A buffer is your copy of a file that you are editing. A buffer is a temporary holding place. You can edit a buffer, but the changes you make are not included in its corresponding file until you save the file. Unlike other editors, a buffer in PREDITOR/2 is not associated with a specific window. You can display any buffer in any window at any time. In MDI mode, you can display the same buffer in multiple windows. To create a new buffer, 1. Click on the File menu on the menu bar. 2. Click on the New menu item. or 1. Click on the New Buffer icon on the toolbar. You can use the options in the Buffers menu to move between and open buffers. To switch to an existing buffer, 1. Click on the Buffers menu on the menu bar. 2. Click on the menu option you prefer. 3. Follow the prompts that apply to the menu option you selected. ═══ 7.2.2. Windows ═══ A window is an area of the screen through which you can view the contents of a buffer. A window may take up the entire display or only a part of it, or may be as small as an icon. You can open multiple windows while using PREDITOR/2 in MDI mode. You can change the size and location of a window, overlap windows or position them side-by-side. See the Windows menu on the menu bar for windows options. For example, the windows below are tiled. Since a window is not associated with a specific buffer, you can use the buffer commands to change the buffer that is displayed in a window, or delete the window without affecting the buffer. ═══ 7.2.3. Creating Windows ═══ If you are in MDI mode (see "File Manipulation") you can use the mouse to create a window. In the main PREDITOR/2 window, 1. Position the mouse cursor where you want the lower left corner of the window to rest. 2. Hold down the left mouse button and drag diagonally away from this corner. 3. When you reach the location for the opposite window corner, release the mouse button. There is no limit to the number of windows you can create. ═══ 7.3. Comparing Versions ═══ It is often handy to be able to compare two versions of a file and review the differences between the versions. PREDITOR/2 enables you to compare files with the Vdiff tool. To compare files, 1. Click on the Tools menu on the menu bar. 2. Click on the VCS menu item. Another menu opens. 3. Click on the Vdiff menu item. The PVCS VDIFF dialog box is displayed. 4. Enter the name of the source file, and if necessary a revision/version number in the Reference text boxes. 5. Enter the name of the target file and, if necessary, a revision/version number in the Target text boxes. 6. Select either the Comparison or Vdiff output radio button (in the View group box) to specify how you want to view the compared results. Comparison will give you an outline view of the results, with changes highlighted. Vdiff output will display the contents of the Vdiff buffer containing the two files, with plus (+) and minus (-) signs indicating additions and subtractions. 7. If you choose to view the results in the Comparison mode, use the radio buttons in the Orientation group box to specify how the information will be displayed. 8. Select or clear the Ignore whitespace check box. If you select this check box, whitespace from indentation and other space differences is considered as part of the line. This space can cause unnecessary error notations. Clear this box to ignore whitespace. 9. Click on the OK button. PREDITOR/2 will now present to you the version differences in your specified file and versions. ═══ 8. Programming Aids ═══ PREDITOR/2 is packed with extensive features to make programming easy and flexible. In this Section. . . Unlimited Compiler Support Enabling Template Expansion Integrating with WorkFrame/2 Additional Programming Aids ═══ 8.1. Unlimited Compiler Support ═══ Not only does PREDITOR/2 provide many preset compilers, but it can support any compiler you wish to use. Add your own compiler in the Editor settings notebook, on the Extensions and Compilers page. ═══ 8.2. Enabling Template Expansion ═══ Templates are handy programming aids. From an abbreviated keyword, you can expand a template that will provide the programming construct, or fields, to follow that keyword. By default, PREDITOR/2's templates are disabled. To use a template, you must enable template expansion. To enable template expansion, 1. Select the Tools menu from the menu bar. 2. Click on the Command dialog menu item. 3. Type ec in the text box and click on the OK button. The state of template expansion is shown on the status bar. When template expansion is enabled, you can expand a template by pressing the Space Bar after a keyword. To go to the next field, press the Enter key. The command ec toggles a template on and off. Therefore, you can disable template expansion by repeating the steps listed above. ═══ 8.2.1. Specifying a Template ═══ The editor recognizes the extension of your file name and opens its corresponding template. For example, if you are editing a file named test.c, a C template is expanded when you enable template expansion. PREDITOR/2 supports automatic expansion for the following templates, as well as any others you choose to add: C/C++ COBOL REXX PASCAL AWK Clipper 50 Clipper 87 dBase FORCE ═══ 8.3. Integrating with WorkFrame/2 ═══ PREDITOR/2 integrates with IBM's WorkFrame/2. This integration enables you to specify the editor in which source files are displayed. By specifying C.EXE -W as the editor, PREDITOR/2 will be the editor used when accessing files or locating errors from WorkFrame/2. Benefits The benefits of integrating with WorkFrame/2 are: 1. Error Sources Displayed If your WorkFrame/2 compile generates error messages, you can double-click on an error message to display the corresponding source code in PREDITOR/2. You can then modify your source code to fix the error (or warning), and restart the compile process. This saves you the trouble of manually loading the editor, choosing the correct file, and locating the appropriate line number. 2. Single Editor Loaded Instead of loading a new copy of the editor into memory each time you need to view source code, the PREDITOR/2 stub (C.EXE) quickly brings the already running editor to the foreground, saving load time and memory. ═══ 8.4. Additional Programming Aids ═══ Integration OS/2 Workplace Shell drag and drop Preset Compilers IBM CSet/Cset++ Borland C/C++ Microsoft C/C++ Advantage ADA Clipper 5.0 Clipper Summer '87 COBOL FORCE dBase INTERSOLV PolyMake INTERSOLV PVCS Builder Lahey FORTRAN 77 Microsoft Masm Microsoft Quick BASIC NMake PEL Turbo C, C++ and Pascal Zortech C/C++ Tags Facility Generate .tag files Tags locate CTags make Peltags make ═══ 9. Workgroup Support ═══ Version Control System Before you can select any of the options available in the system, you must enable the version control system (VCS). To enable the VCS, select the Enable VCS check box on the VCS page of the Editor settings notebook. Get Selecting Get enables you to retrieve a file from the version control system and at the same time lock the file so that it cannot be released to another user. When you select Get, a dialog box displays the Get command. This command reflects the default value from the VCS page of the Editor settings notebook. Put Selecting Put releases the lock on the file and returns it to the version control system. When you select Put, a dialog box displays the Put command. This command reflects the default value from the VCS page of the Editor settings notebook. ═══ 10. Documentation ═══ PREDITOR/2 2.0 comes with complete documentation for both the editor and the Professional Extension Language (PEL).: In this Section. . . Product Manuals Online Help ═══ 10.1. Product Manuals ═══ PREDITOR/2 2.0 User's Guide This document covers how to install PREDITOR/2 on your workstation, configuring and customizing the editor, the user interface and basic functions, and using the Professional Extension Language (PEL) to further customize PREDITOR/2 2.0. PREDITOR/2 2.0 Professional Extension Language Functions and Variables by Category Here you will find the most commonly used PEL functions and variables arranged by category. Each category is described and followed by the related commands and a summary of their purposes. An alphabetical listing of functions and variables also helps you to find the category pertaining to a specific function or variable. PREDITOR/2 2.0 Professional Extension Language Function and Variable Reference For detailed information on all PEL functions and variables, refer to this manual. Here you will find every PEL command and its related purpose, syntax, type, description, value returned, and examples. ═══ 10.2. Online Help ═══ PREDITOR/2's online help provides extensive information on: o Functions and variables o Menu items o Settings notebook options o General product information o Technical support information. The Help menu puts online and context-sensitive help at your fingertips. In all standard keymaps and most emulation packages, the online help facility is available by pressing F1 on your keyboard. You can access Help from any menu by pressing F1 and from some dialog boxes by selecting the Help push button. You can also access any other product's online help through the NDX files. ═══ 11. Additional Product Features ═══ The many different ways you can work with PREDITOR/2 make it a comfortable product to work with on a daily basis. Beyond the powerful features you've seen so far, here are a few more that make this editor satisfying to our customers. In this Section. . . Status Bar Prompts File and Command Name Completion History Lists Additional Features ═══ 11.1. Status Bar Prompts ═══ The status bar displays information regarding your current PREDITOR/2 session. The status bar is located at the bottom of the main PREDITOR/2 window. You can customize the status bar to provide command line prompts and other information on the Status Bar page of the Editor settings notebook. If you select the Prompts option on this page, you can enter commands from the status bar, in all emulations other than CUA. To activate a command prompt from the status bar in the Brief emulation, 1. Type the keystroke command [Alt][E] from your keyboard. A command prompt appears on your status bar. 2. Type a command at the prompt and press the Enter key. ═══ 11.2. File and Command Name Completion ═══ Suppose you can't remember the full name of a file or command. Or suppose the name is longer than you wish to type. PREDITOR/2 completes file and command names to help you work more quickly. To have PREDITOR/2 complete a file or command name, 1. Type the beginning of the name at the file or command prompt. 2. Press the Tab key on your keyboard. The correct name appears at the prompt. If there is more than one name matching your request, a list of possible matches is displayed in a dialog box on your screen. Double-click on the appropriate match or press the Enter key if there is only one match. ═══ 11.3. History Lists ═══ You can also view a history list by pressing the up arrow or Page Up key on your keyboard. ═══ 11.4. Additional Features ═══ When you program with PREDITOR/2, you can also: Track errors after compiling Perform background execution of your language compilers ═══ 12. Technical Support ═══ In this Section. . . Product Support Hotline CompuServe Corporate Buyers Contact for More Information ═══ 12.1. Product Support Hotline ═══ Customers will receive 90 days of free hotline support from Compuware's 24-hour Product Support Hotline. Contact the hotline by calling 1-800-538-7822. ═══ 12.2. CompuServe ═══ For the fastest response to your question, access the Compuware section of the CompuServe OS/2 Vendor Forum, OS2AVEN. Compuware provides unlimited support through CompuServe. ═══ 12.3. Corporate Buyers ═══ Compuware will also negotiate custom support plans for corporate buyers. ═══ 12.4. Contact for More Information ═══ Frank Slootman Product Manager Compuware Corporation 31440 Northwestern Highway Farmington Hills, MI 48334 Phone: (810) 737-7596 Fax: (810) 737-7108 ═══ 13. Pricing and Availability ═══ PREDITOR/2 has a manufacturer's suggested retail price of $249 but is available at an introductory price of $149 directly from Compuware (800-535-8707) or Indelible Blue (919-878-9700) through December 31, 1994.