SlickEdit V3.3 User Manual

Slick computer accessories user manual
Table of Contents

Advertisement

Quick Links

®
SlickEdit
Corev3.3
for Eclipse
®
Code Quick | Think Slick

Advertisement

Table of Contents
loading

Summary of Contents for SlickEdit SLICKEDIT V3.3

  • Page 1 ® SlickEdit Corev3.3 for Eclipse ™ ® Code Quick | Think Slick...
  • Page 3 SlickEdit Core v3.3 for Eclipse™ ®...
  • Page 4 Copyright 1988-2008 SlickEdit Inc. SlickEdit, Visual SlickEdit, Clipboard Inheritance, DIFFzilla, SmartPaste, Context Tagging, Slick-C, and Code Quick | Think Slick are registered trademarks of SlickEdit Inc. All other products or company names are used for identification purposes only and may be...
  • Page 7: Table Of Contents

    Table of Contents 1. Introduction ... 1 Getting the Most Out of SlickEdit Cool Features ...2 Write More Code, Faster ...2 Get Started ...3 Documentation and Conventions ...4 Accessing Documentation ...4 Documentation Conventions ...4 Supported Languages and Environments ...6 Supported Languages and File Types ...6 Supported Editor Emulations ...9 Install/Uninstall ...10 System Requirements ...10...
  • Page 8 Using the Command Line to View Key Binding Associations ...31 Starting a Program from the Command Line (Shelling) ...32 Command Line Prompting ...32 Common SlickEdit Core Commands ...33 ® Using the Mouse and Keyboard ...35 Key Shortcuts in Text Boxes ...35 Redefining Common Keys ...37 4.
  • Page 9 SlickEdit Class View ...82 Outline View ...86 Find Symbol View ...88 Preview View ...89 References View ...91 Symbols View ...93 Symbol Properties View ...101 Code Templates ...103 Instantiating a Template ...103 Creating Templates ...105 Substitution Parameters ...106 Organizing Templates ...108 Template Manager Operations ...109 Template Manager Dialog ...110 Template Options Dialog ...111...
  • Page 10 Surround With ...166 Unsurround ...170 Bookmarks ...172 Named Bookmarks ...172 Pushed Bookmarks ...174 Setting Bookmark Options ...174 Setting Breakpoints ...176 Setting Conditional Breakpoints ...176 Setting Java Exception Breakpoints ...176 Commenting ...177 Commenting Blocks and Lines ...177 Creating Doc Comments ...178 String Editing ...180 Comment Wrapping ...180 Find and Replace ...182...
  • Page 11 Javadoc Editor ...252 Organizing Java Imports ...252 Java Refactoring ...253 XML and HTML ...254 XML ...254 HTML ...266 XML/HTML Formatting ...279 Enabling/Disabling XML/HTML Formatting ...279 Working with Schemes ...281 Working with Tags ...284 Formatting Settings ...285 Ada ...292 Ada Formatting Options ...292 Ada Beautifier ...292 COBOL ...299 COBOL Formatting Options ...299...
  • Page 12 Select Text to Paste Dialog ...340 Enumerate Dialog ...340 Filter Selection: Command Dialog ...341 Search Dialogs ...343 Find and Replace View ...343 Find Symbol View ...354 Go to Definition Dialog ...357 Dialogs Related to Viewing and Displaying ...358 Selective Display Dialog ...358 Macro Dialogs ...361 Save Macro Dialog ...361 List Macros Dialog ...361...
  • Page 13 SlickEdit Configuration Variables ...479 Viewing Configuration Variables ...479 Setting/Changing Configuration Variables ...479 Table of Configuration Variables ...479 Directories and Files ...484 Configuration Directory ...484 System Configuration Files ...487 File Search Order ...489 Search Order for Configuration Files ...489 Search Order for Executable Files ...489 VLX File and Color Coding ...490 Modifying the VLX File to Change a Color Definition ...491 Creating a Lexer Name and a New VLX File ...491...
  • Page 15 List of Figures 1.1. Embedded Languages in HTML ...8 1.2. HTML Embedded in Perl ...9 3.1. The Workbench ...20 3.2. Managing File Associations ...21 3.3. Opening Source Files with SlickEdit Core ...23 3.4. Status Area ...25 3.5. Redefine Common Keys Dialog ...37 4.1.
  • Page 16 SlickEdit Core v3.3 for Eclipse™ ® 6.22. Dynamic Surround: Example 2 ...163 6.23. Dynamic Surround: Example 3 ...164 6.24. Dynamic Surround: Example 4 ...165 6.25. Surround With Dialog ...167 6.26. Alias Editor Dialog for Surround With ...167 6.27. Delete Code Block Dialog ...170 6.28.
  • Page 17 SlickEdit Core v3.3 for Eclipse™ ® 7.18. XML Beautifier: Attributes/Values Tab ...260 7.19. XML Beautifier: Comments Tab ...262 7.20. XML Beautifier: Advanced Tab ...263 7.21. XML Beautifier: Schemes Tab ...264 7.22. URL Mappings Dialog ...265 7.23. Web Browser Setup Dialog ...266 7.24.
  • Page 18 10.17. Organize Imports Options Dialog ...369 10.18. 3-Way Merge Dialog ...370 10.19. DIFFzilla : Files Tab ...372 ® 10.20. DIFFzilla : File Compare Options ...374 ® 10.21. DIFFzilla : Dialog Setup Options ...376 ® 10.22. Multi-File Diff Output Dialog ...377 10.23.
  • Page 19 SlickEdit Core v3.3 for Eclipse™ ® 10.66. FTP Options: Debug Tab ...465 10.67. Reflow Comment Dialog ...466 10.68. Current Document Options Dialog ...468 11.1. Configuration Directory Preferences ...484 11.2. ISPF Options Dialog ...501 xvii...
  • Page 20 xviii...
  • Page 21: List Of Tables

    List of Tables 1.1. Supported Languages and File Types ...6 3.1. UI Commands vs. Command Line Counterpart ...33 3.2. Common SlickEdit Core Commands ...33 3.3. Text Box Editing Key ...35 4.1. Command Line Font Recommendations ...55 6.1. Preview View Information ...91 6.2.
  • Page 23: Introduction

    Chapter 1. Introduction...
  • Page 24: Getting The Most Out Of Slickedit ® Core

    Getting the Most Out of SlickEdit At SlickEdit, we take great pride in delivering unparalleled power, speed, and flexibility to our customers. Our goal is to remove the tedious tasks involved with programming, allowing you to focus on the reason you first got into programming: the thrill of writing great code.
  • Page 25: Get Started

    Get Started Tools and Utilities for more information. Get Started To get started, check out Chapter 2, Quick Start. This will guide you through configuration of some of the most common user preference settings, so you can get more work done in less time, your way.
  • Page 26: Documentation And Conventions

    Macro Programming Guide - This guide contains details about how to write macros using ® the Slick-C macro programming language. • Emulation charts for the following editors: BBEdit, Brief, CodeWarrior™, CodeWright Epsilon, GNU Emacs, ISPF, SlickEdit (Text Mode edition), Vim, Visual C++ Xcode ®...
  • Page 27 the main menu, then select Preferences from the Window submenu. Our documentation structure is set up so that instructions for using the product make up the bulk of the content, while listings of dialog boxes and options can be found in Buttons on dialogs, such as OK and Close, are not usually documented since the meaning is obvious.
  • Page 28: Supported Languages And Environments

    IDL, InstallScript, J#, Java, JavaScript, JCL, JSP, Lex, Modula-2, Objective-C, Pascal, Perl, PHP, PL/ I, PL/SQL, PowerNP™ Assembler, Progress PV-WAVE, Python, REXX, Ruby, SAS, Slick-C, Tcl, Transact-SQL, VBScript, Verilog, VHDL, Visual Ba- sic, Visual Basic .NET, Windows batch files, x86...
  • Page 29 ActionScript, Ada, C, C#, C++, CFML, Ch, COBOL, DB2, Fortran, High Level Assembler, HTML, IDL, InstallScript, J#, Java, JavaScript, Modula-2, Ob- jective-C, Pascal, Perl, PHP, PL/SQL, Slick-C, Tcl, Visual Basic, Visual Basic .NET, XML, XSD ActionScript, Ada, ANTLR, C, C#, C++, CFML, CF-...
  • Page 30: Embedded Languages In Html

    Embedded Languages SlickEdit Core recognizes languages embedded in HTML, COBOL, Perl scripts, and UNIX shell scripts. ® When editing embedded languages, all language-sensitive features are supported, including Context Tag- ging , SmartPaste , Syntax Expansion, Syntax Indenting, and Color Coding. In fact, Context Tagging ®...
  • Page 31: Supported Editor Emulations

    Supported Editor Emulations document terminator with the color coding lexer name. The following Perl example shows HTML embed- ded in a Perl script. Unknown languages are color-coded in string color. Figure 1.2. HTML Embedded in Perl Supported Editor Emulations SlickEdit Core provides keyboard emulations for the following editors: ®...
  • Page 32: Install/Uninstall

    System Requirements Install/Uninstall System Requirements SlickEdit Core runs on Microsoft Vista™, Windows XP, or Windows 2000 as well as Linux x86/GTK ® ® ® ® 2 (kernel 2.4 or later), with the following requirements: • 256 MB minimum recommended memory •...
  • Page 33: Licensing

    Setup on Windows 1. Open a command line utility and change to the SlickEditCoreSetup subdirectory of your Eclipse installation. 2. Run the following command as a user with administrator privileges: .\ias add SlickEditCore3.3.0 Setup on Linux 1. Open a command line utility and change to the SlickEditCoreSetup subdirectory of your Eclipse installation.
  • Page 34 • To buy a full license, visit the SlickEdit Web site at License option. That will take you directly to the product page for SlickEdit Core. • To enter a license key for an existing license, select Enter a license key. Activation After you enter a license key to activate the product, SlickEdit Internet.
  • Page 35: Uninstalling Slickedit ® Core

    Uninstalling SlickEdit Core ® FLEXnet Publisher identifies your machine using a combination of information about the hardware on this machine. No personal data is used in creating this ID. Small changes to your machine, like switching dis- play cards, upgrading memory, or changing hard drives can cause the license to become "damaged". A li- cense can also be damaged by changing the system date by more than one day.
  • Page 36: Help And Product Support

    Help and Product Support There are several ways to get help about SlickEdit • Use the Help system - See Using the Help System • Search the FAQ - A list of frequently asked questions and answers is available from the Product Sup- port section of our Web site at http://www.slickedit.com.
  • Page 37: Quick Start

    Chapter 2. Quick Start SlickEdit Core provides numerous configuration options so you can customize your environment accord- ® ing to your working style and preferences. To help get you up and running as quickly as possible, the Quick Start describes commonly used option settings that are found in most programming editors. The options fall into two categories: General Options Extension-Specific...
  • Page 38: General Options

    General Options General options affect all language extensions. You may want to look through all of the dialogs mentioned to see if there are any other settings you want to make. To see a listing of all of the option dialogs and their descriptions, see the appropriate topics in Use the Preferences dialog to access SlickEdit ences dialog, from the main menu, click Window...
  • Page 39: Extension-Specific Options

    Extension-Specific Options These options are specific to file extensions, and are available on the Extension Options dialog (open the Preferences dialog, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting). When the Extension Options dialog is displayed, before setting the options, select the ex- tension you wish to affect from the Extension drop-down list.
  • Page 40 Extension-Specific Options processor macros that you use in your code for portability or convenience. For performance considera- tions, Context Tagging does not do full preprocessing, so preprocessing that interferes with normal C++ syntax can cause the parser to miss certain symbols. To configure your preprocessing to avoid these omissions, see C/C++ Preprocessing.
  • Page 41: User Interface

    Chapter 3. User Interface...
  • Page 42: Screen Layout

    Screen Layout Note SlickEdit Core does not modify the Eclipse screen layout, so this information is intended only as ® a brief overview. See "Workbench User Guide" in the Eclipse Help for more details about the Ec- lipse layout. The Workbench The workbench is the area where the workspace, projects, and programs are contained.
  • Page 43: The Workspace

    Perspectives The Workspace The workspace is a collection of projects. A project contains all resources such as source files, sub- folders, icons, and generated code. By default, the workspace files are placed in a workspace subdirectory under the install directory. Perspectives A perspective in Eclipse is a set of views and editors.
  • Page 44 The SlickEdit Core Editor ® To associate files to edit, complete the following steps: 1. From the main menu, click Window Preferences. 2. Expand General, then expand Editors and select File Associations. 3. From the File Types list, select the desired file type. Or, to add an extension, click Add. 4.
  • Page 45: Switching Between The Slickedit ® Core Editor And Eclipse Editors

    • To open a source file in the workspace, from the Navigator view, select the desired file. Right-click the file, then select Open. • To open a file using a specific editor, from the Navigator view, select the desired file. Right-click the file, then select Open With.
  • Page 46: Menus

    • Switch to C/C++ Editor – Changes to the CDT editor. Visible only for C/C++ files. • Switch to Ant Editor – Changes to the Eclipse Ant build.xml editor. Visible only for build.xml files. • Switch to Plug-in Manifest Editor – Changes to the Eclipse plugin.xml editor. Visible only for plu- gin.xml files.
  • Page 47: Views

    lipse Editors Views Views are windows that show various types of information that you can move around and dock within Ec- lipse. See SlickEdit Views for information. Status Area The status area for a perspective and an editor displays text messages. It indicates if the current mode is insert, overwrite, or replace, and if a file is read-only.
  • Page 48: Command Line

    vironment. By the same token, some SlickEdit commands may not be available. Chapter 10, SlickEdit Core Dialogs into the following categories: • Editing Dialogs • Search Dialogs • Editing Dialogs • Dialogs Related to Viewing and Displaying • Macro Dialogs •...
  • Page 49: Slickedit Views

    SlickEdit Views Views complement the file opened in the editor. You can move, resize, and customize views easily. All the views and perspectives have live connectivity, meaning that if a file name or property in one view is modified, then that change stays true for that item in every area of the workspace. Views support editors and provide alternative presentations as well as ways to navigate the information in your workbench.
  • Page 50: Find And Replace

    Available SlickEdit Core Views ® Lists breakpoints (and exception breakpoints for Java) and allows you to modify them. You must use this view to set breakpoint properties. It can be used when you are not in debug mode. Right-click within the view window to display a context menu which allows you to jump to the location of a breakpoint or modify breakpoints.
  • Page 51 Find and Replace View. See Find and Replace for more information about searching and replacing. Slick-C Stack ® Displays errors that occur within the editor. If errors occur during normal use, you can send this informa- tion to Product Support as a reference (see Contacting Product Support).
  • Page 52: The Slickedit ® Core Command Line

    The SlickEdit Core Command Line ® SlickEdit Core provides its own command line as a means to execute most SlickEdit Core operations so you can work without taking your hands off of the keyboard. This is useful for less frequently used opera- tions that may not warrant a key binding, or complex commands that require arguments.
  • Page 53: Command Line History

    Command Line History The command line maintains a command history, allowing you to quickly reuse previously entered com- mands. Once the command line is open, use the arrow keys to scroll up and down in the command his- tory. Command Line Completions As you type a command, a list of matching completions is displayed, including any command line argu- ments used in a previous command.
  • Page 54: Starting A Program From The Command Line (Shelling)

    You can use the SlickEdit Core command line to determine what keys are associated with what com- ® mands, and vice-versa. Alternatively, you can use the Key Bindings dialog (click Window SlickEdit and click General in the tree, then double-click the Key Bindings setting, or, use the gui_keybindings command) to see a list of command/key binding associations.
  • Page 55: Common Slickedit ® Core Commands

    Many commands that display dialog boxes have equivalent commands that prompt for arguments on the command line or on the Eclipse message area. For faster prompting than the dialog boxes allow, you can choose to be prompted for arguments on the command line instead. To set this option, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting.
  • Page 56 Command f symbol /search_string/options c/search/replace/options sb name gb name man command del filename dos command math expr Using the Mouse and Keyboard Description Find a symbol Search for a string Replace a string Set a bookmark Jump to a bookmark Show UNIX man page Delete file Execute command outside of editor...
  • Page 57: Using The Mouse And Keyboard

    Using the Mouse and Keyboard SlickEdit Core provides four ways to launch operations: commands, menu items, key bindings, and but- ® tons. For example, to launch the Open dialog box in order to open a file, you could use any of the follow- ing methods: •...
  • Page 58 Key or Key Sequence Ctrl+Shift+O Ctrl+E Ctrl+Backspace Ctrl+K Ctrl+Shift+K Ctrl+Shift+L Ctrl+Left arrow Ctrl+Right arrow Ctrl+V Ctrl+X Ctrl+C Ctrl+Shift+X Ctrl+Shift+C Ctrl+Shift+V Shift+Home Shift+End Shift+Click Backspace Delete Left arrow Right arrow Key Shortcuts in Text Boxes Operation List matches to partially-typed parameter Expand alias Cut to end of line Cut line...
  • Page 59: Redefining Common Keys

    Key or Key Sequence Home Double-click Triple-click Redefining Common Keys Many users have a preference for the functions of the keys Backspace, Delete, Enter, Tab, and Home. The Redefine Common Keys dialog is designed for changing the function of these keys. To access this dialog, from the main menu, click Window tree, then double-click the Redefine Common Keys setting.
  • Page 60 Redefining Common Keys In the Key list box, select the name of the key that you want to configure. The commands available for that key are then displayed in the Command list box. Additional options can be set using the check boxes.
  • Page 61: User Preferences

    Chapter 4. User Preferences...
  • Page 62: Introduction To User Preferences

    Introduction to User Preferences SlickEdit Core can be customized to accommodate your own individual preferences. Most user prefer- ® ence information is available by clicking Window eral in the tree. User preferences are broken into two categories: preferences that apply to all languages (global prefer- ences), and preferences that apply to specific language extensions.
  • Page 63: Emulations

    Emulations Emulation is the process of imitating another program. SlickEdit ings for 13 editors so that you can use the style to which you are accustomed, making your coding experi- ence as efficient as possible. The Key Bindings dialog allows you see what keys or key sequences are bound to what commands. Emulation charts are also available as printable PDF documents in the docs subdirectory of your SlickEd- it Core installation directory.
  • Page 64: Changing Emulations

    provide a default key binding for a particular SlickEdit Core command, the corresponding Visual C++ key binding is used. • Xcode Changing Emulations After SlickEdit Core is installed, you are prompted to choose an emulation. CUA is the default emulation ®...
  • Page 65: Determining Keys/Functions

    Determining Keys/Functions By saving your custom key bindings when you switch emulations, when you return to the original emula- tion those bindings are automatically available. For example, if you have created and saved custom bind- ings in the CUA emulation, and then switch to Vim, switching back to CUA will make your custom bind- ings for CUA available again.
  • Page 66: Key And Mouse Bindings

    Key and Mouse Bindings Key and mouse bindings are quick ways to execute operations in SlickEdit most efficient. Time is wasted each time you lift your hand from the keyboard to grab the mouse, and more time is wasted when you move your hand back to the keyboard in preparation for more typing. Therefore, if you learn the key bindings associated with operations that you use most frequently, you will save time coding.
  • Page 67: Managing Bindings

    Preferences, expand SlickEdit and click General in the tree, then double-click the Key Bindings setting, or use the gui_keybindings command. The first time the Key Bindings dialog is invoked, the Building Tag File progress bar may be displayed while Slick-C macro code is tagged. ®...
  • Page 68 Bindings are based on the editor emulation mode (CUA is the default). The title bar of the Key Bindings dialog shows the current emulation. (To change the emulation mode, see The Search by command and Search by key sequence boxes are used to filter the data. See and Filtering Bindings.
  • Page 69 Language Editing Modes for more information. The bottom of the dialog contains documentation (if available) for the selected command. Columns can be sorted by clicking on the column headers. An up or down arrow in the column header in- dicates ascending or descending sort order. All of the columns as well as the documentation pane can be resized by dragging the separator bars.
  • Page 70: Bind Key Dialog

    • Double-click on the row. 3. When you initiate a binding, the Bind Key dialog is displayed with focus in the Key Sequence box. Figure 4.4. Bind Key Dialog • For a key binding, press the key sequence just as you would to use it. For example, to bind sur- round_with to Ctrl+W, simply press Ctrl+W.
  • Page 71 XML file with a name and location that you can specify. To export your bindings: 1. Click the Export button on the Key Bindings dialog. The Save As dialog is displayed. Managing Bindings Removing Bindings Core, you can edit the Slick-C ® for more information. Viewing and Filtering Creating Bindings.
  • Page 72: Key Binding Settings

    Key Binding Settings 2. If you want, change the directory location and change the file name to something more meaningful to you, such as myname_cua.xml. 3. Click Save. Importing Bindings Imported bindings override any existing bindings for the selected emulation. For example, if you have the surround_with command bound to Ctrl+W, and import surround_with bound to Ctrl+Q, then Ctrl+Q is now the binding for that command in the selected emulation.
  • Page 73 Cursor, Mouse, and Scroll Set- tings bound to Ctrl+C, rather than the command bound to Ctrl+X,Ctrl+C. To change this option, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the More Tab .
  • Page 74: Cursor, Mouse, And Scroll Settings

    Cursor, Mouse, and Scroll Settings This section describes settings for the cursor, mouse, and scroll style. For cursor navigation information, Cursor Navigation. Setting the Cursor Style You can use a text mode style cursor instead of a vertical cursor. To set this option, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the Gen- eral setting.
  • Page 75: Setting Fonts And Colors

    Setting Fonts and Colors The SlickEdit Core editor and views do not use the Eclipse color and font settings. To change the fonts ® and colors in the SlickEdit Core editor and views, change the color and font settings using the SlickEdit Core options.
  • Page 76 Font recommendations are given for the best screen display. The information below contains recommen- ded fonts for some of the screen elements. Note Some font names are portable font names which are translated into other fonts. This allows Slick- macros and dialog boxes to be portable across Windows and UNIX. ®...
  • Page 77: Colors

    font element: Table 4.1. Command Line Font Recommendations Platform Windows Linux UNIX Selection List Fonts Choose Courier for best display of selection lists that need a fixed font. Dialog Box Fonts Choose MS Sans Serif as an attractive font for dialogs. Text Box Fonts Choose System or MS Sans Serif for fonts used in text boxes.
  • Page 78: Setting Colors For Screen Elements

    ent screen elements in SlickEdit ® keywords, comments, strings, etc. as well as other user interface elements like the message area or the status line. Window colors and backgrounds are set using the facilities provided by the operating system. Color and Color Coding are different. Color Coding is a feature that combines current line coloring, modi- fied line coloring, and language-specific coloring.
  • Page 79 is displayed, allowing you to pick a color from the palette, or set your own custom color using RGB val- ues. Note If you have chosen the Selection screen element, note that SlickEdit Core will attempt to render selections using your normal color settings for the Foreground color. The selected foreground color will only be used if there is not enough contrast between the font colors to be readable.
  • Page 80 Restoring Settings on Startup <BODY> </BODY> </HTML> HTMLEOF...
  • Page 81: Restoring Settings On Startup

    Restoring Settings on Startup By default, the files, current directory, and more from the previous edit session are automatically restored when you switch workspaces or close and re-open the editor. To access auto restore settings, from the main menu, click Window and click General in the tree, then double-click the General setting.
  • Page 83: Context Tagging

    Chapter 5. Context Tagging ®...
  • Page 84: Context Tagging Overview

    Context Tagging Context Tagging is a feature set that performs expression type, scope, and inheritance analysis as well as symbol look-up within the current context to help you navigate and write code. Context Tagging uses an engine that parses your code and builds a database of symbol definitions and declarations—commonly referred to as tags.
  • Page 85: Parameter Information

    Parameter Information 4. Clear the Auto-list members check box. The following example shows the results of what is displayed after typing a Dot when entering Java source. Notice that the Javadoc comments are displayed in a mini-HTML browser. To view documenta- tion for Java APIs, you must install the source files as part of the JDK.
  • Page 86: Auto List Compatible Parameters

    select the next or previous occurrence. Figure 5.3. Parameter Info: Example 1 The example below shows the result of pressing Alt+Comma inside the argument list of the WIN32 API function CreateWindowEx. Figure 5.4. Parameter Info: Example 1 Auto List Compatible Parameters When typing a function operator such as the open parenthesis, (, a list of compatible variables and ex- pressions for the current argument is displayed.
  • Page 87: Completions

    Completions The following example displays the results of pressing Alt+Comma after an assignment operator. The Rect, pRect, and argv are not listed because their types do not match. Figure 5.5. Auto List Compatible Parameters Completions Completions save keystrokes as you are typing code by providing a way to automatically complete par- tially-typed text.
  • Page 88: Statement Level Tagging

    • Find Symbol - This view is used to locate symbols (tags) in your code. It allows you to search for sym- bols by name using either a regular expression, substring, or fast prefix match. A quicker way to access this view is to use the Search •...
  • Page 89: Building And Managing Tag Files

    Building Tag Files Building and Managing Tag Files Context Tagging creates tag files to store information about symbols and, optionally, cross-reference in- ® formation from your source code. Many of the most powerful SlickEdit Core features use this information ® to speed your coding.
  • Page 90 To create tag files for the languages listed, enter the base directory for your package (if it is not already filled in), as well as the destination of your tag file. Click Create tag file(s) and the Building Tag Files dia- log box opens showing the progress as the tag file is built.
  • Page 91 Generate References creates an inverted file index so that you can quickly find which files con- tain which symbols. Workspace tag files create this index by default. This information is used to build a list of references (using the push_ref command, bound to Ctrl+/ in the CUA emulation). In general, it’s better to have the reference list contain functions that are part of this workspace and not in libraries.
  • Page 92: Managing Tag Files

    Tagging needs all symbol information to work properly. A tag file is automatically built for the run-time libraries of C#, InstallShield, JavaScript, Perl, PV-WAVE, Slick-C , Tornado, TCL, and Visual Basic .NET, and usually it is not necessary to build tag files for the ®...
  • Page 93 The left pane of the dialog lists all of your tag files, separated into categories (see low). A tag file having a File bitmap with blue arrows indicates the tag file is built with support for cross- referencing. The right pane of the dialog lists all the source files indexed by the currently selected tag file. For information about the buttons available, see Tag File Categories The Tag File categories, described below, are listed on the left side of the Context Tagging...
  • Page 94: Rebuild Tag File Dialog

    • Other Extension-Specific Tag Categories - The tag files listed under each of the other language-spe- cific categories apply to that language only. Use these categories to add tag files for third-party librar- ies. Tag File Search Order When doing tag lookups, the tag files are searched in a specific order, which affects the tags found. The following are examples of the order in which tag files are searched.
  • Page 95: Context Tagging Options

    The following settings are available: • Retag modified files only - If checked, SlickEdit tagging files that have been modified since the last time they were tagged. If not checked, SlickEdit Core will rebuild the entire tag file from scratch. •...
  • Page 96: Context Tagging Options Dialog

    tions setting. See Context Tagging Options Dialog To improve tagging performance, you may need to adjust the Tag file cache size on the Virtual Memory tab of the General Options dialog (click Window click General in the tree, then double-click the General setting). See more information.
  • Page 97: Editing Features

    Chapter 6. Editing Features...
  • Page 98: Navigation

    Navigation There are two types of navigation in SlickEdit navigation and structure matching, and within text and files. Code Navigation Some of the most powerful features in SlickEdit Navigation. These features allow you to navigate your code the way you think about it, rather than just as a set of files.
  • Page 99 (a shortcut for find_proc). If editing a ® Slick-C macro, then enter the push_tag command (Ctrl+Dot) to find the symbol at the cursor. The push_tag command actually calls the find_proc command with the symbol name at the cursor to per- form the task.
  • Page 100 To place the cursor on the opposite end of the structure when the cursor is on a begin or end keyword pair, press Ctrl+] (find_matching_paren command or from the menu click Navigate Parenthesis). The find_matching_paren command supports matching parenthesis pairs { }, [ ] and ( ). For Python, SlickEdit Core supports the matching of the colon (:) token and the end of context.
  • Page 101: Cursor Navigation

    Setting the Paren Match Style As you type a closing parenthesis, highlight and matching options are available. To specify these options, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the Gen- eral setting. On the General Options dialog, select the style options.
  • Page 102 The cursor is moved half the window width to the left/right as well. Navigating in Statements and Tags The following navigation commands are available for languages that support statement tagging: • next_tag/prev_tag - Places the cursor on the next/previous tag definition, skipping any tags filtered out by the Outline view.
  • Page 103: Symbol Browsing

    Symbol Browsing goto_line <linenumber>. Navigating to an Offset To seek to a byte offset in the current buffer, from the main menu click Navigate Go to Offset, or use the gui_seek command. This function is the same as the C lseek function. However, if you have opened the file with tab expansion, the seek position on disk may be different.
  • Page 104: Class View

    Symbol Browsing SlickEdit Core gives you the ability to browse and view symbols in your files or workspaces. Symbol ® browsing relies on Context Tagging edit. There are several views that display information as you work to help you find what you need at ex- actly the time you need it: •...
  • Page 105 Class View If you are coding within a class, the top pane (hierarchy pane) of the view window shows the base class hierarchy for the current class. The bottom pane (members pane) shows all members of the current class, as well as all members visible from inherited superclass(es) and implemented interface(s). The name of...
  • Page 106: Class Exclusion Manager Dialog

    Class View the current class is displayed at the top of the view window. If you are not currently in a class (or enum or interface), the hierarchy pane is blank and the members pane shows the symbols in the current file. The name of the current file is displayed at the top of the view window.
  • Page 107 To add an item to the list, type the name in the Add Item To List text box, then press Enter. Click the buttons to remove selected items or to clear the list. Filtering and Sorting in the Members Pane Right-click on a member in the members pane to access a list of filtering and sorting options as well as options for code navigation and modification.
  • Page 108: Outline View

    • Show in Symbol Browser - Jumps to the member in the symbol browser. See information. • Increase/Decrease Listed Members Limit - Controls the number of members displayed in the mem- bers pane. When this option is selected, the command line will prompt you for a variable value. The de- fault is 400.
  • Page 109: Outline View

    The name of the file is displayed at the top of the view window. Hover the mouse over the bitmap of any symbol in the window to see a tooltip that shows the symbol’s signature and scope. To jump to the definition of the symbol in the code, pushing a bookmark in the process, double-click on any symbol.
  • Page 110: Find Symbol View

    • Display Files - (Disabled in SlickEdit Core) Displays the names of the files that are open in the editor. Deselect this option to only show symbols in the current file, allowing you to use the window as a true outline view.
  • Page 111: Preview View

    provides this same capability, it cannot match the speed of Find Symbol. Find Symbol View for information about the options that are available on this view window. Preview View Note In SlickEdit Core v3.3, the Preview view replaces the Symbol view found in previous versions. ®...
  • Page 112 The Preview view contains the following components: • Symbol list - This is the list of all symbols which are currently being previewed. In most cases, this is a single symbol. In some cases, such as for the symbol under the cursor, multiple matches are shown, such as the definition and declaration of a symbol.
  • Page 113: References View

    Table 6.1. Preview View Information Editor Element in Use Any source file open in the editor The Outline, Symbols, Class, and Find Symbol views Call Tree dialog and References view The Base Classes and Derived Classes symbol browser dialogs The SlickEdit Core Search view List Members and Auto-Complete results References View The References view displays the list of symbol references (uses) found the last time that you used the...
  • Page 114 The References view automatically comes into focus when you use the Go to Reference feature or when you select References from the right-click menu of the Class, Outline, or Symbols view windows. Note Typically, you only want to view references that occur in project files, and not run-time libraries, which can be very large.
  • Page 115: Symbols View

    References View Options Right-click on a symbol or file in the left pane of the References view to display the following options: • Contents - Displays the following menu of save and print operations for the references browser tree: • Save - Writes the items displayed in the references browser to a text file, prompting you for a file name and directory location.
  • Page 116 The top part of the view window contains an option and combo boxes that are used for filtering. The bot- tom part of the window lists the symbols grouped by category. Symbols in your workspace are listed in the top group labeled "Workspace." The rest of the symbols are grouped by language or compiler. Hover the mouse over the bitmap of a symbol to see a tooltip that shows the symbol’s signature and scope.
  • Page 117 • The items listed under the Classes folder are global classes that are not part of a namespace or package. To clear the filters and see all items again, select the Show all tags option. For non-object-oriented languages, use the Member combo box to search, since there are no classes. You can hide the combo boxes to save space by right-clicking and selecting Filters, then unchecking the corresponding check box.
  • Page 118 • Base Classes - Displays the Base Classes dialog, which shows a list of base classes for the selected class on the left with the list of that class’s members on the right. Base classes are displayed in a tree view, allowing you to explore up the inheritance hierarchy.
  • Page 119 Symbols View Right-click in this tree to display/modify the symbol filters. Items in the tree can be expanded to view uses recursively. Double-click or press the spacebar on an item in the tree list to go to an item. Double-click and Space are the same except when the item is a prototype that has a corresponding code section.
  • Page 120: Symbol Browser Filter Options Dialog

    Symbols View The left pane of each dialog contains a tree showing the class inheritance hierarchy (the class list). The right pane shows a list of the members of the selected class (the member list). If the focus is in the class list, the selected class will be displayed in the member list, if it can be resolved. If the focus is in the member list, the selected item will be shown in the Preview view, and is the name as it appears within the class definition.
  • Page 121 Each option has three states: If the option is selected, only the specified items will be displayed. If the op- tion is deselected, the specified item will not be displayed. If the option is in a neutral state, the item will not be considered in the filter.
  • Page 122 • Inherited - When selected, only inherited members that this class can access are displayed. When unselected, only members of this class are displayed. • Preprocessed - When selected, only members expanded by pre-processing are displayed. This is specifically useful for MFC classes. When unselected, only non-preprocess members displayed. •...
  • Page 123: Symbol Properties View

    • Native - When selected, only methods explicitly defined with the native keyword are displayed. When unselected, only non-native methods are displayed. • Data Members • Show data only - When selected, only data members are displayed. When unselected, only meth- ods are displayed.
  • Page 124 Code Templates...
  • Page 125: Code Templates

    Code Templates Code templates are pre-defined units of code that you can use to automate the creation of common code elements, like a standard class implementation or design patterns. You can create templates for a whole file or multiple files. Templates can contain substitution parameters that are replaced when the template is instantiated—when a new element is created from that template.
  • Page 126: Parameter Entry Dialog

    Instantiating a Template We call the process of creating new files from a template "instantiating a template". When a template is instantiated, you are prompted for the name of the new item. This name is often used heavily in the tem- plate.
  • Page 127: Creating Templates

    Creating Templates Creating Templates Creating templates is very much like writing code. To create a new code template, complete the following steps: 1. Create the template source files. 2. Insert substitution parameters into the template files. 3. Use the Template Manager to create a new template. 4.
  • Page 128: Substitution Parameters

    Substitution Parameters tails. Use the Template Manager to Create a New Template Click File SlickEdit Template Manager to bring up the Template Manager. Select the User Template folder in the tree, and right-click in either the Categories pane or the Templates pane to create a new template.
  • Page 129 default delimiter $ is used: Table 6.2. Predefined Substitution Parameters Parameter Name $itemname$ $fileinputname$ $safeitemname$ $upcasesafeitemname$ $lowcasesafeitemname$ $tempdir$ $rootnamespace$ $ampmtime$ $localtime$ $time$ $localdate$ $date$ $projectname$ Substitution Parameters Description Name of item entered, as on the Add New Item dia- log. Name of item entered, as on the Add New Item dia- log, without file extension.
  • Page 130: Organizing Templates

    Parameter Name $safeprojectname$ $workspacename$ $safeworkspacename$ $projectworkingdir$ $projectbuilddir$ $projectconfigname$ $workspaceconfigname$ $projectdir$ $workspacedir$ $username$ Organizing Templates Templates are organized into category hierarchies as shown on the Add New Item dialog. These category hierarchies map exactly to the directory structure under the locations for installed and user templates. To create a new template item category: Organizing Templates Description...
  • Page 131: Template Manager Operations

    1. Create a new folder under the user templates directory. For example, if you wanted to create a Dialogs category for Java project items, you would create the following directory: <ConfigDir>/templates/ItemTemplates/Java/Dialogs/ 2. Place all templates for the category under this directory. 3.
  • Page 132: Template Manager Dialog

    Template Manager Dialog The Template Manager dialog is made up of the following elements: • Categories - Lists a hierarchy of item categories for installed and user template items. Note Installed templates can be viewed but not modified. • Templates - Lists the templates for the currently selected category. When you select a template, you are able to edit its properties in the lower half of the dialog.
  • Page 133: Template Options Dialog

    menu inside the list of parameters. Template Options Dialog Use this dialog to edit options that are common to all templates. You can launch this dialog from the Tem- plate Manager dialog by clicking the Options button. Global Substitution Parameters The Global substitution parameters area on the Template Options dialog lists the substitution paramet- ers that are common to all templates.
  • Page 134: Add New Item Dialog

    from a template, as when adding an item template to your project from the Add New Item dialog box, you can configure your template to replace all substitution parameters with values. For a list of pre-defined substitution parameters, see Predefined Substitution The Add Parameter dialog contains the following: •...
  • Page 135: Locating Templates

    • Location - Enter the location to which to save the item. • Add to current project - When selected, the new item is added to the current project. • Add - After you have selected a template item, provided a name and a location, click Add to instantiate the template item.
  • Page 136 organized, see Organizing Templates 2. Create or edit a code file (e.g. *.cpp, *.java, etc.). Replace occurrences of substitutable text with substitution parameter names. For example, you might want to make the name of a C++ or Java class into a substitution parameter, in which case you could use the $safeitemname$ substitution paramet- er.
  • Page 137 class $safeitemname$ { Creating a Multi-file Template A multi-file template is a template item that creates more than one file. Multi-file templates require the use of substitution parameters to ensure that file name and extension parts are used when creating each file of the template item. For example, a C++ class typically consists of: •...
  • Page 138: Code Template Metadata File Reference

    <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File> <File TargetFilename="$fileinputname$.h">MyClass.h</File> </Files> </TemplateContent> </SETemplate> Code Template Metadata File Reference Template metadata describes the template item, its files, and how to create the template. Template metadata files have a .setemplate extension. The SETemplate element is the root element of a template file. Table 6.3.
  • Page 139 Elements DefaultName DefaultName is an optional child element of TemplateDetails. Specifies the default item name when us- ing the Add New Item dialog box. This element becomes more important in multi-file templates where you need to specify a DefaultName element in order to create file names from parts of the input item name. See the example below.
  • Page 140 • Child elements - None. • Parent elements - TemplateDetails. • Value - Text value is required. The text value specifies the description of the template item. The de- scription is shown on the Add New Item dialog box. Example The following example illustrates the metadata for an item template for a custom Java class.
  • Page 141 Example The following example illustrates the metadata for an item template for a C++ class that creates a header file (.h) and implementation file (.cpp). <?xml version="1.0" ?> <!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd"> <SETemplate Version="1.0" Type="Item"> <TemplateDetails> <Name>My C++ Class</Name> <Description>My complete C++ class header and implementation</Description> <DefaultName>MyClass.cpp</DefaultName>...
  • Page 142 <Description>My complete C++ class header and implementation</Description> <DefaultName>MyClass.cpp</DefaultName> </TemplateDetails> <TemplateContent> <Files> <File TargetFilename="$fileinputname$.cpp">MyClass.cpp</File> <File TargetFilename="$fileinputname$.h">MyClass.h</File> </Files> </TemplateContent> </SETemplate> Name Name is a required child element of TemplateDetails. Specifies the name for the template item. See the example below. • Attributes - None. •...
  • Page 143 Parameter Parameter is an optional child element of Parameters. Specifies a custom substitution parameter for the template item. For a list of pre-defined substitution parameters, see See the example below. • Attributes: • Name - Parameter name. This is the name of the substitution parameter WITHOUT delimiters. For example, if the delimiter is $ (the default), then a substitution parameter that inserts a copyright string would be defined as "copyright"...
  • Page 144 Parameters Parameters is a required child element of TemplateContent. Specifies custom substitution parameters for the template item. For a list of pre-defined substitution parameters, see meters. See the example below. • Attributes - None. • Child elements - Parameter. • Parent elements - TemplateContent. •...
  • Page 145 • Version - Template version number. The current version is "1.0". • Type - Template type. Valid types are: "Item". • Child elements - TemplateDetails, TemplateContent. • Parent elements - None. • Value - N/A. Example The following example illustrates the metadata for an item template for a custom Java class. <?xml version="1.0"...
  • Page 146 Example The following example illustrates the metadata for an item template for a custom Java class. <?xml version="1.0" ?> <!DOCTYPE SETemplate SYSTEM "http://www.slickedit.com/dtd/vse/setemplate/1.0/setemplate.dtd"> <SETemplate Version="1.0" Type="Item"> <TemplateDetails> <Name>My Java Class</Name> <Description>My custom Java class</Description> <DefaultName>MyClass.java</DefaultName> <SortOrder>100</SortOrder> </TemplateDetails> <TemplateContent> <Files> <File>MyClass.java</File> </Files>...
  • Page 147 <TemplateContent> <Files> <File>MyClass.java</File> </Files> </TemplateContent> </SETemplate> TemplateDetails TemplateDetails is a required child element of SETemplate. Describes the template item. Details are used to display the template item on the Add New Item dialog box. • Attributes - None. • Child elements - DefaultName, Description, Name, SortOrder. •...
  • Page 148: Text Editing

    Text Editing SlickEdit Core provides familiar operations for selecting, copying, moving, and operating on text, with en- ® hanced capabilities to meet the needs of developers. This section also describes how to work with lines, sort text, and insert literal characters into your text. Selections SlickEdit Core supports three kinds of selections: character, line, and block.
  • Page 149 Block selections, also known as column selections, are used to process columns of text. To select a block, use one of the following methods: • Keyboard method - Position the cursor at the beginning of the text to be selected. Next, enter the se- lect_block command (Ctrl+B or Edit block to be selected by using the arrow keys (or by using the mouse).
  • Page 150: Selection Key

    The figure below shows how the original example changes when you type "int" at the cursor while the block is selected. Figure 6.15. Block Insert Mode: Example 3 Line Selections A line selection is any selection that includes one or more complete lines of text. Line selections are usu- ally the best way to edit lines of code, and they also work with SmartPaste according to the surrounding code (see SmartPaste).
  • Page 151 Key or Key Sequence Shift+Up Shift+Down Shift+PgUp Shift+PgDn Ctrl+Shift+Home Ctrl+Shift+End Ctrl+X Ctrl+C Ctrl+V Ctrl+Shift+V Different selection styles found in non-CUA compliant editors, such as Brief, are also provided. To use a different selection style, use the erences, expand SlickEdit and click General in the tree, double-click the General setting). Modifying Selected Text After you select text, you can invoke a key or type a command that modifies the selected text.
  • Page 152 Command mou_move_to_cursor mou_copy_to_cursor mou_click L list_clipboards copy_to_clipboard append_to_clipboard append_cut copy_to_cursor Selections Key Sequence or Menu Item Ctrl+R Ctrl+Shift+R Left click Ctrl+Shift+V Ctrl+C Ctrl+Shift+C Ctrl+Shift+X None Description change the line insert style. To access the line insert style, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the Gener- al setting.
  • Page 153 Command fill_selection, gui_fill_selection Edit indent_selection unindent_selection lowcase_selection upcase_selection shift_selection_left shift_selection_right overlay_block adjust_block reflow_selection Selections Key Sequence or Menu Item Fill Shift+Tab Edit Other Lowcase Edit Other Upcase Shift+F7 Shift+F8 Edit Other Overlay block Edit Other Adjust block Source Format Selection Description log, click the More Tab...
  • Page 154 Command execute_selection put <filename>, gui_write_selection append <filename>, gui_append_selection sort_within_selection sort_on_selection align_selection_left align_selection_center align_selection_right Selections Key Sequence or Menu Item Alt+= None None None None None None None None Description lected area. Line selections are word-wrapped with current margin settings. Block selections are word-wrapped within the columns of the block.
  • Page 155 Adding Numbers to a Selection: Enumeration You can automatically add incrementing numbers to a selection of code by using the enumerate com- mand. To configure enumeration properties, from the main menu click Edit list of the options that are available on the Enumerate dialog, see Counting Selected Lines and Characters SlickEdit Core automatically counts the number of lines and characters in a selection.
  • Page 156: Cutting, Copying, And Moving Text

    Cutting, Copying, and Moving Text 7. Select entire file 8. Deselect Except for empty character selections and line selections, the selections are locked so that the cursor re- mains stationary. Setting Selection Options Many options are available for setting your selection preferences. To access these options, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting.
  • Page 157: Working With Lines

    If using Brief emulation and a clipboard is wanted when cutting text, bind the commands cut_word, cut_end_line, and cut_line to the appropriate keys. A stack of the last 15 (default maximum) of the most recently used clipboards is kept. You can change the maximum number of clipboards in the General Options dialog box (click Window SlickEdit and click General in the tree, then double-click the General setting.
  • Page 158: Sorting Text

    Sorting Text dent levels, or decimal points shown. To set these options, from the main menu, click Window Prefer- ences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the General Tab .
  • Page 159 The following options are available: • Type of sort - Choose the type of sort that you prefer from the following options: • Sort buffer - When this option is selected, the entire contents of the buffer that you are working in are sorted.
  • Page 160: Inserting Literal Characters

    To use the command line for sorting, first activate the command line by pressing Esc. Sort command syn- tax is in the form SortCommandOptionLetter(s). The following sort commands are available: • sort_buffer - Sorts the current buffer. • sort_within_selection - Sorts text within a selected area. This command supports line and block se- lections only.
  • Page 161: Color Coding

    Resetting Modified Lines on Save Color Coding This feature is designed to combine current line coloring, modified line coloring, and language-specific coloring. By default, the fundamental mode colors the current line. Languages with specific support already defined (i.e. keywords, comments, etc.) use language-specific coloring. If modified line coloring is active, the left edge of the window displays a different color depending on whether the line was inserted or modified.
  • Page 162: Creating Color Coding For A New Language

    Creating Color Coding for a New Language To create color coding support for your language, complete the following steps: 1. From the main menu, click Window then double-click the Color Coding setting. The Color Coding Setup dialog box is displayed. 2.
  • Page 163 Color Coding Configuration Select the language that you wish to work with from the Lexer name drop-down list. Click New to prompt for a lexer name to start a new language-specific color coding definition (see Creat- ing Color Coding for a New Language).
  • Page 164: Color Coding Settings

    Color Coding Settings and how to create a new lexer name, see VLX File and Color Coding. Color Coding Settings There are several extension-specific settings that can be made to affect Color Coding. To access these options, from the main menu, click Window Preferences SlickEdit General, then double-click...
  • Page 165: Syntax Indent And Smartpaste

    Syntax Indent Syntax Indent and SmartPaste ® Syntax Indent SmartPaste are two of the many SlickEdit features designed to decrease typing, im- ® proving your coding efficiency. Syntax Indent automatically indents code to the correct levels. There are two ways that code can be indented: by using the automatic Syntax Indent feature, and/or by using tabs. SmartPaste reindents pasted text to the correct level based on surrounding code.
  • Page 166: Smartpaste

    Note • When you change the tab stops and indent for all languages except COBOL, change the Tabs text box to +<value> where value is the same value used for the Syntax indent text box. The Tabs text box only affects how tab characters are expanded on the screen. This does not affect the indent when pressing Tab, or the amount of indent for statements inside a code block.
  • Page 167 Completions Note SmartPaste only works with line selections. For information about creating a line selection, see Line Selections.
  • Page 168: Completions

    Completions Completions save keystrokes as you are typing code by providing a way to automatically complete par- tially-typed text. There are several types of completions in SlickEdit • Auto-Complete - A feature set that includes syntax, keyword, and symbol completions. •...
  • Page 169 These visual hints can also be individually turned on or off through the Auto-Complete options. See Complete Tab Auto-Complete can be activated manually by using the autocomplete command. By default, this command is not bound to a key. Key bindings can be set with the Key Bindings dialog (click Win- Preferences, expand SlickEdit and click General in the tree, then double-click the Key Bindings setting).
  • Page 170: Word Completion

    Auto-Complete options can be configured for each file extension type. This allows you to activate and de- activate particular features on a per-language basis. To change Auto-Complete options, see Complete Tab Word Completion Word Completions search the current editor window for text matching the prefix at the current cursor posi- tion.
  • Page 171 Aliases To configure Auto-Complete settings, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting. Choose the extension you wish to work with from the Extension drop-down list, then select the Auto-Complete tab. For a listing of these options and descriptions, see Auto-Complete Tab...
  • Page 172: Aliases

    Aliases Aliases are identifiers that you can quickly type which are then expanded into snippets of text. You can use aliases for commonly typed function names, statements, or to insert several lines of code. There are two types of aliases in SlickEdit ®...
  • Page 173 Directory Aliases 2. Select alias.slk and click OK. The Alias Editor dialog appears. 3. Click New, then type the characters you wish to use for an identifier in the Alias Name text box. 4. Click OK. The identifier you entered is now displayed in the list box in the Alias Editor dialog. 5.
  • Page 174: Extension-Specific Aliases

    If you keep source code in a version directory tree, you might want to set an environment variable and embed the environment variable in the alias value. For example, if you have a directory named c:\version20\src\project2\, define a p2 alias and give it a value such as %VERSION%\src\project2\.
  • Page 175: Alias Editor Dialog

    1. From the main menu, click Window then double-click the File Extension Setup setting. The Extension Options dialog appears. 2. Select the General Tab 3. In the Extension drop-down list, select the file extension that you wish to work with. 4.
  • Page 176 Extension-Specific Aliases Alias names are displayed in the list box at the top left of this dialog box. The value for the selected alias name is displayed in the large text box at the top right of this dialog. Click Delete to remove a selected ali- as and its value.
  • Page 177: Alias Escape Sequences

    • You can use special escape sequences in your aliases, which will be substituted upon expan- sion with certain values. See • You can also specify parameters in alias values. When the alias is expanded, you are promp- ted with a dialog to input the values. See 4.
  • Page 178: Escape Sequence Examples

    Preserves leading spaces - place at the beginning of the first alias line. Parameter replacement. See Calls the specified Slick-C optional argument. Inserts the value of the environment variable spe- cified. Indicates where the text to be surrounded will be placed.
  • Page 179 Alias Name and Description wm - A WinMain function template with indenting and a cursor position. Parameter Prompting Parameters can be set up for aliases, so that when the alias is expanded, you are prompted with a dialog to input the values. This is useful for reducing even more key strokes for repetitive tasks when using ali- ases that may require different values each time they are used.
  • Page 180 7. In the large text field on the right side of the Alias Editor, you can now type the alias value. In the places where you want parameter prompting to occur, type %(ParamName), where ParamName is the parameter name that you entered in Step 3. 8.
  • Page 181: Syntax Expansion

    { Additionally, for C, C#, C++, J#, Java, and Slick-C next_hotspot command (Ctrl+[) to jump the cursor to the next part of the statement. In the case of the for loop above, Ctrl+[ would move the cursor from the group in parentheses to the code block.
  • Page 182: Modifying Syntax Expansion Templates

    To change the minimum expandable keyword length, enter the value by using the Minimum expandable keyword length spin box. To set options such as brace style, click the Options button on the Extension Options dialog. SlickEdit Core can display Syntax Expansion choices for the word prefix under the cursor. To ®...
  • Page 183 5. Modify the prg_expand_space function to provide the spacebar key the desired support. If you can rely on extension-specific aliases, follow the comment in this function. 6. Use the load command Macro Steps 4 and 5 require a good understanding of the Slick-C ing. See the Slick-C Macro Programming Guide for more information.
  • Page 184: Dynamic Surround And Surround With

    Dynamic Surround Dynamic Surround and Surround With Two SlickEdit Core features that allow you to surround text with text are Dynamic Surround, which lets ® you surround existing statements with block statements, and Surround With, which lets you surround any selected text with predefined language structures, or any text that you specify.
  • Page 185 Dynamic Surround After pressing Space to expand the template, Dynamic Surround is activated, with a blue rectangle drawn around the expanded statement, as shown below: Figure 6.22. Dynamic Surround: Example 2...
  • Page 186 Dynamic Surround Pressing the Down arrow key pulls the code block into the statement, indented to the correct levels, as shown below: Figure 6.23. Dynamic Surround: Example 3...
  • Page 187 Dynamic Surround The finished code is shown as follows: Figure 6.24. Dynamic Surround: Example 4...
  • Page 188: Surround With

    Statements that are pulled into the block are indented according to your settings on the Extension Options dialog (Window double-click the File Extension Setup setting). The color of the rectangle box guide is controlled by the Block Matching screen element on the Color Settings dialog (Window it and click General in the tree, then double-click the Color setting).
  • Page 189: Surround With Dialog

    Surround With surround, right-click, and select Surround Selection With, or use the surround_with command. The Surround With dialog appears, with a pre-defined list of structures based on the current file extension. Figure 6.25. Surround With Dialog Select the structure you wish to surround with, then click OK. If there is no selection and you activate Surround With, the current line or code block will be automatically highlighted for surrounding (the same function performed by the select_code_block command).
  • Page 190 To modify one of the Surround With structures, complete the following steps: 1. Select the structure that you wish to modify. Notice the template for the structure that appears in the text box on the right side of the Alias Editor. 2.
  • Page 191 • surround_with - This command is used to display the Surround With dialog, allowing you to pick a structure to surround selected text with. This command can be bound to a key—see for more information. • sur_text - This is a Slick-C function that can only be used inside of a Surround With template. It is ®...
  • Page 192: Unsurround

    Unsurround is a feature that lets you remove the surrounding text from a code block. This is particularly effective when used with Dynamic Surround. Unsurround is supported for the following languages: Action- Script, AWK, C#, C++, CFML, HTML, Java, JavaScript, Perl, PHP, Slick-C , Tcl, and XML.
  • Page 193 Bookmarks structure into a different location, because as soon as the text is pasted, SlickEdit Core enters Dynamic ® Surround mode, allowing you to pull statements into the pasted block. The Delete Code Block dialog also contains an option to Always just delete line when cut_line or de- lete_line operations are invoked.
  • Page 194: Bookmarks

    Bookmarks Bookmarks are used to save the current edit location, so you can quickly return to it later. There are two types of bookmarks: • Named Bookmarks - Used to mark long-term, meaningful locations in the code, or to quickly set a tem- porary, named bookmark on the current line.
  • Page 195 Pushed Bookmarks name is used if the bookmark is inside of a symbol. The file name is used if there is no symbol on the line or if the file does not support Context Tagging ® Using a Key Binding for the Name You can set a bookmark that takes its name from the key used to set it.
  • Page 196: Pushed Bookmarks

    Pushed Bookmarks Pushed bookmarks are stored on a stack. New bookmarks can be pushed onto the stack, preserving the current location. Popping the stack removes the top bookmark and navigates the cursor to the location of the previous bookmark. Pushed bookmarks do not have names and cannot be manipulated on the Book- marks view.
  • Page 197 Setting Breakpoints Most bookmark options are located on the Search Tab of the General Options dialog (click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting). See Search Tab for a listing of the available options. Another option is available by setting a macro variable.
  • Page 198: Setting Breakpoints

    Setting Conditional Breakpoints Setting Breakpoints The quickest way to set or clear a breakpoint is to press F9. This toggles the breakpoint for the current line. The breakpoints functionality in SlickEdit Core integrates with the Eclipse Breakpoints view. This view ®...
  • Page 199: Commenting

    Commenting SlickEdit Core makes commenting your code easy. You can comment out selected text, or type the start ® characters for a new doc comment and have the doc comment skeleton automatically expanded. SlickEd- it Core also makes your comments easier to read by automatically wrapping them as you type. Existing comments can be "reflowed"...
  • Page 200: Creating Doc Comments

    right sides of a line comment. For code examples and descriptions of the other available options, see Creating Doc Comments Doc comments are specially formatted comments that are processed by tools that extract and present the information in a formatted manner. Doc comments follow a predefined structure, based on the program- ming language and the tool processing the comments.
  • Page 201 Javadoc Format To use the Javadoc commenting format, select the start characters /** and use style @param. Check In- sert leading *. Using the following code sample: /**[CURSOR_HERE]*/ int setDimensions(int length, int width, int height) { Pressing Enter at the "cursor here" location results in the following automatic completion: * [CURSOR_HERE] * @param length * @param width...
  • Page 202: String Editing

    Extension drop-down list, then select Split strings on Enter. Comment Wrapping Comments can be set to automatically wrap to the next line as you type. This feature is available for C, C++, C#, Java, and Slick-C files. ® To activate comment wrapping, from the main menu, click Window and click General, then double-click the File Extension Setup setting.
  • Page 203 Find and Replace types of width settings: • Fixed - Comments will be formatted to a specified width. • Automatic - Comments will be formatted according to the width of existing comments. • Fixed right margin - Lines will break before a specified number of columns has been reached. For more details on comment wrapping configuration, see Comment Wrap Tab Reflowing Comments...
  • Page 204: Find And Replace

    Quick Search and Replace Find and Replace SlickEdit Core provides several different ways to search and replace: ® • For the fastest method of searching and replacing, use Quick Search and Replace • To find and replace text "on the fly," or, as you type, use Incremental Searching.
  • Page 205: Incremental Search Key

    using the command line, use the i_search command (Ctrl+I). To start a reverse incremental search, use the reverse_i_search command (Ctrl+Shift+I). The following key combinations (based on the default CUA emulation) take on a different definition during an incremental search: Table 6.9. Incremental Search Key Keys Ctrl+R Ctrl+S...
  • Page 206: Find And Replace Commands

    Keys Ctrl+Shift+W Incremental searching stops when you press a key that does not insert a character. You can press Esc to terminate an incremental search (only during prompting). Press and hold Ctrl+Alt+Shift to terminate a long search. You can retrieve your previous search string by invoking the i_search or reverse_i_search command and pressing Ctrl+S or Ctrl+R, respectively, before entering a search string.
  • Page 207 Option W=SlickEdit-regular-expression W:PS W:SS Find and Replace Commands Description Interpret search string as a SlickEdit pression. Interpret search string as UNIX regular expression. Interpret string as a Brief regular expression. Do not interpret search string as a regular expres- sion. Wrap to beginning/end when string not found.
  • Page 208 Option , (Comma) XCCLetters CCCLetters Find and Replace Commands Description character of a DBCS sequence unless this option is specified. Delimiter to separate ambiguous options. Requires the first character of search string NOT be one of the color coding elements specified. For ex- ample, XCS requires that the first character not be in a comment or string.
  • Page 209: Replace Key

    Option & To set default search options, see If the * option is not specified, you will be prompted with the message Yes/ No/Last/Go/Quit/Suspend? for each occurrence of the "Search for" string. Replace and c Commands The replace commands, replace and c, can be used in the command line. The syntax of these com- mands is: c/string1/string2[/options] replace/string1/string2[/options]...
  • Page 210 Y or Space N or Backspace L or Dot G or ! Q or Esc Ctrl+G Ctrl+R Ctrl+S Ctrl+T Ctrl+W Ctrl+C Ctrl+M F1 or ? Find and Replace Commands Action Make change and continue searching. No change and continue searching. Make change and stop searching.
  • Page 211: Replace Command Search Examples

    Replace Command Search Examples The table below provides examples of using command line replace. Table 6.12. Replace Command Search Examples Example c $/$\$ c/x/y/m c $x$y$m c/x/y/e* c/i/something_more_meaningful/w c/i/j/w=[A-Za-z] replace/Test/TEMP/v Find and Replace View Action Description Replace occurrences of forward slashes with back slashes.
  • Page 212: Find And Replace View

    Find and Replace View Find and Replace View You can use the Find and Replace view (Ctrl+F or Search SlickEdit Search/Replace) to specify search and replace options and conduct search and replace operations on selections, single files, or mul- tiple files. Figure 6.28.
  • Page 213 prompted to name the operation. To access a saved operation, select Saved List from the submenu, then pick the saved operation to load. Syntax-Driven Searching To reduce the number of false positives in your searches, you can restrict the search based on program syntax.
  • Page 214: Find Symbol View

    Find Symbol View the only open search view windows. You can open and close search results view windows by right- clicking on the Search Results tab in the SlickEdit Core Search view. Right-click in the SlickEdit Core Search view to access more options. See Find in Files Tab for more in- formation.
  • Page 215 Characters have special meaning during search and replace operations. • UNIX regular expressions - When regular expressions are turned on for a search and replace com- mand, the backslash character (\) has special meaning in the replace string. A backslash in the replace string has the same meaning as in the search string except that \c and \:char are not supported.
  • Page 216 Example Replace with: \d12 SlickEdit regular expression: Search for: ^a+$ Replace with: \12 Brief regular expression: Search for: <a+$ Replace with: \d12 Using Expressions to Search for Binary Characters Search for a sequence of binary characters by using regular expressions to specify hex or decimal char- acters.
  • Page 217 Example UNIX regular expression: Search for: (if|while) Replace with: x\1y\2 SlickEdit regular expression: ® Search for: {if|while} Replace with: x#0y#1 Brief regular expression: Search for: {{if}|while}} Replace with: x\0y\1 UNIX regular expression: Search for: ^(.*?),(.*)$ Replace with: \2,\1 SlickEdit regular expression: Search for: ^{?*},{?*}$ Replace with: #1,#0 Brief regular expression:...
  • Page 218: Undoing/Redoing Replacements

    • SlickEdit regular expression: Search for: {[0-9]#} Replace with: $#0 • Brief regular expression: Search for: {[0-9]\:+} Replace with: $\0 If the minimal matching operator (UNIX +?, SlickEdit and Brief syntax +) was used in the search string in- stead of the maximal matching operator (UNIX +, SlickEdit syntax #, Brief syntax \:@), the above search and replace would prefix each digit in the file with a "$"...
  • Page 219: Beautifying Code

    Follow the cross-reference links to learn more about working with each beautifier. • Ada - See Beautifier. • C/C++, C#, Java, JavaScript, Slick-C - These beautifiers contain the same options and settings. See ® C/C++ Beautifier.
  • Page 220: Refactoring

    For information about refactoring results, see Reviewing Refactoring Changes. Quick Refactoring Quick Refactoring supports C++, C#, Java, and Slick-C , and performs refactorings using Context Tag- ® ging rather than a formal language parser. Quick Refactoring is generally faster and less stringent than ®...
  • Page 221: Quick Extract Method Refactoring

    It discovers any undeclared variables and creates them as parameters to the new method. The ex- tracted method is created in the same scope as the original method. Quick Extract Method is only avail- able for C++, C#, Java, and Slick-C ®...
  • Page 222: C++ Refactoring

    This refactoring allows you to add, delete, and re-order parameters for a selected function. The refactor- ing will modify the parameter list for the selected function and all of its counterparts within the class hier- archy. Quick Modify Parameter List is only available for C++, C#, Java, and Slick-C Quick Replace Literal with Constant Replaces the selected literal with a constant, replacing use of the literal with the new constant.
  • Page 223: C++ Refactoring: Rename

    C++ Refactoring Available C++ Refactorings To access the C++ refactorings, from the main menu, click C/C++ Refactoring. The C++ Refactoring menu can be also be accessed from the right-click menus within the Symbols and Outline views. Rename Rename is used to rename variables, methods, and classes. It uses Context Tagging to identify: ®...
  • Page 224: C++ Refactoring: Modify Parameter List

    C++ Refactoring The Method name text box allows you to choose the name of the newly extracted method. Uncheck Re- place selected code with call to new method if you do not want the original method to be modified. This option is unavailable if the selected block contains a return, continue, or break statement. Modify Parameter List Modify Parameter List allows you to add, delete, and re-order parameters for a selected function.
  • Page 225: C++ Refactoring: Push Down To Derived Class

    C++ Refactoring Push Down to Derived Class Moves class members to a class that inherits from the selected class. Figure 6.34. C++ Refactoring: Push Down to Derived Class...
  • Page 226: C++ Refactoring: Push Down - Selecting Members To Move

    C++ Refactoring If a member of the super class is used by multiple subclasses, then the member is moved to all of the subclasses that access that member, so that when the refactoring is done, everything will compile. Any member that is explicitly accessed through an instance of the super class (or an instance that is cast to the super class) cannot be moved.
  • Page 227: C++ Refactoring: Pull Up To Super Class

    C++ Refactoring Pull Up to Super Class Automates moving members from a selected class to one of its directly-inherited base classes. Figure 6.36. C++ Refactoring: Pull Up to Super Class...
  • Page 228: C++ Refactoring: Pull Up - Selecting Members To Move

    C++ Refactoring Class members are pulled up one level at a time. Constructors and destructors cannot be moved. Any de- pendencies that are not part of the original class will not be moved to the new base class, and might not be accessible, thereby causing compilation errors.
  • Page 229 C++ Refactoring Encapsulate Field Generates get and set functions for the specified variable and makes that variable private. All references to the variable are replaced with references to the getter or setter, as appropriate. Figure 6.38. C++ Refactoring: Encapsulate Field...
  • Page 230 Extract Class Breaks a large class into a better abstraction by moving some responsibilities into a new class or inter- face. This refactoring creates new files. When using the Extract Class refactoring, keep in mind the follow- ing information: • The default path uses the same directory as the original class. •...
  • Page 231: C++ Refactoring: Extract Super Class

    C++ Refactoring Extract Super Class Breaks a large class into a better abstraction by moving some responsibilities into a new class/interface. The extracted class becomes the super class of the original class. Figure 6.41. C++ Refactoring: Extract Super Class...
  • Page 232 C++ Refactoring Move Method Moves a method from one class to another and updates references accordingly. The original method may be converted to a delegate method if there are references to the original method that cannot be converted to a reference to the moved method. Figure 6.42.
  • Page 233: C++ Refactoring: Move Static Field

    C++ Refactoring If the method is static, you will be prompted for the target class. Figure 6.43. C++ Refactoring: Move Method 2 Move Static Field Moves a static data member from one class to another and updates references accordingly. Figure 6.44. C++ Refactoring: Move Static Field...
  • Page 234: C++ Refactoring: Convert Global To Static Field

    C++ Refactoring Convert Static to Instance Method Changes a static method to an instance method and updates any references to change how the method is accessed. Convert Global to Static Field Moves globally-declared variables into a static field in a class, and updates references to refer to the new static variable.
  • Page 235: C++ Refactoring: Convert Local To Field

    C++ Refactoring Convert Local to Field Moves a local variable from the body of a method into an instance member variable in the current class. References to the local variable are replaced with references to the new data member. This refactoring cannot be used to convert a method parameter to a field.
  • Page 236 C++ Refactoring Create Standard Methods Creates an assignment operator, copy constructor, default constructor, and destructor for the selected class. Figure 6.48. C++ Refactoring: Create Standard Methods...
  • Page 237 C++ Refactoring Test Parsing Configuration Test Parsing Configuration analyzes the C++ refactoring configuration that has been set up and reports key information and errors. Generally, it is designed as a debugging aid when a refactoring fails, but it can also be valuable as a means to view the parameters that are set for a refactoring. You can verify the re- factoring setup before proceeding to avoid errors.
  • Page 238 C++ Refactoring Figure 6.49. Test Parsing Configuration: Example 1...
  • Page 239 C++ Refactoring The following example shows a warning that is not severe enough to prevent parsing of the file. Figure 6.50. Test Parsing Configuration: Example 2...
  • Page 240 C++ Refactoring Finally, the following example shows a test resulting in no errors or warnings.
  • Page 241 Reviewing Refactoring Changes Figure 6.51. Test Parsing Configuration: Example 3...
  • Page 242: Reviewing Refactoring Changes

    Reviewing Refactoring Changes Reviewing Refactoring Changes When a refactoring finishes, the Refactoring results dialog box is displayed, allowing you to review the changes. Figure 6.52. Refactoring Results There are three panes in this window: • The left pane is read-only and shows the original file(s). •...
  • Page 243: Java Refactoring

    Java Refactoring • The bottom pane lists all files that have been modified by the refactoring. Clicking on any file in this list brings that file into view, where it can be reviewed and edited. Click Save All at the bottom of this window to save all the refactoring and editing changes that were made on all files.
  • Page 244 Viewing and Displaying • User Supertype Where Possible • Inline • Introduce Factory • Encapsulate Field See the Eclipse Help for descriptions and other information regarding Java refactoring (Java Develop- ment User Guide Reference Refactoring).
  • Page 245: Viewing And Displaying

    Viewing and Displaying SlickEdit Core offers several features for viewing and displaying. ® Hexadecimal View and Edit Mode To view a binary or text file in a hex/text view mode, click Display the commands hex or linehex). If closing a file while viewing it in hex mode, then the next time the file is edited, it will be displayed in hex/text view mode.
  • Page 246: Selective Display

    To define which characters to display, from the main menu click Window SlickEdit and click General in the tree, then double-click the General setting and select the Special Characters tab. See Defining Special Characters Note Viewing special characters is only available for ASCII files. Special Character Toggles The following toggles are available on the view menu: •...
  • Page 247 hide. This dialog is displayed by clicking Display command. When Selective Display is active, a Plus (+) or Minus (-) bitmap is placed before hidden or expanded lines in the editor window margin. The following screenshot shows a sample file with two function defini- tions expanded and the rest collapsed.
  • Page 248 well. This command ignores hidden lines and only copies visible text. This operation does not work with block selections. • To redisplay all lines and remove the Plus and Minus bitmaps: From the main menu click View Show All (show_all command). Expanding/Collapsing Code Blocks SlickEdit Core provides a way to expand and collapse code blocks without having to clutter the gutter...
  • Page 249: Other Display Options

    Other Display Options The Selective Display dialog also contains static options for expanding/collapsing sub-levels. See Select- ive Display Dialog for more information and details about the available settings. Other Display Options This section describes other general display options that you might find useful. Displaying a Vertical Line You can choose to display a vertical line in all files that are open for editing.
  • Page 251: Language-Specific Editing

    Chapter 7. Language-Specific Editing...
  • Page 252: Language-Specific Editing Overview

    Language-Specific Editing Overview Many features in SlickEdit Core are language-specific and based on the language editing mode. You ® can also configure different settings for different languages. See Options below for more information. This chapter also includes specific information about extension options, beautifiers, and more for the fol- lowing languages: •...
  • Page 253: Extension Options

    Extension Options Extension Options The behavior of the editor can be customized for files based on specific language extensions. The Exten- sion Options dialog box (shown below) contains the settings that can be configured for file extensions. To display this dialog, from the main menu, click Window Preferences, expand SlickEdit and click Gen- eral in the tree, then double-click the File Extension Setup setting.
  • Page 254 C and C++ To have the setup data for one extension refer to another extension, click the Refer to button (located at the top right corner of the Extension Options dialog box). This button is unavailable if other extensions already refer to this one. Refer to is also available on the New Extension dialog box to set when adding a new extension.
  • Page 255: C And C

    C and C++ This section describes some of the advanced features and options that are available in SlickEdit for C and C++, including extension-specific formatting options, the C/C++ Beautifier, compiler settings, and preprocessing. The default editing mode in SlickEdit Core for C and C++ allows for programming in either language. If you are coding to strict ANSI C standards, you should configure the value of the macro variable def_ansic_exts to contain a space-delimited list of extensions for files you want interpreted as ANSI C.
  • Page 256: C/C++ Formatting Options: Indentation Tab

    Use this tab to specify the brace style used by template editing and smart indenting. Choose the style you want to use then select from the following options: • Insert braces immediately - Specifies whether template should be inserted with braces. •...
  • Page 257 The following options are available: • Indent first level of code - Specifies whether smart indenting should indent the cursor after declara- tions such as functions. • Indent CASE from SWITCH - When checked, template editing places the case statement indented from the switch statement column.
  • Page 258: C/C++ Formatting Options: Other Tab

    lows: myLongMethodName(firstarg, secondarg, thirdarg myLongMethodName( firstarg, secondarg, thirdarg, • No space before paren - Determines whether a space is placed between a keyword such as if, for, or while and the open paren when syntax expansion occurs. Example: (if( or if (). •...
  • Page 259: C/C++ Beautifier

    Currently, this beautifier supports beautifying Slick-C colons like C. Note The C#, Java, JavaScript, and Slick-C Beautifiers contain the same options and settings as the C/C++ Beautifier. The following buttons and settings are available on the Beautifier: • Beautify - Beautifies current selection or buffer and closes the dialog box.
  • Page 260 • Sync extension options - When this option is selected, the extension options are updated to reflect any changes that these dialogs have in common. For example, changing the begin-end style to Style 2 will update your brace style for Syntax Expansion. The tabs on the C/C++ Beautifier are described in the sections below.
  • Page 261 Indenting Tab This tab provides indenting parameters that you can use when working with C/C++ files in SlickEdit Core. Figure 7.7. C/C++ Beautifier: Indenting Tab The following options and settings are available: • Indent with tabs - When this option is selected, tab characters are used for the leading indent of lines. This value defaults to the Tabs text box on the Preferences, expand SlickEdit and click General in the tree, then double-click the File Exten- sion Setup setting).
  • Page 262 to the Syntax indent text box on the • Original tab size - The value in this field specifies the size of the original expansion tab. SlickEdit Core uses the expansion size of your original file to handle reusing indent amounts from your original file. Currently the beautifier only reuses the original source files indenting for comments.
  • Page 263 The following options are available: • Indent stand alone comments - Indicates whether comments that appear on lines by themselves with no statement text to the left are indented to the current statement indent level. For example: /* stand alone comment // another stand alone comment i=1;...
  • Page 264 column as the original source file. Trailing comments are comments that appear at the end of lines that contain statements or declarations. • Original relative column - When this option is selected, trailing comments are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file. Trail- ing comments are comments that are displayed at the end of lines that contain statements or declara- tions.
  • Page 265 The following options are available: • Indent preprocessing - When this option is selected, the indent before the # character of prepro- cessing is set to indicate the preprocessing nesting level. • Indent inside block - When this option is selected, preprocessing inside brace block is indented when inside preprocessing.
  • Page 266: C/C++ Compiler Settings

    C/C++ Compiler Settings To define a new scheme, set the various beautify options, and press the Save Scheme button. User defined schemes are stored in uformat.ini. C/C++ Compiler Settings In order to correctly perform full preprocessing, parsing, symbol analysis, and cross-referencing, SlickEdit Core needs to emulate the implementation-specific parsing behavior of your compiler, including ®...
  • Page 267: C/C++ Preprocessing

    Note It is possible to select other compilers for individual projects. In those cases, the project-specific compiler is used and overrides the global default. SlickEdit Core ships with header files for each compiler, and the correct header file will appear in the Header File field.
  • Page 268: C/C++ Preprocessing Dialog

    #define MYNAMESPACEDECL(name) #define MYPACKEDMACRO #define MTYPELESS #define MYPOINTER(t) #define MYNULL #define MYENDNAMESPACE Among them, the only two that are harmless are MYTYPELESS and MYNULL, because they just create name aliases for types or constants. However, the other four are troublesome and cause the entire code snippet to be unparsable unless you configure SlickEdit Core to be aware of these preprocessor macros.
  • Page 269 7. When finished, click OK. 8. A prompt appears asking whether to rebuild your workspace tag file. Click Yes. Preprocessor macros are stored in usercpp.h, located in your configuration directory. Rather than using the dialog, you can add large numbers of #defines directly to this file. You may want to make sure that your entire development team has an up-to-date copy of this configuration file once you have added all of your local preprocessor macros.
  • Page 270: Java

    Java This section describes some of the features and options that are available for Java, including extension- specific options, the Javadoc Editor, and more. Java Formatting Options Options are available for Java language file extensions for changing the smart indenting and template editing style settings.
  • Page 271 The following settings are available: • Begin-End Styles - Specify the brace style to be used for template editing and smart indenting, then choose from the following options: • Insert braces immediately - Specifies whether template should be inserted with braces. •...
  • Page 272 • Use continuation indent on function parameters - Determines whether function parameters should always use the continuation indent. By default, we format multi-line function parameters as follows: myLongMethodName(firstarg, secondarg, thirdarg myLongMethodName( firstarg, new ActionListener() { public void actionPerformed(ActionEvent e) { createdButtonFired(buttonIndex);...
  • Page 273: Java Beautifier

    thirdarg myLongMethodName(new ActionListener() { first argument public void actionPerformed(ActionEvent e) { createdButtonFired(buttonIndex); secondarg, thirdarg Java Beautifier To beautify Java source code, from the main menu click Format command). The Java Beautifier dialog appears, where you can specify preferences for how the code is beautified.
  • Page 274: Javadoc Editor

    • Add blank line after example - If checked, a blank line is added if a tag follows the @example tag. Javadoc Editor Use the Javadoc Editor to generate Javadoc syntax comments for Java, C, C++, JavaScript, and Slick-C . To access the Javadoc Editor, right-click within the edit window and select Edit Javadoc Com- ®...
  • Page 275: Java Refactoring

    Java Refactoring Java Refactoring Java Refactoring for information about Java refactoring in SlickEdit Core. ®...
  • Page 276: Xml And Html

    XML and HTML Features for XML and HTML are described below. See also XML features in SlickEdit Core include Context Tagging ® tifier, Color Coding, URL Mapping, Syntax Expansion, and Syntax Indenting for XML, XSLT, and schemas (DTD or XSD). XML Formatting Options Content in XML and HTML files may be set to automatically wrap and format as you edit, through the XML/HTML Formatting feature.
  • Page 277 The following settings are available: • Case for inserted tags - This option is to specify if you want your tag names to be lowercase or upper- case. For example, if you select Uppercase, then <tag> would become <TAG>. Under normal circum- stances, preserve the case of your XML tags, but for certain special cases (e.g.
  • Page 278 Slick-C . Note that by default, when creating a new comment, the Javadoc Editor is displayed for all ® file types except C#. To work around this limitation, start an XML comment with "///" and then right-click in the edit window and select Edit XML Comments.
  • Page 279 The following settings are available: • Indent for each level (Syntax indent) - The amount to indent for each new nesting level of tags. We have put the words "Syntax indent" in parenthesis to help indicate that this field has the same meaning as the Syntax indent text box in the Extension Options dialog box (Window SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
  • Page 280 • Broken tag lines - Specify how broken tag lines are treated from the following options: • Indent from tag column by - Specifies the amount to indent for broken tag lines from the starting column of the tag. Specify 0 to align broken tag lines with the starting column of the tag. •...
  • Page 281 • Reformat - When off, all white space and line breaks are preserved. However, tags are formatted (tag case, attribute case, etc.). • Indent - When on, nested tags will be indented one syntax indent level. Furthermore, if Reformat is on, the selected tag's CDATA content (i.e.
  • Page 282: Xml Beautifier: Attributes/Values Tab

    <tr> <td> </td> </tr> Please note that the number of line breaks is not the same as the number of blank lines. If you wanted three blank lines, then you would set the number of line breaks to 4. • After close tag - Specify the number of line breaks after the closing tag. For example, if you were to set the number of line breaks after the closing tag to 3 for the XHTML <td>...
  • Page 283 The Attributes/Values tab contains the following settings: • Attribute case - Specifies how you want attributes cased inside the body of a tag. For example, if you choose UPPER, then <td align="right"> would be beautified to <td ALIGN="right">. Under normal cir- cumstances you will want to preserve the case of your XML attributes, but for certain special cases (e.g.
  • Page 284 Figure 7.19. XML Beautifier: Comments Tab The Comments tab contains the following options and settings: • Indent stand alone comments - When on, indicates whether comments which appear on lines by themselves with no content to the left are indented to the current content indent level. The following is an example of a stand-alone comment: <!-- stand alone comment...
  • Page 285: Xml Beautifier: Advanced Tab

    ginal source file. By trailing comments, we mean comments which appear at the end of lines which contain tags. • Original relative column - When on, "trailing comments" are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file. By trailing com- ments, we mean comments which appear at the end of lines which contain tags.
  • Page 286 • Remove blank lines - When on, blank lines are deleted. Schemes Tab Figure 7.21. XML Beautifier: Schemes Tab To define a new scheme, use the Beautifier to set the various beautify options and then press the Save Scheme button on the Schemes tab. User defined schemes are stored in uformat.ini. DTD Caching When you open an XML document that has a document type definition of (!DOCTYPE) that refers to a re- mote external DTD, the DTD file is downloaded and cached locally.
  • Page 287: Url Mappings Dialog

    Map URLs to a different location. Whenever opening a URL, the URL map is examined to see if this URL is mapped to a different location. If the URL is mapped to a different location, then that mapped location is used.
  • Page 288: Html

    5. Click OK. Toggling Between Begin and End XML Tags Place the cursor anywhere on the begin or end tag and press Ctrl+] to find the corresponding end or be- gin tag respectively. HTML This section describes some of the features and options that are available for HTML, including extension- specific options, the HTML Beautifier, and more.
  • Page 289 HTML Formatting Options Content in XML and HTML files may be set to automatically wrap and format as you edit, through the XML/HTML Formatting feature. See Other miscellaneous tag and attribute options are still provided through the HTML Formatting Options dia- log.
  • Page 290: Html Formatting Options Dialog

    Languages similar to HTML have similar Formatting Options dialogs which are not specifically documented. Figure 7.24. HTML Formatting Options Dialog HTML...
  • Page 291 The following settings are available: • Case for inserted tags - This option is where you specify if you want the tag names to be lowercase or uppercase. For example, if you select Uppercase, then <td> becomes <TD>. • Case for inserted attributes - This option is where you specify if you want attributes to be lowercase or uppercase inside the body of a tag.
  • Page 292 • Use <DIV> tags for alignment - (Not available in SlickEdit Core.) This option is used by the HTML toolbar. When this option is selected, the <DIV> tag is used for aligning text. For example, rather than using a <CENTER> tag to designate alignment, use the following tagging: <DIV ALIGN=CENTER>...
  • Page 293: Html Beautifier: Indent Tab

    Figure 7.25. HTML Beautifier: Indent Tab The following settings are available: • Indent for each level (Syntax indent) - The amount to indent for each new nesting level. We have put the words "Syntax indent" in parenthesis to help indicate that this field has the same meaning as the Syntax indent text box in the Extension Options dialog box (Window SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
  • Page 294: Html Beautifier: Tags Tab

    wrapped until it reached a total length of 30+80=110 characters. Set this value to 0 if you want your line breaks preserved. • Broken tag lines - Specify how broken tag lines are treated from the following options: • Indent from tag column by - Specifies the amount to indent for broken tag lines from the starting column of the tag.
  • Page 295 • Content - Specify how to beautify content from the following options: • Reformat - When off, all white space and line breaks are preserved. However, tags are formatted (tag case, attribute case, etc.). • Indent - When on, the selected tag's content, bounded by the opening and closing tag, will be inden- ted one syntax indent level.
  • Page 296: Html Beautifier: Attributes/Values Tab

    <TD> </TD> </TR> Please note that the number of line breaks is not the same as the number of blank lines. If you wanted three blank lines, then you would set the number of line breaks to 4. • After close tag - Specify the number of line breaks after the closing tag. For example, if you were to set the number of line breaks after the closing tag to 3 for the <TD>...
  • Page 297: Html Beautifier: Comments Tab

    The Attributes/Values tab contains the following settings: • Attribute case - Specifies how you want attributes cased inside the body of a tag. For example, if you choose UPPER, then <td align="right"> would be beautified to <td ALIGN="right">. • Word value case - Specifies how you want word values cased after the = of an attribute inside the body of a tag.
  • Page 298 The Comments tab contains the following options and settings: • Indent stand alone comments - When on, indicates whether comments which appear on lines by themselves with no content to the left are indented to the current content indent level. The following is an example of a stand-alone comment: <!-- stand alone comment...
  • Page 299: Html Beautifier: Advanced Tab

    • Original relative column - When on, "trailing comments" are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file. By trailing com- ments, we mean comments which appear at the end of lines which contain tags. The following is an example of code before beautifying trailing comments: <TR>...
  • Page 300 any previous paragraphs. • Hitting a standalone tag - When on, the beautifier will interpret a standalone tag as a signal of the end of any previous paragraphs. For example, in the following content, the <TABLE> tag (assuming that the <TABLE> tag is a standalone tag) signals the end of the previous <P> paragraph. This has the benefit of cleaning up unwanted (and unexpected) indenting.
  • Page 301: Xml/Html Formatting

    XML/HTML Formatting Content in XML and HTML files may be set to automatically wrap and format as you edit. XML/HTML Formatting is essentially comprised of two features: Content Wrap, which wraps the content between tags, and Tag Layout, which formats tags according to a specified layout. Both can be activated individu- ally for all XML and HTML files that are opened in SlickEdit Formatting schemes form the basis for how tags and content are formatted.
  • Page 302 Enabling/Disabling XML/HTML Formatting next to Enable XML Formatting and/or Enable HTML Formatting. To toggle Tag Layout and/or Con- tent Wrap on or off for either file type, check or uncheck those items. For example, if you want both Tag Layout and Content Wrap enabled for XML files, but you only want Content Wrap enabled for HTML files, place a check next to Enable XML Formatting and its submenu items Tag Layout and Content Wrap, then place a check next to Enable HTML Formatting and its submenu item Content Wrap.
  • Page 303: Working With Schemes

    Working with Schemes ate or open in SlickEdit Core will be wrapped, but no Tag Layout settings will be applied. The second ® screen shot (the Current Document Options dialog) reflects that the global setting for Tag Layout is dis- abled.
  • Page 304 Working with Schemes Default Schemes XML/HTML Formatting comes with two default schemes. Each time that you open an HTML file for edit- ing, by default, the html (default html) scheme is used. Each time an XML file is opened, the xml (default xml) scheme is used.
  • Page 305 Working with Schemes Specifying the Scheme to Use You can specify a scheme to use for just the current document, or a default scheme to use for all HTML and/or XML files that are created or opened in SlickEdit Core. ®...
  • Page 306: Working With Tags

    Working with Tags Saving and Deleting Schemes In the XML/HTML Formatting Scheme Configuration dialog, modified schemes are denoted by asterisks around the name (for example, *html*). To save a modified scheme, right-click on it and select Save Scheme Changes. Alternatively, when you close the XML/HTML Formatting dialog, you are prompted whether to save modified schemes.
  • Page 307: Formatting Settings

    formatted in your code. The following are examples: <div> Sample text of a tag set to (block) style. </div> <h1>Sample text of a tag set to (semi-block) style. Notice how wrapping occurs within this tag.</h1> Adding and Deleting Tags To add individual tags to a selected scheme, right-click in the Tags column and select New Tag. Type the name of the tag without angle brackets or attributes.
  • Page 308 It contains the following general settings: • End tags settings - These options control how the end tags for the selected tag are formatted: • Has end tag - This option tells SlickEdit closed with an end tag. This information is used for SlickEdit Core to know when to start or stop cal- culating information based on the tag.
  • Page 309: Xml/Html Formatting: Content Wrap Tab

    Content Wrap Settings The Content Wrap tab of the XML/HTML Formatting dialog contains options for specifying how wrapping should occur for the selected tag’s content. Figure 7.35. XML/HTML Formatting: Content Wrap Tab There are three main (mutually-exclusive) options: • Wrap tag content - When selected, content between tags is wrapped according to the settings spe- cified in the Tag content width group box.
  • Page 310 • Preserve content - When selected, content between start and end tags is not wrapped, but the tags are laid out properly with the parent tag. This could be useful for tags such as <pre>, where the content needs to be rendered exactly as it appears in the code. Note •...
  • Page 311: Xml/Html Formatting: Tag Layout Tab

    culated, and the specified width is adjusted accordingly. This is useful for producing uniform blocks of text. • Preserve width of existing content - When selected, SlickEdit ing content while editing. The width is determined by the length of the longest multi-line paragraph. If the width of the existing content cannot be determined, the formatting option specified (Fixed, Auto- matic, or Fixed right) will be used instead.
  • Page 312 <div> </div> Example of both settings unchecked: <div>|</div> Example of start checked and end unchecked: <div> |</div> Note Dynamic Surround is triggered when you type a tag that has both options Start and End tag on separate line checked. Note that Dynamic Surround cannot wrap content and only indents to match the indent style you have specified on the (Window Preferences, expand SlickEdit and click General in the tree, then double-click the...
  • Page 313: More Settings

    more blank lines, the values should be set to 2 or higher. More Settings The XML/HTML Formatting dialog contains two buttons along the bottom that allow you to configure even more settings for these languages. These buttons are shortcuts to the extension options that are usually accessed through the Options button on the Extension Options dialog.
  • Page 314: Ada

    This section describes some of the features and options that are available for Ada, including extension-spe- cific options and the Ada Beautifier. Ada Formatting Options Keyword casing options are available for Ada language file extensions. To access these options, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double- click the File Extension Setup setting.
  • Page 315 The tabs on the Ada Beautifier are described in the sections below. Indent Tab The following settings are available: • Indent with tabs - When checked, tab characters are used for leading indent of lines. This value de- faults to the Tabs text box on the ences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting).
  • Page 316 An operator position setting of Beginning of next line would result in: Seconds := Days * Hours_Per_Day * Minutes_Per_Hour * Seconds_Per_Minute ; Statements/Declarations Tab The following options are available on the Statements/Declarations tab: • Reserved word case - Specifies the case for reserved words. For example, if you choose UPPER, then the Ada reserved word "procedure"...
  • Page 317 tions) have their colons vertically aligned. For example, before beautify: procedure foo ( A_Var : Boolean ; Another_Var : Boolean) ; After beautify: procedure foo ( A_Var Another_Var : Boolean ) ; • Align on declaration in-out - When checked, the modes of parameter specifications in the formal part of a subprogram declaration are vertically aligned.
  • Page 318 • Nested paren list item - A parenthesized item that is itself enclosed in a larger parenthesized list. For example, before beautify: Default_Data : constant Data_Type := ( A_Set => ( others => ( Item1 => false , in larger paren’d list B_Set =>...
  • Page 319 the last character of the end of the statement or declaration. • Original relative indent - When selected, trailing comments are indented by reusing the indent after the last character of the end of the statement or declaration of the original source file. •...
  • Page 320 if A = B and C = D then null ; end if ; • Additional indent for logical operator when followed by another line that begins with logical operator - Additional indent amount for a line broken on a logical operator that is followed by another line that also is broken on a logical operator that is different.
  • Page 321: Cobol

    COBOL This section describes some of the advanced options that are available for COBOL. COBOL Formatting Options Options are available for the COBOL language file extension, for changing smart indenting and styles for template editing. To access these options, from the main menu, click Window SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
  • Page 322 selected, the case of keywords are changed to the keyword case specified when you type them. For example, when you type the word "procedure" and the Keyword case is set to Upper case, the editor changes "procedure" to "PROCEDURE". • Syntax - Select the type of syntax to use. COBOL 74 and COBOL 2000 syntax are mutually exclusive options.
  • Page 323: Pascal

    Pascal This section describes some of the advanced options that are available for Pascal. Pascal Formatting Options Options are available for the Pascal language file extension, for changing smart indenting and styles for template editing. To access these options, from the main menu, click Window SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
  • Page 324 The following options are available: • Begin-end style - Specify the begin/end style used by template editing and smart indenting. For each style, select from the following options: • Insert begin/end pairs - Specifies whether template should be inserted with begin and end. •...
  • Page 325: Pl/I

    PL/I This section describes some of the advanced options that are available for the PL/I language. PL/I Formatting Options Options are available for the PL/I language file extension, for changing smart indenting and styles for tem- plate editing. To access these options, from the main menu, click Window SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
  • Page 326 The following options are available: • DO/END style - Select the syntax expansion style that indicates whether syntax expansion should place the DO on a separate line, then select from the following options: • Insert DO/END immediately - Indicates whether syntax expansion should automatically add a DO/ END block.
  • Page 327: Python

    Python This section describes some of the advanced features that are available for the Python language. Begin/End Structure Matching for Python Begin/End Structure Matching moves the cursor from the beginning of a code structure to the end, or vice versa. To place the cursor on the opposite end of the structure when the cursor is on a begin or end keyword pair, press Ctrl+] (find_matching_paren command or from the menu click Search Parenthesis).
  • Page 329: Tools And Utilities

    Chapter 8. Tools and Utilities...
  • Page 330: Comparing And Merging

    Comparing and Merging SlickEdit Core provides two powerful ways to compare and merge files: ® DIFFzilla ® DIFFzilla provides powerful differencing capabilities that let you compare files or directories and view the differences side-by-side. You can make edits, merge changes, and save modified files easily within the results windows.
  • Page 331 Comparing Two Files To diff two source files, complete the following steps: 1. From the main menu click Tools appears, as pictured below. Figure 8.1. DIFFzilla Dialog ® 2. Under Diff Type, select the Text Compare option. 3. Enter the name of the first file to compare in the Path 1 text box. Enter the name of the second file in the Path 2 text box.
  • Page 332 file. Note You can only use the interactive dialog output style when diffing a selected range of lines. There- fore, the option Instead of an interactive dialog, output one buffer with the differences labeled, on the DIFFzilla dialog Options tab, will have no effect. To compare symbols, select the Symbols option under Diff Type on the DIFFzilla dialog, and all symbols from Path 1 will be diffed against all symbols from Path 2.
  • Page 333: Multi-File Diff Output Dialog

    path for Path 2 only. 4. In the Diff type, select Symbols and click OK. You do not need to turn on the Diff all symbols check box when performing a multi-file diff because mismatching files will have a plus sign (+) in front of them so that you can diff all of the symbols.
  • Page 334 DIFFzilla ® 6. Click Save. The Save Multi-File Output dialog box opens. Figure 8.3. Save Multi-File Output Dialog...
  • Page 335 7. Select Save Path 1 Filelist, Include different files, and Include files not in Path2. All other check boxes should be clear. 8. Click OK and select an output file for the list. The file you save will have the .lst extension appended to the output file name.
  • Page 336: 3-Way Merge

    The Backup History feature is available for viewing and comparing the differences between the current and previous versions of an open file. It utilizes the DIFFzilla log). For more information about this working with Backup History, see 3-Way Merge The 3-Way Merge editing feature can be used after two people make a local copy of the same source file, and each makes modifications to their local copy.
  • Page 337 2. In the Filename text box, enter the baseline (original) file name. Click the Ellipses button to the right of the text box to select files. Click the B button to select from the open buffers. 3. Enter the other names of the files to be merged in the Revision 1 and 2 text boxes. 4.
  • Page 338 File History and Backups 3-Way Merge Settings For descriptions of the options on the 3-Way Merge Setup dialog, see 3-Way Merge Dialog.
  • Page 339: File History And Backups

    File History and Backups SlickEdit's Backup History is disabled in SlickEdit Core. Eclipse maintains their own backup history which you can access using the History view (Window History). You can, however, use DIFFzilla fault Eclipse compare tool. Compare Two Backup History Elements Using DIFFzilla •...
  • Page 340: Ftp

    FTP support includes an FTP view window and the ability to easily open and edit FTP files. Working with FTP Before you can access FTP files, you must create an FTP profile, then start that connection. FTP opera- tions can be accessed from the FTP view window or by right-clicking on FTP files after a connection is active.
  • Page 341 Working with FTP 2. Click Add to create a new profile. The Add FTP Profile dialog box is displayed. 3. Click Edit to Edit a profile. The Edit FTP Profile dialog box is displayed. Setting FTP Options for information about the options on the Add or Edit FTP Profile dialogs. Starting a Connection To start a new connection, use the FTP view described above, and complete the following steps: 1.
  • Page 342: Setting Ftp Options

    Setting FTP Options 3. Click Connect. The FTP view displays the content of the remote directory. 4. Toggle the ASCII Transfer mode button to transfer text files. When in ASCII transfer mode, line ending characters may be translated. 5. Toggle the Binary Transfer mode button to transfer images and executables.
  • Page 343: The Regex Evaluator

    Using the Regex Evaluator The Regex Evaluator Regular expressions are used to express text patterns for searching. The Regex Evaluator provides the capability to interactively create, save, and re-use tests of regular expressions. In SlickEdit Core, the Regex Evaluator is a view. To open it, click Tools Regex Evaluator.
  • Page 344 expression. Matches are also marked with a yellow arrow that appears in the gutter to the left of the test case. You can hover your mouse on this arrow to see a tooltip which displays the matched expression de- tails. When groups (tagged expressions) are used in your regular expression pattern, the groups will be boxed and highlighted in yellow in the Test Cases section.
  • Page 345: Using The Calculator And Math Commands

    The Calculator Using the Calculator and Math Commands The Calculator To access the calculator, click Tools Calculator, or use the calculator command. Figure 8.8. The SlickEdit Calculator ® You can use the calculator in various ways. Type in mathematical expressions from the keyboard or by clicking buttons, including parentheses.
  • Page 346: Math Commands

    The characters $ and comma (,) are stripped from the expression before it is evalu- ated. The mathx, matho, and mathb commands evaluate the Slick-C language expression given and places the result in the message line in hexadecimal, octal, and binary respectively. The expression can have the following unary operators: •...
  • Page 347: Math Command Examples

    Hexadecimal numbers are prefixed with the characters 0x or just x. Octal numbers are prefixed with the character O or digit 0. Note Not all Slick-C language operators are supported. Math Command Examples The following table shows some examples of math commands: Table 8.2.
  • Page 348 OS File Browser Document Math Type mathematical expressions into a buffer and evaluate them with the add command. This feature is called document math. The add command adds selected text and inserts the result below the last line of the selection. If no operator exists between two adjacent numbers on the same line, addition is assumed. The result of each adjacent line is added.
  • Page 349: Os File Browser

    OS File Browser OS File Browser SlickEdit Core provides a way to display the operating system’s (OS) file manager/browser. For ex- ® ample, Windows Explorer is displayed on Windows, Konquerer on Linux KDE desktop, etc. To display the OS file browser, click Tools OS File Browser, or use the explore or finder command (the finder command is the same as the explore command).
  • Page 351: Macros And Macro Programming

    Chapter 9. Macros and Macro Programming...
  • Page 352: Recorded Macros

    Recording a macro generates Slick-C ing a macro is also a useful way to discover and implement Slick-C code that controls the behavior of SlickEdit Core. See...
  • Page 353 4. The next step depends on the purpose of your recorded macro. If you want to save the macro for fu- ture use, continue with the steps below. If you’re just recording it to discover Slick-C Macros to Discover and Control code.
  • Page 354: Binding Recorded Macros

    the execute_last_macro_key command (see Binding Macros Using the Key Bindings Dialog After recording a new macro, the Macros dialog any time from the main menu by clicking Macro list_macros command. Click Bind to Key to open the Key Bindings dialog, showing a listing of only your recorded macros.
  • Page 355 Recorded Macro Operations Creating bindings for recorded macros works the same as creating bindings for SlickEdit Core com- mands. Click Add to initiate the binding, then specify the key sequence or mouse event to use. See Man- aging Bindings for more information about creating, editing, and removing bindings. Binding Macros Using execute_last_macro_key The execute_last_macro_key command provides functionality to stop macro recording and instantly bind the macro to a key sequence.
  • Page 356 Save the file when you’re done making edits. If you are using recorded macros to discover Slick-C Options), you can view/edit the source of a macro that you have just recorded but have not yet saved.
  • Page 357: Using Macros To Discover And Control Options

    Core. ® Since responses to dialog boxes (such as when you select/deselect options) are recorded as Slick-C source, you can use recorded macros to discover and change these variables quickly. For example, per- haps you frequently switch line insert styles. Instead of every time clicking Window...
  • Page 358: Programmable Macros

    Figure 9.2. Set Variable Dialog Enter the name of Slick-C global variable in the Variable text field. You may use the spacebar and ? (completion) to assist you in entering the name. Click the drop-down arrow to select a variable from the list.
  • Page 359 Setting Macro Variables The data structure of the variable is displayed in the list box at the top of the dialog, and the value for each entry is displayed in the Value text box. For a list of all elements on this dialog, see Variable Editor Dialog.
  • Page 361: Slickedit Core Dialogs

    Chapter 10. SlickEdit Core Dialogs...
  • Page 362: Editing Dialogs

    Select Text to Paste Dialog Editing Dialogs This section describes the SlickEdit Core dialogs associated with text editing. See Text Editing for more ® details about editing operations. Select Text to Paste Dialog This dialog is used to view and insert recently used clipboards. It is displayed when you press Ctrl+Shift+V (in CUA emulation), click Edit List Clipboards, or use the list_clipboards command.
  • Page 363: Filter Selection: Command Dialog

    ing numbers to a selection using the enumerate command with options on the command line. See the Help system for command syntax. Figure 10.2. Enumerate Dialog • Start - C syntax expression which evaluates to the number used for first line of selection. However, when the Hexadecimal flags output style is selected, the start must be an integer bit position or the first hexadecimal number with which to start.
  • Page 364: Filter Selection: Command Dialog

    Search Dialogs Figure 10.3. Filter Selection: Command Dialog Enter the command in the Command text box. The selected text will be used as input to the command, and the output from the command will replace the selected text. Use the drop-down arrow to the right of the Command text box to select from a history of previously entered commands.
  • Page 365: Search Dialogs

    Find and Replace View Search Dialogs This section describes the SlickEdit Core dialogs and views associated with searching and replacing. ® For more information about using search and replace operations, see Find and Replace. Note that there is an additional dialog not listed here that contains search options—the Search tab of the General Options dialog (Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting).
  • Page 366: Find And Replace: Find Tab

    • Find Tab • Find in Files Tab • Replace Tab • Replace in Files Tab Find and Replace View: Context Menu Right-click in the background of the • Saved Search Expressions - See • Configure Options - Displays the the default search options that the Find and Replace view should use.
  • Page 367 • Search for - Enter the string you want to search for here. You can retrieve previous search strings by clicking the drop-down list button. Strings may be text or regular expressions and can include wildcards. Note that ISPF search expressions cannot be used here. Click the right-pointing arrow button to the right of the Search for field to display a menu containing specific search syntax options such as Character in Range, Beginning of Line, and Decimal Digit.
  • Page 368 menu click Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting. On the Extension Options dialog, select the enter your desired characters in the Word chars field. • Use - Set this option to select one of the following types of search syntax from the drop-down list: •...
  • Page 369: Find And Replace: Find In Files Tab

    • Search hidden text - Select this option to search for text hidden by Selective Display. Matches found that were set to be hidden by Selective Display will be revealed. To set Selective Display options, from the main menu click View Selective Display.
  • Page 370 Find and Replace View • Look in - This field allows you to specify a range for your search to the current selection, current pro-...
  • Page 371 cedure, current buffer or all buffers. Click the right-pointing arrow button to the right of the Look in field to display a menu containing more specific range options such as Directory, Project, and All Buffers. From this sub-menu, you may also select Append and choose an item for which to have the search results appended.
  • Page 372: Find And Replace Replace Tab

    • Append to output - Select this option to append search results to the search results window that is in focus. • List filenames only - If selected, only file names and not occurrences are listed in the search output. •...
  • Page 373 • Replace with - Enter the text or regular expression for which to replace the item that is searched. You can retrieve previous replacement text or regular expressions by clicking the drop-down list button. Click the right-pointing arrow button to the right of the Replace with field to display a menu containing tagged expressions.
  • Page 374: Find And Replace: Replace In Files Tab

    You can use the menu items Edit Replace in Files Tab This tab on the Find and Replace View ded ability to conduct multi-file replacements. It contains one additional option, described below. Figure 10.8. Find and Replace: Replace in Files Tab Find and Replace View Undo and Edit Redo to undo/redo replacements.
  • Page 375 Find and Replace View...
  • Page 376: Find Symbol View

    • Leave modified files open - Select this option to open all of the files on which a replace has been per- formed. The Results options are the same as those on the You can use the menu items Edit replacements in multiple files.
  • Page 377 • Search for - Enter the name of the symbol to find. If you select the option Use pattern, you can enter regular expressions or wildcards in the search field. If you specify <Use Context Tagging Look in field, then you can enter language-specific expressions, such as "this->get" to find getters in your current class.
  • Page 378 in the current function scope. • <Current Project> - Select this setting to only search in files that are in the current project. • <Current Workspace> - Select this setting to only search in files that are in the current workspace. •...
  • Page 379: Go To Definition Dialog

    • Manage tag files - Displays the your tag files. Go to Definition Dialog The Go to Definition dialog (gui_find_proc command) can be used to navigate to symbols. It lists all tags that match the prefix you have typed so far. To display the dialog, use the gui_find_proc command. This dialog has been deprecated in favor of the For more information about navigating between symbols, see Figure 10.10.
  • Page 380: Dialogs Related To Viewing And Displaying

    Selective Display Dialog Dialogs Related to Viewing and Displaying This section describes SlickEdit Core dialogs and views related to viewing and displaying within the edit- ® or. For more information, see Viewing and Displaying. Selective Display Dialog The Selective Display dialog (Display Selective Display or selective_display command) allows you to activate Selective Display and choose the regions in your code that you want to display or hide.
  • Page 381 Search Text Select Search text to specify a search string and display lines containing the search string specified or lines not containing the search string specified. Click the right-pointing arrow button to the right of the field to display a menu containing specific search syntax options such as Character in Range, Beginning of Line, and Decimal Digit.
  • Page 382 WIN32S VERSION=4 • Warning if Not Defined - If on when you preprocess your source, a message box is displayed for each define found in an expression which does not have a value. • Scan for Defines - Searches for define variables in the current source file and lets you specify values. Resulting values are placed in the Defines combo box.
  • Page 383: Macro Dialogs

    Core command line. ® Figure 10.12. List Macros Dialog Save Macro Dialog Core dialogs related to macros. For more information about working Programmable Macros, and the Slick-C for more information. Saving and Editing Recorded Macros Macro Programming Guide. ® Save last- List Macros.
  • Page 384: Variable Editor Dialog

    The dialog shows a list of all macros you have recorded. Use the buttons to perform the following opera- tions: • Run - Runs the selected macro. See • Cancel - Closes the dialog. • Edit - Opens the macro source for editing. See tion.
  • Page 385 Variable Editor Dialog The data structure of the variable is displayed in the list box at the top of the dialog, and the value for each entry is displayed in the Value text box. The following buttons are available: • Expand Curr - Expands current item which has a Plus (+) bitmap. •...
  • Page 386: Grid Settings Dialog

    Grid Settings Dialog • Update - Sets the contents of the variable to what is currently displayed in the Variable Editor. • Refresh - Cancels changes and displays current value of variable which is not necessarily the same as when this dialog box was originally displayed. •...
  • Page 387 The following fields and settings are available: • Menu name - Name of the current menu resource. You can define your own menu resource which is used instead of our menu bar WITHOUT changing the name of our default menu bar _mdi_menu. Use the -m invocation option (for example, -m mymenu) or set the def_mdi_menu macro variable to your menu name (see Setting Macro...
  • Page 388: Auto Enable Properties Dialog

    command, specify "help open dialog box" as the Help item. If you do not know the name of the dialog box displayed, search for Help on the command. The Help for each command should indicate the name of the dialog box displayed. Some commands do not display dialog boxes. For these commands, spe- cify help command where command is name of the command this menu item executes or help xxxx menu where xxxx is the name of the drop-down menu this command is on.
  • Page 389 The following settings are available: • Requires editor control - Indicates that this command should be enabled only if operating on an editor control. • Allow in read only mode - Indicates that this command should be enabled if the editor control is in strict read only mode.
  • Page 390 Tools Dialogs • Requires a clipboard - Indicates that this command should be disabled if there is no editor control clip- board available. • Requires a selection - Indicates that this command should be disabled if there is no selection.
  • Page 391: Tools Dialogs

    Tools Dialogs This section describes SlickEdit Core dialogs related to tools and utilties. See for more information. Organize Imports Options Dialog The behavior of the Organize Imports and Add Import features is controlled by the options on the Organ- ize Imports Options dialog box, pictured below. This dialog can be accessed by right-clicking in the editor and selecting Imports Options.
  • Page 392: 3-Way Merge Dialog

    these groups instead of having just one flat list of imports. • Number of package nesting levels to group imports by - If this is set to 1, import statements will be grouped by top-level package name only. For example, all your imports from java. packages would be in a separate group from your imports from com.
  • Page 393 The Ellipses buttons to the right of the text boxes are used to select files. The B buttons to the right of the text boxes are used to select from the open buffers. The list below describes the remaining fields and settings: •...
  • Page 394: Diffzilla ® Dialog

    plied to the output file and the change IS indicated, so that using the Next Conflict button will show you the change. • Output style - Output style has no effect if there are no conflicts. The following output styles are avail- able: •...
  • Page 395 Diff Types The following Diff types are available: • Text Compare - Compares two files and shows the differences between them. When this option is se- lected, after you click OK on this dialog to start the comparison, the interactive Diff dialog is displayed, allowing you to preview the differences one-by-one before committing.
  • Page 396: File Compare Options

    • Use file on disk - Select this option to diff the file on disk and not the file in the buffer. • More - Click this button to display additional file options. • Symbols - Click this button to select a symbol to diff. The selected symbol will appear next to the word "Symbol"...
  • Page 397: Dialog Setup Options

    The file compare options, shown above, are described as follows: • Expand tabs into spaces before comparing - When selected, tabs are expanded to the appropriate number of spaces before lines from each file that is compared. • Ignore leading spaces before text on each line - When selected, differences in leading spaces of lines are ignored.
  • Page 398 Figure 10.21. DIFFzilla : Dialog Setup Options ® Setup options for the DIFFzilla ® • Show gauge during diff - When selected, a gauge control will show various processing statistics while you wait for the differences output to complete. • Jump to next diff after copy block - When selected, the cursor is moved to the next difference when you apply changes from one file to the other.
  • Page 399: Multi-File Diff Output Dialog

    (history) or just places the current buffer name into the Path 1 text box. Press F7/ F8 to restore the pre- vious next dialog settings, respectively. Multi-File Diff Output Dialog When using DIFFzilla to perform a directory comparison (Multi-File diff type), the results are presented ®...
  • Page 400: Context Tagging - Tag Files Dialog

    • Next - Moves the cursor to the next set of mismatched files in both source trees. • Prev - Moves the cursor to the previous set of mismatched files in both source trees. • Save - Lets you save a diff state file (.dif) that you can load later with the Previous diff button on the DIFFzilla dialog box.
  • Page 401 the dialog lists all the source files indexed by the currently selected tag file. For descriptions of the Tag File categories, listed on the left side of the dialog, see The following buttons are available on the Context Tagging • Done - Saves tag file settings and closes the dialog box. •...
  • Page 402: Options Dialogs

    Options Dialogs This section describes SlickEdit ® General Options Dialog Many common user preferences can be set from the General Options dialog. To work with this dialog, from the main menu, click Window double-click the General setting. There are seven categories (tabs) available, listed below. Information about working with these general options is located throughout the documentation on a contextual basis.
  • Page 403 The following options are available: • One file per window - (Not available in SlickEdit Core.) If checked, each file you open will be allocated in its own window. If unchecked, each file will open in the same window. • Maximize first window - (Not available in SlickEdit Core.) If checked, the first editor window opened will be maximized.
  • Page 404 • Alt menu hotkeys - (Not available in SlickEdit Core.) If checked, Alt-prefixed keyboard shortcuts will display the corresponding drop-down menu. If unchecked, you can be more selective about key bind- ings because you are permitted to bind Alt keys you normally could not, such as Alt+F. Do not check this option if you bind Alt keys that are normally menu keys, because you will lose these key bindings.
  • Page 405: General Options: Search Tab

    • Click past end of line - If checked, the cursor can be placed past the end of a line. • Vertical line column - Specifies the column in which the editor is to display a vertical line. Specify 0 to display no vertical line.
  • Page 406 The following options are available: • Default search options - The following default search options apply to all command line searches, quick searches and incremental searches, and to the Find and Replace view when the option Initialize with default options is checked. General Options Dialog...
  • Page 407 • Match case - If checked, various search commands default to case-sensitive searches. • Match whole word - If checked, refines search results to match only the word as a whole. By de- fault, this is unchecked, and search results will match all instances of the word, ignoring characters that are to the left and right of the occurrence.
  • Page 408: General Options: Selections Tab

    ted. • Incremental search highlighting - If checked, when an incremental search is performed, matching occurrences will be highlighted with two colors: one for the current match at the cursor, and one for all possible matches. Highlights are removed when the incremental search command terminates. Highlight colors can be set using the SlickEdit and click General in the tree, then double-click the Color setting).
  • Page 409 General Options Dialog The following settings are available: • Styles - Choose the selection style you wish to use from the following options: • User defined - This option is for setting your own selection preferences. Any changes that are made to the CUA behaviors automatically select User Defined.
  • Page 410 lect behaviors. • CUA (default) - When this style is selected, selected text is deleted before a paste or character is in- serted unless the selection is locked. Pressing the Backspace or Delete keys deletes the selection unless the selection is locked. Advanced selections (those selections not started with the mouse or Shift+<arrow keys>) are extended as the cursor moves.
  • Page 411 Note Viewing special characters is only available for ASCII files. To access Special Characters options, from the main menu click Window SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the Special Characters tab, which is pictured below. See more information about these settings.
  • Page 412 General Options Dialog More Tab The More tab, pictured below, contains additional options that can be set for working with SlickEdit ® Core. To access these options, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the More tab.
  • Page 413: General Options: More Tab

    General Options Dialog Figure 10.28. General Options: More Tab The following options are available: • Start in insert mode - If selected, the editing mode is set to insert when the editor is invoked. Other-...
  • Page 414 wise, the editing mode is set to replace. • Throw away file lists - If selected, the modified File Manager file lists can be modified and closed without being prompted to save. • Auto exit build window - If selected, the concurrent build window is automatically exited when the buf- fer is closed or when exiting the editor.
  • Page 415 Elements Setting Macro Variables • Scroll style - Select from the following options: • Smooth horizontal scroll - When selected, this option specifies that the window should be scrolled column-by-column when the cursor moves out of view. When this option is deselected, the cursor will be centered and the text will be scrolled one-fourth the width of the window when the cursor moves out of view.
  • Page 416: General Options: Exit Tab

    • Smart next window - (Not available in SlickEdit Core.) Use this combo box to select from the following different windowing styles: • Smart next window - This is the default style. It allows you to press Ctrl+Tab (next_window com- mand) to switch the focus between the two most frequently used open editor windows, rather than al- ways going to the next window.
  • Page 417 General Options Dialog The following options are available on the Exit tab: • Always save configuration - If selected, configuration changes are saved without prompting. • Always prompt before saving configuration - Select this option to always receive a prompt before saving changes that you make to the configuration of the software.
  • Page 418: General Options: Virtual Memory Tab

    General Options Dialog • Exit confirmation prompt - If selected, you will always be prompted when exiting the editor. Virtual Memory Tab To access virtual memory options, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the Virtual Memory tab.
  • Page 419 The following options are available: • Spill file path - This text box specifies a directory where spill files and temporary files should be placed. On Windows, this defaults to the directory specified the TEMP environment variable. If it does not exist, the directory specified by the TMP environment variable is used.
  • Page 420: Extension Options Dialog

    • Buffer cache size - The value in this field, specifies the maximum amount of memory used to store text buffer data in kilobytes. A value that is less than zero specifies all available memory. Caution If the operating system starts the swapping process before the cache is full, performance might be degraded.
  • Page 421 General settings on this dialog box are described below (see Settings). Other options are categorized into the following tabs. Click on an item to go to that section in the documentation: • Indent Tab • Word Wrap Tab • General Tab •...
  • Page 422: Extension Options: Indent Tab

    sions that support Extension Options. To configure Extension Options for an extension that is not in the list, you must first load or create a file with that extension. Before configuring any of the Extension Options, always make sure the Extension drop-down list reflects the extension you wish to affect.
  • Page 423 The following options and settings are available: • Indent style - Select from the following indent styles: • None - When this option is selected, the Enter key will put the cursor at the beginning of the line. • Auto - When this option is selected, the Enter key indents according to the previous line. •...
  • Page 424: Extension Options: Word Wrap Tab

    the line only if the cursor position is before the intended indent location; otherwise, it will insert an ad- ditional tab stop. When this option is deselected, it reindents the line when the cursor is located on the leading whitespace, regardless of whether the column is before or after the intended indent loca- tion.
  • Page 425 The following settings are available: • Margins - Sets the left, right, and new paragraph margins. Specify the column number at which each margin should begin. Click the colored box next to the Indicator Color label to set the color of the mar- gin indicator.
  • Page 426: Extension Options: General Tab

    lows: • Wrap long lines to window width - This option activates Soft Wrap. A curved arrow is displayed at the end of each line, along the right-hand border of the edit pane, indicating that the text continues on the next line. The horizontal scrollbar disappears as it is no longer needed. •...
  • Page 427 The following options are available: • Mode name - Allows you to enter a more meaningful name for this extension setup. Define a mode name here for the Format Select Mode menu item to work well. See more information. • Alias filename - An alias defines a snippet of text that is inserted when the alias is expanded. Each ex- tension can have one alias file, allowing aliases to be defined that do not affect other extensions.
  • Page 428: Extension Options: Comments Tab

    truncation line length to be moved or to be modified. For example, search and replace operations do not find data to the right of the truncating line length. In addition, when a replace occurs, the data to the right of the truncation line length will not move. Set this to Auto for the editor to determine the truncation line length based on the record format of the file.
  • Page 429 Comment Block These settings are used when you comment out a selected block of text (Format box command). SlickEdit Core provides eight fields to specify the characters used in your commenting ® style. If you want to apply a comment with no additional decoration, fill in the upper-left and lower-right fields with the characters to begin and end a block comment.
  • Page 430 if (!enabled) { tabState = TIS_DISABLED; Select from the following comment block options: • First line is top - When this option is selected, the first line of the text selection is used as the first line of the comment. The top border is not drawn. Otherwise the open comment characters will appear on their own line.
  • Page 431 placed: • At left margin - Places characters flush against the left margin of the editor window, as shown in the previous example. The indent levels are not changed. This provides better visibility for your com- ments and a way to clearly see the indent level relative to lines that are not commented out. •...
  • Page 432 Javadoc, select /**. For XMLdoc, select ///. For Doxygen, select /*! or //!. See for more information. • Use style - Select the tag style to use for the corresponding start characters. This tag style is used when SlickEdit Core creates skeleton doc comments beginning with the matching start characters. For comments formatted in Javadoc, select the @param style.
  • Page 433: Extension Options: Comment Wrap Tab

    "[CURSOR_HERE]jumped over the lazy dog."; Comment Wrap Tab Comment wrapping options can be configured for C, C++, C#, Java, and Slick-C currently unavailable for other languages. Use the Comment Wrap tab to activate comment wrapping and configure options for how block, line, and doc comments are wrapped.
  • Page 434 The following options are available: • Enable comment wrap - When selected, comments are allowed to be wrapped. You must still specify the type of comments that you want wrapped by selecting one or more of the Enable options for block, line, and doc comments.
  • Page 435: Extension Options: Advanced Tab

    If Maximum right column is used, comment lines will be wrapped when they reach the specified column, even if they have not reached the specified fixed width. This is useful if coding standards mandate that text should not exceed a specified column. •...
  • Page 436 The following options and settings are available: • Color coding options - The options below affect Color Coding. For more information about working with this feature, see Color Coding. • Lexer name - Use the drop-down list to select the lexer to use to recognize elements to be colored. •...
  • Page 437: Extension Options: Auto-Complete Tab

    • Select first (affects all extensions) - When checked (default), a selection can be made with the right mouse button instead of displaying the extension-specific menu. When this is not checked, se- lect menu items by clicking and dragging the mouse. •...
  • Page 438 The following options are available: • Enable auto-completion - If selected, activates the Auto-Complete feature. See more information. • Syntax expansion - If selected, Auto-Complete will show Syntax Expansion choices for the word prefix under the cursor. Syntax Expansion completes syntactic elements of the language, like if or for state- ments, putting in the parentheses and braces matching your specified coding style settings.
  • Page 439: Extension Options: Context Tagging Tab

    • Display after (ms) idle - The number of milliseconds the editor must be idle before auto-completion suggestions will be displayed. This setting affects all extensions. • Update after (ms) idle - The number of milliseconds the editor must be idle before auto-completion suggestions will be refreshed.
  • Page 440 List Members The following options apply to List Members. See • Auto-list members - If selected, typing a member access operator (for example, "." or "->" in C++) will trigger SlickEdit Core to display a list of the members for the corresponding type. To access this fea- ®...
  • Page 441 • Insert open parenthesis - If selected, selecting an item in the list inserts the current item in the list and any extra characters that are required by the symbol. For example, an open parenthesis is inserted after a function name for languages that require an open parenthesis after a function name. For C++, the less-than symbol (<) is inserted after a template class name.
  • Page 442: Select A Tag Dialog

    • Auto-list compatible parameters - If selected, compatible variables are automatically listed when parameter info is active and typing the arguments to a function call. Global (non-module) variables are not listed. This only affects C, C++, and Java. To access this feature on demand, press Alt+Comma. Auto List Compatible Parameters •...
  • Page 443: File Options Dialog

    Figure 10.40. Select a Tag Dialog Select the definition you want to go to. You can also check the options on this dialog to set the behavior going forward. When you set the Always navigate to symbol options, the settings are also updated for the Go to Definition options on the Preferences, expand SlickEdit and click General in the tree, double-click the File Extension Setup set- ting).
  • Page 444 • Backup Tab • AutoSave Tab • File Filters Tab Load Tab The Load tab, pictured below, offers options to control how files are loaded. To access the Load tab, click Window then double-click the File Options setting and select the Load tab. Figure 10.41.
  • Page 445 and the number of lines in the file are counted. The line number is always displayed in the line indicator area of the editor. The Load entire file check box will have the same affect as this check box when the entire file fits within the cache of the editor (defaults to 2 MB) and does not have to be spilled.
  • Page 446 • File locking - When selected, this option ensures that a file handle is kept open to the file for locking purposes. This detects when another user is editing the same file. If you are using the load command to open files, use the switch +N to specify this option. •...
  • Page 447 The following options are available: • Append EOF character - When this option is set, an EOF character is appended to the end of DOS files when the buffer is saved. This option has no effect on UNIX, Macintosh, or binary files. If you are using the save command to save files, use the switch +Z to specify this option.
  • Page 448 value of the Add to project option on the Save As dialog. Check this option on the Save tab to have the Add to project check box selected by default each time the dialog is invoked. By default, neither option is set. If you are using the save command to save files, use the switch +P to specify this option. •...
  • Page 449 The following options are available: • AutoSave activated - Activates AutoSave, which prevents you from losing data when an abnormal ed- itor exit occurs (possibly from a power loss). The AutoSave temporary files are placed in a directory named autosave in the configuration directory. Usually, the AutoSave temporary files are deleted when you exit SlickEdit closed, the AutoSave temporary file is deleted the next time AutoSave occurs.
  • Page 450 different directory option has been selected. If the AutoSave directory is blank, <configuration_directory>\autosave is used. The configuration directory is defined by the VSLICKCONFIG environment variable. If the VSLICKCONFIG environment variable is not set, the dir- ectory in the editor executable directory is used as the configuration directory. •...
  • Page 451: Key Bindings Dialog

    Key Bindings Dialog In the File filters text box, enter the filters you wish to assign. Separate each filter with a comma, and place file patterns in parentheses. Separate file patterns with a semicolon. The first file filter is used to ini- tialize the file list.
  • Page 452 Note • The first time the Key Bindings dialog is invoked, the Building Tag File progress bar may be displayed while Slick-C macro code is tagged. ® • Bindings are based on the editor emulation mode (CUA is the default). The title bar of the Key Bindings dialog shows the current mode.
  • Page 453 • Search by key sequence - This filter is used for searching bindings in the Key Sequence column. It captures literal keyboard input. For example, when the focus is in this filter, press Ctrl and C at the same time, and "Ctrl+C" is displayed. Press the Backspace key and "Backspace" is displayed. Mouse events inside the filter are literal as well.
  • Page 454: Bind Key Dialog

    • Run - This button runs the selected command or user-recorded macro. • Remove - This button clears the binding for the selected command/macro. You can also press Delete to clear the binding. • Add - This button is used to initiate a new binding, displaying the Bind Key dialog. See ings Bind Key Dialog for more information.
  • Page 455: Redefine Common Keys Dialog

    mode (see below). • Cancel - Click this button to cancel the binding operation and close the dialog. • Advanced - Click this button to expand the language editing mode settings: • Bind to mode - By default, all new bindings are assigned to the "default" language editing mode, which means that the binding will work in all modes.
  • Page 456 Redefinable Keys The redefinable keys and their available commands are described below. • Backspace - The following commands are available for binding to the Backspace key: • Rubout - Deletes the character to the left of the cursor. If Word Wrap is on (Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting and select the margin is reached.
  • Page 457 switch to the opposite setting, depending on whether it is bound to Split Insert Line or Nosplit Insert Line. • Home - The following commands are available for binding to the Home key: • Begin Line - Moves the cursor to column one. •...
  • Page 458: Context Tagging Options Dialog

    causes the rest of the line to be moved to the previous tab stop. If you are using a mode that has a syn- tax indent for each level that is different from the tab settings (see option. If you want your Backspace key to delete through tab characters one column at a time, select this option.
  • Page 459 • Tag file on save - When this option is selected, files are retagged when you save a modified file. • Background tagging of open files - When this option is selected, all open files are retagged in the background if they have been modified. •...
  • Page 460 support for symbol cross-references. • Find references incrementally (faster) - When unselected, all files with potential references are searched and analyzed so that the files which do not contain any references are removed. When this option is selected, querying references will appear to be faster, since analysis stops when a file is found containing a valid occurrence.
  • Page 461: Color Coding Setup Dialog

    • Minimum - 8 MB • Default - 64 MB • Ideal - Sum of tag file sizes • Maximum - 25% of physical system memory • C Preprocessing button - Displays the C/C++ Preprocessing dialog box. Use this dialog to modify preprocessing so that Context Tagging can better analyze your code.
  • Page 462 General settings on this dialog box are described below (see Settings). Other options are categorized into the following tabs: • Tokens Tab • Numbers Tab • Strings Tab • Language Tab • Comments Tab Color Coding Setup Dialog Color Coding Setup Options - General Dia-...
  • Page 463: Color Coding Setup: Tokens Tab

    • Tags Tab Color Coding Setup Options - General Dialog Settings The following fields and buttons are available on the Color Coding Setup dialog: • Lexer name - Select the language that you wish to work with from the Lexer name drop-down list. Be sure to select the lexer you wish to affect before using the tabs to make settings.
  • Page 464 The following options are available: • Token type - Select from the following token types: • Keywords - When this option is selected, the list box displays the words that have keyword color. • CS keywords - When this option is selected, the list box to the right displays case-sensitive words that have keyword color.
  • Page 465: Color Coding Setup: Numbers Tab

    • Punctuation, Lib Symbols, Operators, User Defined - When one of these options is selected, the list boxes to the right display the words associated with each. • Identifiers - Select from the following options: • Case sensitive - Indicates whether identifiers are case-sensitive. •...
  • Page 466 The following options are available: • Hex numbers • 0x#### (C-Style) - When this option is selected, text such as 0x123ABC is color-coded in number color. • ####h (Intel assembler) - When this option is selected, text such as 123ABCh is color-coded in number color.
  • Page 467: Color Coding Setup: Strings Tab

    • &H#### (Basic) - When this option is selected, text such as &H123ABC is color-coded in number color. • "####"X (Rexx) - When this option is selected, strings such as "123ABC"X are color-coded in num- ber color. • Z#### (Fortran) - When this option is selected, strings such as Z"123ABC" are color-coded in num- ber color.
  • Page 468 The following options are available: • Double quoted strings • Two consecutive quotes represent one - """" for REXX represents a string of length one which is a double quote character. • Backslash double quote represents a double quote - "\"" for C represents a string of length one which is a double quote character.
  • Page 469: Color Coding Setup: Language Tab

    • Trailing backslash continues string across lines - When this option is selected, it indicates that searching for the terminating quote continues to the next line if the lines end with a backslash charac- ter. • Search for end quote across multiple lines - When this option is selected, it indicates that the string does not have to be terminated on the same line as the start quote character.
  • Page 470 The following options are available: • Language specific - To avoid requiring complicated BNF for defining color-coding, some hardware language-specific adjustments have been added. You may be able to use one of these language-specif- ic settings for another language, but there's no guarantee it will work. •...
  • Page 471: Color Coding Setup: Comments Tab

    HTMLEOF Unknown languages are color-coded in string color. Embedded language colors are user-definable. • Color identifiers followed by ( as a function - For language such as C++, Java, and Slick-C identifier followed by a parenthesis always indicates a function.
  • Page 472 The following options are available: • New Line comment - Click this button to define new single-line comments. • New Multi-line comment - Click this button to define new multi-line comments. • Line comment options - The following line comment options apply to multi-line comments: •...
  • Page 473: Color Coding Setup: Tags Tab

    • Nesting allowed - When this option is selected, this multi-line comment may have this multi-line comment inside it. • Only if first non-blank character in line - Indicates the start delimiter must be the first non-blank character in the line in order to be considered the start of a comment. This check box is available only when the Only when start delimiter is in column text box is completed.
  • Page 474 The following fields and settings are available: • Tag names - List box containing tags for HTML or XML. To add or delete tags, use the New and De- lete buttons below this list box. • >>Attributes - List box containing attributes that belong to the tag selected in the Tag names list box. To add or delete attributes, use the New Attr and Delete buttons below this list box.
  • Page 475: Color Settings Dialog

    Color Settings Dialog The Color Settings dialog contains options for changing embedded language colors and the colors of screen elements. See Colors for more information about changing these colors. To display the Color Set- tings dialog, click Window Preferences, expand SlickEdit and click General in the tree, then double- click the Color setting.
  • Page 476: Font Configuration Dialog

    • Attribute (HTML only) - This is the color used for a recognized attribute of an HTML tag. For ex- ample, the src attribute of the img tag gets this color. • Cursor - This screen element is displayed in the active edit window when the cursor is placed on the command line.
  • Page 477 Fonts for more information about changing fonts and a list of recommended fonts. To display the Font Configuration dialog, from the main menu click Window General in the tree, then double-click the Font setting. Figure 10.57. Font Configuration Dialog The following settings are available: •...
  • Page 478: Xml/Html Formatting Dialog

    • Status Line - For status messages displayed at the bottom of the application window. • SBCS/DBCS Source Windows - Editor windows that are displaying non-Unicode content (for ex- ample, plain text). • Hex Source Windows - Editor windows that are being viewed in Hex mode (View •...
  • Page 479: Url Mappings Dialog

    URL Mappings Dialog General in the tree, then double-click the XML/HTML Formatting setting. Alternatively, use the xml_html_options command to display the dialog. Figure 10.58. XML/HTML Formatting Dialog XML/HTML Formatting for information about enabling formatting and working with this feature. See Formatting Settings for information about the General, Content Wrap, and Tag Layout tabs.
  • Page 480: Proxy Settings Dialog

    Proxy Settings Dialog Proxy Settings Dialog If you need to configure proxy settings for when SlickEdit Core needs to use an Internet connection, use ® the Proxy Settings dialog (Window Preferences, expand SlickEdit and click General in the tree, then double-click the Proxy Settings setting).
  • Page 481: Network Options Dialog

    Network Options Dialog • Servers - Indicates the proxy address and port to use. • Exceptions - Indicates the Web site addresses that the proxy server should disregard. Separate entries with semicolons (;). Network Options Dialog This dialog allows you to set the Internet Protocol (IP) version. To access it, from the main menu click Window Preferences, expand SlickEdit and click General in the tree, then double-click the Network Options setting.
  • Page 482 needs to launch one. To access this dialog, click Window General in the tree, then double-click the Web Browser Setup setting. Note This configuration does not apply to the Help system. Figure 10.61. Web Browser Setup Dialog The following settings are available: •...
  • Page 483: Ftp Options Dialog

    boxes on this dialog box to have the HTML file name inserted into the command that is executed. • DDE - The Application, Topic, and Item text boxes specify DDE XTYP_REQUEST parameters and are used only if the Use DDE option is selected. FTP Options Dialog This dialog is used to configure default FTP options.
  • Page 484 • Anonymous e-mail address - Default password used for anonymous logins. • Do not upload - When on, saving an FTP file will not upload the file. • Prompt - When on, a prompt appears to upload when an FTP file is saved to specify ASCII or Binary transfer type.
  • Page 485 • Timeout (sec) - Default used when adding a new connection profile. Specifies the wait time for a reply from the FTP server. • Port - Default used when adding a new connection profile. • FTP port - By default, this is 21. •...
  • Page 486 • Enable firewall/proxy - When on, indicates you have a firewall or proxy. You need to turn this on to add a connection profile that uses a firewall. • Host name - Host name of firewall. • Port - Port number of firewall. •...
  • Page 487 SSH/SFTP Tab This tab on the FTP Options Dialog nections with the SSH server. Figure 10.65. FTP Options: SSH/SFTP Tab • SSH executable - The location of the SSH client program that is used to establish the secure connec- tion with the SSH server. SFTP support requires the OpenSSH client program to operate.
  • Page 488: Reflow Comment Dialog

    Reflow Comment Dialog Reflow Comment Dialog The Reflow Comment dialog (Format Reflow Comment), shown below, is used to reflow block com- ments, paragraphs, or a selection of the current file. Figure 10.67. Reflow Comment Dialog...
  • Page 489: Current Document Options Dialog

    The following options are available: • Entire block comment - If selected, reflows an entire block comment based on the current width and border settings for the block comment. • Match block comment setting - If selected, forces the borders to conform to the comment settings (Format Comment Setup- see •...
  • Page 490 The Current Document Options dialog allows you to enable/disable aspects of XML or HTML Formatting for just the current document. It can be displayed by clicking Format rent Document Options, or by using the xml_html_document_options command. Figure 10.68. Current Document Options Dialog The dialog contains the following: •...
  • Page 491: Appendix

    Chapter 11. Appendix...
  • Page 492: Encoding

    Encoding Encodings are used to convert a file to either SBCS/DBCS for the active code page or Unicode (more specifically UTF-8) data. By default, XML and Unicode files with signatures (UTF-8, UTF-16 and UTF-32) files are automatically loaded as Unicode UTF-8 data, while other more common program source files like .c, .java, and .cs source files are loaded as SBCS/DBCS active code page data.
  • Page 493 for the following list of features: • All Context Tagging features. ® • Color Coding. • Level 1 regular expressions as defined by the Unicode consortium. • Multi-file search and replace. • Support for many encodings including UTF-8, UTF-16, UTF-32, and many code pages. Automatic en- coding recognition for XML files.
  • Page 494 Using Unicode sion-specific or global encoding. Since there is no option for recognizing UTF-8 or UTF-32 files (other than Auto XML) by looking at the file contents, you will either need to set an extension-specific encoding, or specify the encoding in the Open dialog the first time you open the file. Some compilers (such as Visual C++) let you specify the code page in the source file (in fact, more than one code page can be used in the file).
  • Page 495 The following is a list of Unicode limitations: • Bold and italics color-coding is not supported. Support for this will be added in a future version. • Tab character operations are not fully supported. Tab display, the Expand tabs to spaces save option (Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Options setting and select the...
  • Page 496 Unicode Implementation Native Unicode and SBCS/DBCS editing modes are supported. When you edit a SBCS/DBCS (active code page) file such as a .c, .h, or .java file, the data is loaded as SBCS/DBCS data and is not con- verted to Unicode. When you edit a Unicode file, such as an XML file, the data is converted to UTF-8 that is one of the standard formats for supporting Unicode files.
  • Page 497: Environment Variables

    Environment Variables Below is a list of environment variables that can be used. Configuration environment variables are set in vslick.ini. You can also use the set command to temporarily change one of the configuration environment variables or any other environment variable. See Caution Do not set the VSLICKCONFIG environment variable in vslick.ini.
  • Page 498 Environment Variable VSLICKBITMAPS VSLICKMISC VSLICKALIAS VSLICKTAGS VSLICKBACKUP VSLICKSAVE VSLICKLOAD VSLICKXTERM VSUSER Environment Variables Description VSLICKPATH must also contain the directories lis- ted here. One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain bitmap files (*.bmp).
  • Page 499: Setting Environment Variables In Vslick.ini

    Environment Variable VSLICKXNOBLINK VSLICKXNOPLUSNEWMSG Setting Environment Variables in vslick.ini Place configuration environment settings in the file vslick.ini. This file is located in the following de- fault directory based on your platform (if it does not exist, it can be created manually): •...
  • Page 500 Configuration Variables of configuration environment variables, see the table above. The syntax of the set command is: set [envvar_name [=value]] When you invoke the set command with no parameters, a new buffer is created and the current environ- ment variable settings are inserted. The current value of an individual environment variable may be re- trieved by executing the set command followed by the name of the environment variable.
  • Page 501: Configuration Variables

    Alternatively, you can use the Symbols View Expand the Slick-C folder and then expand the Global Variables folder. If Slick-C hasn't already been tagged, type fp into the SlickEdit Core command line. This is an abbreviation of the find_proc command, which will trigger tagging if it hasn't already been done.
  • Page 502 Configuration Variable def_buflist def_ctags_flags def_deselect_copy def_do_block_mode_key def_eclipse_switchbuf def_error_re2 Table of Configuration Variables Description the Brief emulation. When the editflst.e macro is loaded, the space-delimited extensions listed by this variable are filtered out by the edit command's completion. The default is .ex .obj .exe .lib. Change this variable to find the initial file in Buffer List.
  • Page 503 Configuration Variable def_filelist_show_dotfiles def_from_cursor def_linewrap def_linux1_shell def_max_filehist def_max_mffind_output def_max_workspace_hist def_modal_paste Table of Configuration Variables Description Controls the global Show hidden files option on General Tab Windows, the default value of this variable is 1; change to 0 to view Dot files. On UNIX platforms, the default value is 0;...
  • Page 504 Configuration Variable def_plusminus_blocks def_preplace def_rwprompt def_save_macro def_shift_updown_line_select def_switchbuf_cd def_top_bottom_push_bookmark def_undo_with_cursor def_update_context_max_file_size def_vc_advanced_options Table of Configuration Variables Description When the value is set to 1, the plusminus com- mand will try to find code blocks to expand or col- lapse if the cursor is on a line that does not have a Plus or Minus bitmap on it.
  • Page 505 Configuration Variable def_vtg_tornado def_xml_no_schema_list Directories and Files Description that decrease performance when using ClearCase version control. Set this variable value to 0 to prevent Context Tag- ging of Tornado files. To prevent the editor from accessing the Internet to validate and get color coding information from DTD’s, add your XML extension to this variable.
  • Page 506: Directories And Files

    Directories and Files Configuration Directory Your SlickEdit Core configuration directory contains configuration files representing the changes you ® have made through setting editor options, and it preserves the state of SlickEdit Core by using the state file, vslick.sta. Directory Location By default, the configuration directory is located in My Documents/My SlickEdit Core Config/ <Version>...
  • Page 507 Configuration Directory Use the New Directory fields to modify either of these values, and click Apply, and then OK to change the settings. Note that these changes will not be effective until the next start of Eclipse. Backing Up the Configuration Directory You should make periodic backups of your SlickEdit Core configuration directory.
  • Page 508 User Config File *.als alias.slk ftp.ini (UNIX: uftp.ini) project.vpe (UNIX: uproject.vpe) ubox.ini uformat.ini uprint.ini uscheme.ini user.vlx usercpp.h uservc.slk usrprjtemplates.vpt vrestore.slk vslick.ini Configuration Directory Description A text file that contains user-defined extension-specif- ic aliases. A text file that contains user-defined global aliases (directory aliases).
  • Page 509: System Configuration Files

    A text file that contains user-defined dialog boxes and menus in Slick-C syntax. A text file that contains system modified dialog boxes and menus. These changes are NOT auto- matically transferred unless the version encoding matches.
  • Page 510 System Config File format.ini print.ini prjtemplates.vpt syscpp.h (UNIX: usyscpp.h) vcsystem.slk (UNIX: uvcsys.slk) vslick.ini vslick.sta (UNIX: vslick.stu) vslick.vlx vsscheme.ini File Search Order Description A text file that contains default beautifier schemes. A text file that contains default printing schemes. This file is NOT modified by the dialogs and is not preserved when a new editor is installed.
  • Page 511: File Search Order

    File Search Order Search Order for Configuration Files Several files are automatically searched for, either immediately when the editor is invoked or during the course of operation. The search order for configuration files such as vslick.ini, vslick.sta, and vrestore.slk is: 1.
  • Page 512: Vlx File And Color Coding

    The vslick.vlx file defines language-specific coloring support for the following languages: • Ada • Assembler • AWK • C • C++ • CFScript • CICS • COBOL • dBASE • Delphi • Fortran • HTML • Java • Modula-2 • Pascal • Perl • Python • REXX • Slick-C ®...
  • Page 513: Modifying The Vlx File To Change A Color Definition

    2. Search for one of the section names: CPP, Java, Delphi, Pascal, AWK, REXX, Perl, HTML, Modula-2, AWK, COBOL, Python, CICS, Fortran, Visual Basic .NET, Ada, or Slick-C 3. Modify the definition. See below for information on the syntax of definitions.
  • Page 514 Statement case-sensitive= [Y | N] idchars=start_id_chars after_id_chars styles= style mlcomment= start_symbol end_symbol [nesting] [followedby idchars] [colorname] mlcomment= start_symbol start_col [checkfirst|leading] end_symbol [lastchar] Creating a Lexer Name and a New VLX File Description Defines the case sensitivity for the language. This statement must be the first or second statement within the section.
  • Page 515 Statement mlckeywords= [keyword ] [keyword ] ... keywordattrs= [mlckeyword] [attribute ] [at- tribute ] ... linecomment= [symbol ] [col | col+ | start_col - end_col] [checkfirst|leading] Creating a Lexer Name and a New VLX File Description the line is a comment before determining the color coding of symbols in the line.
  • Page 516: Table Of Style Value

    Statement keywords= [keyword ] [keyword ] ... cskeywords= [keyword ] [keyword ] ... ppkeywords= [keyword ] [keyword ] ... symbol1= [ keyword ] [ keyword ] ... symbol2= [keyword ] [keyword ] ... symbol3= [keyword ] [keyword ] ... symbol4= [keyword ] [keyword ] ... Table of style Values The table below describes the style values that can be used.
  • Page 517 Value of style dqbackslashml dqmultiline dqdoubles dqterminate dqlen1 sqbackslash sqbackslashml sqmultiline sqdoubles sqterminate sqlen1 amphhex ampooct hexh Creating a Lexer Name and a New VLX File Description Color double-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line (like C).
  • Page 518 Value of style octo octq poundbase underlineint xhex nonumbers rexxhex packageimport idparenfunction html backslashescapechars heredocument perl Creating a Lexer Name and a New VLX File Description Intel Assembler). Octal numbers are of the form ddddO (like Intel As- sembler). Octal numbers are of the form ddddQ (like Intel As- sembler).
  • Page 519 Value of style bquote model204 cics python Editing the Key Binding Source Description Special support for TCL language color-coding. Perl- and Linux Shell-style backquote (subshell). Special support for Model 204 language. Special support for CICS embedded in COBOL. Special support for Python.
  • Page 520: Editing The Key Binding Source

    If you are creating a new emulation or if you change many key bindings, you might want to edit your key binding source instead of using the Key Bindings Dialog. To create a Slick-C batch macro containing ® your current key bindings, enter the command list_source on the command line. One of the files gener- ated by this command is vusrdefs.e.
  • Page 521: Menu Editing

    Menu Editing For information about accessing SlickEdit Creating and Editing Menus SlickEdit Core menus are controlled by Slick-C ® files. If you plan to customize your menu items, be sure to back up your configuration directory before installing any updates or new versions of SlickEdit Core, as they will overwrite your changes.
  • Page 522 Core has some attributes for enabling/disabling predefines that you can specify for any com- ® mand. When these predefined auto-enabling attributes are not enough, you need to implement a callback which determines the enable or disable state of the command. See the Slick-C Macro Programming ®...
  • Page 523: Using The Ispf And Xedit Emulations

    Using the ISPF and XEDIT Emulations This section describes the features of the ISPF editor emulation and outlines some XEDIT line com- mands. ISPF Options Dialog The ISPF Options dialog is used to tune various ISPF emulation options. When you are in ISPF emula- tion, you can access this dialog from the main menu by clicking Window SlickEdit and click General in the tree, then double-click the ISPF Options setting.
  • Page 524 Only the following line commands are allowed in read-only mode: • ISPF Line Labels - Define a label. • ISPF Line Command BNDS - Insert a column boundary ruler line. • ISPF Line Command COLS - Insert a column ruler line. •...
  • Page 525: Ispf Primary Commands

    ISPF Primary Commands The following table of standard ISPF primary commands are supported in the ISPF emulation mode. Primary commands are entered by placing the cursor on the command line. To place the cursor on the command line, either press the Esc key, click on the message line, or use is- pf_retrieve (F12).
  • Page 526 Command ispf_copy ispf_create ispf_cut ispf_delete ispf_edit ispf_end ispf_exclude ispf_find ispf_flip ispf_hex ispf_hilite ispf_locate ispf_move ispf_nonumber ispf_number ispf_paste ispf_preserve ISPF Primary Commands Description Insert the contents of a file or PDS member into the buffer. Create a new file or PDS member containing the contents of the buffer.
  • Page 527: Ispf Line Commands

    Command ispf_rchange ispf_renumber ispf_replace ispf_reset ispf_return ispf_rfind ispf_save ispf_sort ispf_submit ispf_swap ispf_tabs ispf_unnumber ispf_undo ISPF Line Commands The table below shows ISPF edit line commands that are supported in the ISPF emulation mode. Enter line commands by typing over the prefix area (on the left-hand side of the editor control) which con- tains either ====== or the line number.
  • Page 528 Right Control key, depending on your preferences. Several commands or line labels can be entered and then processed at one time. The ispf_reset command is used to clear the prefix area. Table 11.8. ISPF Line Commands Command ISPF Line Labels ISPF Line Command Shift ISPF Line Command A ISPF Line Command B...
  • Page 529 Command ISPF Line Command Show ISPF Line Command TABS ISPF Line Command TE ISPF Line Command TF ISPF Line Command TJ ISPF Line Command TS ISPF Line Command Uppercase ISPF Line Command Exclude ISPF Line Command Select ISPF Line Command Documentation ISPF Line Labels .label Usage .label, where label does not start with a z...
  • Page 530 ISPF Line Commands ISPF Shift Lines Left or Right Usage • ( [n] - Shift the current line n columns left, default 2 • (( [n] - Shift the block of lines n columns left, default 2 • ) [n] - Shift the current line n columns right, default 2 •...
  • Page 531 ISPF Line Commands ISPF Insert Before B Usage B [n] Remarks Identifies a line before which copied or moved lines are to be inserted n times. You are allowed to specify multiple A, B, or O line commands to have the same copy or move block inserted in multiple places. See Also ispf_copy, ispf_paste, ISPF Line Command B, ISPF Line Command Copy, ISPF Line Command Move, ISPF Line Command Overlay...
  • Page 532 ISPF Line Commands ISPF Line Command A, ISPF Line Command B, ISPF Line Command Move, ISPF Line Command Overlay ISPF Insert Columns Ruler COLS or SCALE Usage COLS SCALE Remarks Insert a column ruler line. The column ruler line is read-only. See Also ispf_bounds, ispf_tabs, ISPF Line Command BNDS, ISPF Line Command TABS ISPF Delete Lines D and DD for blocks...
  • Page 533 ISPF Line Commands mand Exclude ISPF Insert Lines Usage I [n] Remarks Insert one or more blank data entry lines. See Also ispf_enter, ISPF Line Command TE ISPF Lowercase Lines LC, LCC and LCLC for blocks Usage • LC [n] - Lowercase n lines starting with the line with the command. •...
  • Page 534 ISPF Line Commands mand Exclude ISPF Move Lines M and MM for blocks Usage • M [n] - Move n lines starting with the line with the command. • MM - Move a block of lines, must match another MM. Remarks Specify lines to be moved to another location.
  • Page 535 ISPF Line Commands lines are to be converted. The second (block) form (MDMD or MDD) is placed on the first and last lines of the block to be converted. See Also ISPF Line Commands, ISPF Line Command COLS, ISPF Line Command BNDS, ISPF Line Com- mand MASK, ISPF Line Command TABS ISPF Overlay Lines O and OO for blocks Usage...
  • Page 536 ISPF Line Commands Usage • S [n] - Unexclude (expose) the first n lines of an excluded block. • SS - Unexclude (expose) an entire excluded block. Remarks Expose one or more lines having the leftmost indentation level in a block of excluded lines. The SS line command exposes the entire block of lines and is to S[m] where m is the number of lines in the block of excluded lines.
  • Page 537 ISPF Line Commands Remarks Reflows paragraphs according to the current column boundary settings. See Also reflow_paragraph ISPF Join Lines TJ Usage Remarks Join this line with the next line. See Also ISPF Line Command TS, join_line ISPF Split Line TS Usage Remarks Divides a line so that data can be added.
  • Page 538: Xedit Line Commands

    ISPF Line Commands UC [n], specifies that the line and the subsequent n-1 lines are to be converted. The second (block) form (UCUC or UCC) is placed on the first and last lines of the block to be converted. See Also ispf_caps, ISPF Line Command Lowercase, lowcase, upcase ISPF Exclude Lines X and XX for blocks Usage...
  • Page 539 XEDIT Note the following conflicts with standard ISPF edit line commands: • F conflicts with unexclude first (F). • A conflicts with paste after (A). • L conflicts with unexclude last (L). • LL conflicts with unexclude block (LL). ISPF Unsupported Primary Commands The table below shows ISPF primary commands that are not supported in the ISPF emulation mode.
  • Page 540 Command imacro level model notes nulls pack profile recovery rmacro setundo stats version view The following commands are supported in ISPF emulation mode. Table 11.11. Supported ISPF Commands Command ispf_bottom ispf_down ispf_enter ISPF Line Commands Description Save the name of an initial macro in the edit profile. Set the modification level number in PDF library statistics.
  • Page 541 Command ispf_home ispf_retrieve ispf_retrieve_back ispf_top ispf_up ispf_do_lc Regular Expression Syntax Description Place the focus on the command line in ISPF emu- lation. Does command line retrieval, getting the next com- mand line from the list. Identical to the ispf_retrieve back command. Move cursor up to the top of the buffer.
  • Page 542: Regular Expression Syntax

    Regular Expression Syntax This section provides lists of the UNIX, SlickEdit Unicode category specifications. UNIX Regular Expressions UNIX regular expressions are defined in the following table. Table 11.12. UNIX Regular Expression UNIX Regular Expression X{n1} X{n1,} X{,n2} X{n1,n2} X{n1}? UNIX Regular Expressions , and Brief regular expression syntaxes, samples, and ®...
  • Page 543 UNIX Regular Expression X{n1,}? X{,n2}? X{n1,n2}? (?!X) (?dX) (?:X) [char-set] UNIX Regular Expressions Definition Minimal match of at least n1 occurrences of X. Minimal match of at least zero occurrences but not more than n2 occurrences of X. Minimal match of at least n1 occurrences but not more than n2 occurrences of X.
  • Page 544 UNIX Regular Expression [^char-set] [char-set1 - [char-set2]] [char-set1 & [char-set2] \x{hhhh} \p{UnicodeCategorySpec] \P{UnicodeCategorySpec] \p{UnicodeIsBlockSpec] \P{UnicodeIsBlockSpec] UNIX Regular Expressions Definition Matches any character not specified by char-set. A dash (-) character may be used to specify ranges. Character set subtraction. Matches all characters in char-set1 except the characters in char-set2.
  • Page 545 UNIX Regular Expression \xhh \dddd UNIX Regular Expressions Definition the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Regular Expressions. Matches hexadecimal character hh where 0<=hh<=0xff. Matches decimal character ddd where 0<=ddd<=255. Defines a back reference to tagged expression number d.
  • Page 546 UNIX Regular Expression \char \:char The precedence of operators, from highest to lowest, is as follows: UNIX Regular Expressions Definition Turns off multi-line matching (default). You can still use \n to create regular expressions which match one or more lines. However, expressions like .+ will not match multiple lines.
  • Page 547: Unix Regular Expression

    • +, *, ?, {}, +?, *?, ??, {}? (These operators have the same precedence.) • concatenation • | UNIX Regular Expression Examples The table below shows examples of UNIX regular expressions. Table 11.13. UNIX Regular Expression Examples Sample UNIX Expression ^defproc ^definit$ ^\*name...
  • Page 548: Slickedit ® Regular Expressions

    Sample UNIX Expression \x{6587} [\p{L}-[qw]] [\p{L}] [\p{Lul}] [\P{L}] [\p{isGreek}] SlickEdit Regular Expressions ® SlickEdit regular expressions are defined in the following table. Table 11.14. SlickEdit Regular Expressions SlickEdit Regular Expression X:n1 SlickEdit Regular Expressions ® Description ters in the Greek block. Matches Unicode character with hexadecimal value 6587.
  • Page 549 SlickEdit Regular Expression X:n1, X:n1,n2 X:*n1, X:*n1,n2 {#dX} [char-set] [~char-set] SlickEdit Regular Expressions ® Definition avoid ambiguous expressions. For example a:9()1 searches for nine instance of the letter a followed by a 1. Maximal match of at least n1 occurrences of X. Maximal match of at least n1 occurrences but not more than n2 occurrences of X.
  • Page 550 SlickEdit Regular Expression [^char-set] [char-set1 - [char-set2]] [char-set1 & [char-set2]] \x{hhhh} \p{UnicodeCategorySpec] \P{UnicodeCategorySpec] \p{UnicodeIsBlockSpec] \P{UnicodeIsBlockSpec] SlickEdit Regular Expressions ® Definition cept uppercase letters. Same as [~char-set] above. Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. For example, [a-z-[qw]] matches all English lower- case letters except q and w.
  • Page 551 SlickEdit Regular Expression \xhh \ddd SlickEdit Regular Expressions ® Definition Regular Expressions. Matches hexadecimal character hh where 0<=hh<=0xff. Matches decimal character ddd where 0<=ddd<=255. Defines a back reference to tagged expression number d. For example, {abc}def\g0 matches the string abcdefabc. If the tagged expression has not been set, the search fails.
  • Page 552 SlickEdit Regular Expression \char :char The precedence of operators, from highest to lowest, is as follows: SlickEdit Regular Expressions ® Definition Turns off multi-line matching (default). You can still use \n to create regular expressions which match one or more lines. However, expressions like ?# will not match multiple lines.
  • Page 553: Brief Regular Expressions

    • +, #, *, @, :, :* (These operators have the same precedence.) • concatenation • | SlickEdit Regular Expression Examples ® The table below shows examples of SlickEdit regular expressions. Table 11.15. SlickEdit Regular Expression Examples Sample SlickEdit Regular Expression ^defproc ^definit$ ^\:name...
  • Page 554 Brief regular expressions are defined in the following table. Table 11.16. Brief Regular Expressions Brief Regular Expression < > X\:* X\:@ X\:+ X\:n1 X\:n1, X\:,n2 X\:n1,n2 X\:n1? X\:n1,? Brief Regular Expressions Definition Matches beginning of line. Matches beginning of line. Matches end of line.
  • Page 555 Brief Regular Expression X\:,n2? X\:n1,n2? \(X\) {@dX} [char-set] [~char-set] [char-set1 - [char-set2]] Brief Regular Expressions Definition Minimal match of at least zero occurrences but not more than n2 occurrences of X. Minimal match of at least n1 occurrences but not more than n2 occurrences of X.
  • Page 556 Brief Regular Expression [char-set1 & [char-set2]] \x{hhhh} \p{UnicodeCategorySpec] \P{UnicodeCategorySpec] \p{UnicodeIsBlockSpec] \P{UnicodeIsBlockSpec] \xhh \dddd Brief Regular Expressions Definition all Unicode lowercase letters except q and w. Character set intersection. Matches all characters in char-set1 that are also in char-set2. For ex- ample, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127.
  • Page 557 Brief Regular Expression \char \:char Brief Regular Expressions Definition Defines a back reference to tagged expression number d. For example, {abc}def\0 matches the string abcdefabc. If the tagged expression has not been set, the search fails. Specifies cursor position if match is found. If the ex- pression xyz\c is found, the cursor is placed after the z.
  • Page 558: Brief Regular Expression Examples

    Brief Regular Expression Brief Regular Expression Examples The table below shows example of Brief regular expressions. Table 11.17. Brief Regular Expression Examples Sample Brief Regular Expression <defproc <definit> <\*name Brief Regular Expressions Definition char. The predefined expressions are: • \:a [A-Za-z0-9 - Matches an alphanumeric char- acter.
  • Page 559: Unicode Category Specifications For Regular Expressions

    Sample Brief Regular Expression [\t ] [\d9\d32] [\x9\x20] {for}|{while} ^\:p xy+z Unicode Category Specifications for Regular Expressions The Unicode consortium standard regular expression categories are supported. The syntax for specifying categories is: \p{MainCategoryLetter Subcategories} The above syntax matches the categories specified. The following syntax matches all characters not in the categories specified: \P{MainCategoryLetter Subcategories} The \p and \P notations can only be used inside a character set specification.
  • Page 560 The following table lists the valid subcategories for a specific main category. These character tables were generated using the file UnicodeData-3.1.0.txt found on the Unicode Consortium Web site tp://unicode.org). Table 11.18. Unicode SubCategories for Regular Expressions Subcategory Unicode Category Specifications for Regular Expressions Description Letter, Uppercase...
  • Page 561: Unicode Character Blocks For Regular Expressions

    Subcategory Unicode Character Blocks for Regular Expressions The Unicode consortium standard regular expression block categories are supported. The syntax for spe- cifying a character block is: \p{IsBlockName} The above syntax matches the characters in the block specified. The following syntax matches all charac- ters not in the block specified: \P{IsBlockName} The \p and \P notations may only be used inside a character set specification.
  • Page 562 • XMLNameChar - All characters that are valid in an XML tag name. The following table lists the valid character block names. These character tables were generated using the blocks.txt file found on the Unicode Consortium Web site (http://unicode.org). Table 11.19. Unicode Character Blocks for Regular Expressions Range 0000..007F 0080..00FF...
  • Page 563 Range 0B80..0BFF 0C00..0C7F 0C80..0CFF 0D00..0D7F 0D80..0DFF 0E00..0E7F 0E80..0EFF 0F00..0FFF 1000..109F 10A0..10FF 1100..11FF 1200..137F 13A0..13FF 1400..167F 1680..169F 16A0..16FF 1780..17FF 1800..18AF 1E00..1EFF 1F00..1FFF 2000..206F 2070..209F Unicode Character Blocks for Regular Expressions Block Name Tamil Telugu Kannada Malayalam Sinhala Thai Tibetan Myanmar Georgian HangulJamo Ethiopic Cherokee...
  • Page 564 Range 20A0..20CF 20D0..20FF 2100..214F 2150..218F 2190..21FF 2200..22FF 2300..23FF 2400..243F 2440..245F 2460..24FF 2500..257F 2580..259F 25A0..25FF 2600..26FF 2700..27BF 2800..28FF 2E80..2EFF 2F00..2FDF 2FF0..2FFF 3000..303F 3040..309F 30A0..30FF Unicode Character Blocks for Regular Expressions Block Name CurrencySymbols CombiningMarksforSymbols LetterlikeSymbols NumberForms Arrows MathematicalOperators MiscellaneousTechnical ControlPictures OpticalCharacterRecognition EnclosedAlphanumerics BoxDrawing BlockElements...
  • Page 565 Range 3100..312F 3130..318F 3190..319F 31A0..31BF 3200..32FF 3300..33FF 3400..4DB5 4E00..9FFF A000..A48F A490..A4CF AC00..D7A3 D800..DB7F DB80..DBFF DC00..DFFF E000..F8FF F900..FAFF FB00..FB4F FB50..FDFF FE20..FE2F FE30..FE4F FE50..FE6F FE70..FEFE Unicode Character Blocks for Regular Expressions Block Name Bopomofo HangulCompatibilityJamo Kanbun BopomofoExtended EnclosedCJKLettersandMonths CJKCompatibility CJKUnifiedIdeographsExtensionA CJKUnifiedIdeographs YiSyllables YiRadicals HangulSyllables HighSurrogates...
  • Page 566 Range FEFF..FEFF FF00..FFEF FFF0..FFFD 10300..1032F 10330..1034F 10400..1044F 1D000..1D0FF 1D100..1D1FF 1D400..1D7FF 20000..2A6D6 2F800..2FA1F E0000..E007F Unicode Character Blocks for Regular Expressions Block Name Specials HalfwidthandFullwidthForms Specials OldItalic Gothic Deseret ByzantineMusicalSymbols MusicalSymbols MathematicalAlphanumericSymbols CJKUnifiedIdeographsExtensionB CJKCompatibilityIdeographsSupplement Tags...
  • Page 568 SlickEdit, Visual SlickEdit, Clipboard Inheritance, DIFFzilla, SmartPaste, Context Tagging, Slick-C, and Code Quick | Think Slick are registered trademarks of SlickEdit Inc. All other products or company names are used for identification purposes only and may be trademarks of their respective owners.

This manual is also suitable for:

Corev3.3 for eclipse

Table of Contents