-
08SLICK0011_CORE_upd 1/24/08 11:05 AM Page 1 ® SlickEdit Corev3.3 for Eclipse ™ 1.919.473.0070 1.800.934.EDIT 1.919.473.0080 fax ® SlickEdit Core v3.3 for Eclipse SlickEdit Inc. 3000 Aerial Center Parkway, Suite 120 Morrisville, NC 27560 USA info@slickedit.com www.slickedit.com ™ SlickEdit, Visual SlickEdit, Clipboard Inheritance, DIFFzilla, SmartPaste, Context Tagging, Slick-C, and Code Quick | Think Slick are registered trademarks of SlickEdit Inc.
-
-
SlickEdit® Core v3.
-
SlickEdit® Core v3.3 for Eclipse™ Information in this documentation is subject to change without notice and does not represent a commitment on the part of SlickEdit Inc. The software described in this document is protected by U.S. and international copyright laws and by other applicable laws, and may be used or copied only in accordance with the terms of the license or nondisclosure agreement that accompanies the software.
-
-
-
Table of Contents 1. Introduction ................................................................................................................... 1 Getting the Most Out of SlickEdit® Core ....................................................................................2 Cool Features ....................................................................................................................2 Write More Code, Faster ..............................................................................
-
SlickEdit® Core v3.3 for Eclipse™ 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 ............
-
SlickEdit® Core v3.3 for Eclipse™ Class View ......................................................................................................................82 Outline View ....................................................................................................................86 Find Symbol View ...........................................................................................................88 Preview View .........................................................................
-
SlickEdit® Core v3.3 for Eclipse™ Surround With ...............................................................................................................166 Unsurround ...................................................................................................................170 Bookmarks .............................................................................................................................172 Named Bookmarks ...............................................................
-
SlickEdit® Core v3.3 for Eclipse™ Javadoc Editor ..............................................................................................................252 Organizing Java Imports ...............................................................................................252 Java Refactoring ...........................................................................................................253 XML and HTML ....................................................................................
-
SlickEdit® Core v3.3 for Eclipse™ Select Text to Paste Dialog ...........................................................................................340 Enumerate Dialog .........................................................................................................340 Filter Selection: Command Dialog ................................................................................341 Search Dialogs ................................................................................................
-
SlickEdit® Core v3.3 for Eclipse™ Configuration Variables .........................................................................................................479 Viewing Configuration Variables ...................................................................................479 Setting/Changing Configuration Variables ....................................................................479 Table of Configuration Variables ...............................................................................
-
xii
-
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 ...................................................
-
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 ......................................................
-
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 .................................................
-
SlickEdit® Core v3.3 for Eclipse™ 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 ............................
-
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 .....................................
-
xviii
-
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 ............................................................................................
-
xx
-
Chapter 1.
-
Cool Features Getting the Most Out of SlickEdit® Core 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. SlickEdit Core brings the rich history of excellence of SlickEdit to the Eclipse framework.
-
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.
-
Accessing Documentation Documentation and Conventions Accessing Documentation Documentation is located in the SlickEdit® Core installation directory at /eclipse/plugins/com.slickedit.core_VERSION/docs. The docs directory contains PDFs of the following items: • The User Guide - This guide provides comprehensive information about using SlickEdit Core.
-
Supported Languages and Environments 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 Chapter 10, SlickEdit Core Dialogs. Buttons on dialogs, such as OK and Close, are not usually documented since the meaning is obvious.
-
Supported Languages and File Types Supported Languages and Environments This section lists the languages and file types supported by each SlickEdit® Core feature as well as the supported emulations. Supported Languages and File Types The table below indicates the languages and file types that support key SlickEdit® Core features. Features that are not language-specific, such as DIFFzilla®, are not listed here. Table 1.1.
-
Supported Languages and File Types Feature Languages Javadoc™ Editor ActionScript, C, C#, C++, J#, Java, JavaScript, Slick-C Select/Hide Code Block ActionScript, Ada, C, C#, C++, CFML, Ch, COBOL, DB2, Fortran, High Level Assembler, HTML, IDL, InstallScript, J#, Java, JavaScript, Modula-2, Objective-C, Pascal, Perl, PHP, PL/SQL, Slick-C, Tcl, Visual Basic, Visual Basic .NET, XML, XSD Selective Display Collapsible code block and function bodies.
-
Supported Languages and File Types 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 Tagging®, SmartPaste®, Syntax Expansion, Syntax Indenting, and Color Coding. In fact, Context Tagging picks up embedded tags. For example, the Outline view displays function names if any exist. Embedded language colors are user-defined.
-
Supported Editor Emulations document terminator with the color coding lexer name. The following Perl example shows HTML embedded in a Perl script. Unknown languages are color-coded in string color. Figure 1.2.
-
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 • 150 MB available hard disk space on Windows, 200 MB on Linux • Eclipse 3.3, including JDT • Java 5 or later (Linux only) • Internet connection required to activate license Optionally, CDT 3.1 is needed to run, compile, and debug C and C++ programs.
-
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. 2. Change to the root directory of your Eclipse installation, and run the following command: chmod -R +x plugins/com.slickedit.linux.libs_3.3.
-
Licensing • To buy a full license, visit the SlickEdit Web site at http://www.slickedit.com or select the Purchase a 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® Core contacts the license server over the Internet. You are permitted up to five concurrent activations of SlickEdit Core, initially.
-
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 display cards, upgrading memory, or changing hard drives can cause the license to become "damaged". A license can also be damaged by changing the system date by more than one day. When this happens you will need to repair the license.
-
Using the Help System Help and Product Support There are several ways to get help about SlickEdit® Core: • Use the Help system - See Using the Help System below. • Search the FAQ - A list of frequently asked questions and answers is available from the Product Support section of our Web site at http://www.slickedit.com. • Use the Community Forums - Search for or post your question on the SlickEdit Community Forums to seek help from other SlickEdit Core users. The forums are located at http://community.
-
Chapter 2. Quick Start SlickEdit® Core provides numerous configuration options so you can customize your environment according 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 and Extension-Specific Options.
-
Extension-Specific 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 Chapter 10, SlickEdit Core Dialogs. Use the Preferences dialog to access SlickEdit® Core options described below. To display the Preferences dialog, from the main menu, click Window → Preferences.
-
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 extension you wish to affect from the Extension drop-down list.
-
Extension-Specific Options processor macros that you use in your code for portability or convenience. For performance considerations, 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.
-
Chapter 3.
-
The Workbench 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 Eclipse layout. The Workbench The workbench is the area where the workspace, projects, and programs are contained. Use the workbench to manage and edit all projects in various perspectives, views, or editors. Work may only occur in one workbench at a time. Figure 3.1.
-
Perspectives The Workspace The workspace is a collection of projects. A project contains all resources such as source files, subfolders, 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. For example, the Java perspective has a much different set of views than the Debug perspective. You can customize each perspective's layout by dragging and dropping.
-
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. From the Associated Editors list, select the desired editor. 5. To make this the default editor for this file type, click the Default button. 6. Click OK.
-
Switching Between the SlickEdit® Core Editor and Ec• 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. • To open a file that is outside of the workspace, from the main menu, click File → Open. Figure 3.3.
-
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 plugin.xml files. Similarly, you can also switch from any Eclipse editor to the SlickEdit Core editor for the current buffer.
-
lipse Editors Views Views are windows that show various types of information that you can move around and dock within Eclipse. 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. The editor status area also displays the line and column number for the cursor location. Figure 3.4.
-
Command Line vironment. By the same token, some SlickEdit commands may not be available.
-
Opening SlickEdit Core 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. Views also have their own menus.
-
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. Note that the breakpoints functionality in SlickEdit® Core integrates with the Eclipse Breakpoints view.
-
The SlickEdit® Core Command Line Provides the capability to interactively create and test regular expressions. See The Regex Evaluator for more details. SlickEdit Search Displays the results of multi-file searches, or when the option List all occurrences is selected on the 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.
-
Activating the 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 operations that may not warrant a key binding, or complex commands that require arguments. Note • SlickEdit® Core commands that contain two or more words are written throughout our documentation with underscore separators: for example, cursor_down.
-
Command Line Completions Command Line History The command line maintains a command history, allowing you to quickly reuse previously entered commands. Once the command line is open, use the arrow keys to scroll up and down in the command history. Command Line Completions As you type a command, a list of matching completions is displayed, including any command line arguments used in a previous command.
-
Starting a Program from the Command Line (Shelling) You can use the SlickEdit ® Core command line to determine what keys are associated with what commands, and vice-versa. Tip Alternatively, you can use the Key Bindings dialog (click Window → Preferences, expand 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. See Key Bindings Dialog for more information.
-
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.
-
Using the Mouse and Keyboard Command Description f symbol Find a symbol /search_string/options Search for a string c/search/replace/options Replace a string sb name Set a bookmark gb name Jump to a bookmark man command Show UNIX man page del filename Delete file dos command Execute command outside of editor math expr Evaluate expression 34
-
Key Shortcuts in Text Boxes Using the Mouse and Keyboard SlickEdit® Core provides four ways to launch operations: commands, menu items, key bindings, and buttons. For example, to launch the Open dialog box in order to open a file, you could use any of the following methods: • Type the gui_open command on the SlickEdit command line. • Click File → Open File. • Press the key binding F7 or Ctrl+O. The command forms the basis of each method.
-
Key Shortcuts in Text Boxes Key or Key Sequence Operation ? List matches to partially-typed parameter Ctrl+Shift+O Expand alias Ctrl+E Cut to end of line Ctrl+Backspace Cut line Ctrl+K Copy word to clipboard Ctrl+Shift+K Cut word Ctrl+Shift+L Lowercase word Ctrl+Left arrow Previous word Ctrl+Right arrow Next word Ctrl+V Paste Ctrl+X Cut Ctrl+C Copy Ctrl+Shift+X Append cut Ctrl+Shift+C Append to clipboard Ctrl+Shift+V List clipboards Shift+Home Select text between cursor and
-
Redefining Common Keys Key or Key Sequence Operation End Move cursor to end of line Home Move cursor to beginning of line Double-click Select word Triple-click Select line 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.
-
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. Click the Tab Options button to change the function of the Tab key. The Indent tab of the Extension Options dialog box is displayed. For more information on changing Tab key functions, see Indenting with Tabs .
-
Chapter 4.
-
Global Preferences Introduction to User Preferences SlickEdit® Core can be customized to accommodate your own individual preferences. Most user preference information is available by clicking Window → Preferences, expanding SlickEdit and clicking General in the tree. User preferences are broken into two categories: preferences that apply to all languages (global preferences), and preferences that apply to specific language extensions.
-
Supported Emulations Emulations Emulation is the process of imitating another program. SlickEdit® Core provides emulations of key bindings for 13 editors so that you can use the style to which you are accustomed, making your coding experience 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 SlickEdit Core installation directory.
-
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 mode. Key bindings and shortcuts mentioned in our documentation are based on this emulation.
-
Determining Keys/Functions By saving your custom key bindings when you switch emulations, when you return to the original emulation those bindings are automatically available. For example, if you have created and saved custom bindings in the CUA emulation, and then switch to Vim, switching back to CUA will make your custom bindings for CUA available again. To remove custom key bindings for an emulation, resetting to the defaults, select the Restore to default key bindings option in the Emulation settings.
-
What is a Binding? Key and Mouse Bindings Key and mouse bindings are quick ways to execute operations in SlickEdit® Core. Key bindings are the 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.
-
Managing Bindings • A menu hotkey is a key sequence that corresponds to an underlined letter on a menu name. Managing Bindings Create and manage key bindings using the Key Bindings dialog. The dialog displays a list of all SlickEdit® Core commands, including macros that you have recorded, their associated key sequences, and the language editing mode in which the key binding can be used. Documentation for the selected command, if available, is also displayed.
-
Managing Bindings 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 Changing Emulations.) The Search by command and Search by key sequence boxes are used to filter the data. See Viewing and Filtering Bindings. The Command column shows all of the SlickEdit Core commands including macros that you have recorded.
-
Managing Bindings 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 indicates ascending or descending sort order. All of the columns as well as the documentation pane can be resized by dragging the separator bars. The sections below describe different ways to use the Key Bindings dialog.
-
Managing Bindings • 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 surround_with to Ctrl+W, simply press Ctrl+W. The key sequence you pressed is displayed in the box. • For a mouse binding, click the mouse button you want to use.
-
Managing Bindings specific language editing mode, you can change it now by clicking the Advanced button on the Bind Key dialog. Click Bind to mode, then from the drop-down list, select the mode for which the binding should apply. Bindings assigned to a specific language editing mode override those assigned to default. Tip You can create multiple bindings for the same command/macro and have one binding set to default and the others set to specific modes.
-
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.
-
Cursor, Mouse, and Scroll Settings 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 . In the Key message delay spin box, enter the amount to delay before a prefix key in tenths of a second. The prefix key is not displayed if the next key is pressed before the delay specified in this text box.
-
Setting the Cursor Style Cursor, Mouse, and Scroll Settings This section describes settings for the cursor, mouse, and scroll style. For cursor navigation information, see 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 General setting.
-
Fonts 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. For information about changing the colors of code, such as colors used for keywords, see Color Coding. Fonts SlickEdit® Core provides the capability to change the fonts used by edit windows, the command line, status text, and other screen elements.
-
Fonts For descriptions of the options on this dialog, see Font Configuration Dialog. Recommended Fonts for Elements Font recommendations are given for the best screen display. The information below contains recommended fonts for some of the screen elements. Note Some font names are portable font names which are translated into other fonts. This allows SlickC® macros and dialog boxes to be portable across Windows and UNIX.
-
Colors font element: Table 4.1. Command Line Font Recommendations Platform Font Recommendation Windows Choose Courier, Courier New, OEM Fixed Font, or Terminal fonts for the most visually appealing character displays. Linux Choose Courier, Lucida Sans Typewriter or a console font for the most visually appealing character displays. If these fonts are not visible, look for the UNIX fonts below.
-
Setting Colors for Screen Elements ent screen elements in SlickEdit® Core. This includes syntactic elements in the editor window, like 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, modified line coloring, and language-specific coloring.
-
Setting Colors for Screen Elements is displayed, allowing you to pick a color from the palette, or set your own custom color using RGB values. 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.
-
Restoring Settings on Startup
...
-
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 → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the General Tab .
-
60
-
Chapter 5.
-
Tag-Driven Navigation Context Tagging ® Overview 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.
-
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 documentation for Java APIs, you must install the source files as part of the JDK. If clicking on a URL, the default HTML browser starts. Clicking on other hypertext links navigates within the comment window.
-
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 expressions for the current argument is displayed.
-
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 partially-typed text. Press Ctrl+Space to complete (type the rest of) the current symbol.
-
Statement Level Tagging • Find Symbol - This view is used to locate symbols (tags) in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match. A quicker way to access this view is to use the Search → Find Symbol menu item. • Preview - Preview provides a portal for viewing information in other files without having to open them in the editor. It automatically shows this information when you are working with certain features.
-
Building Tag Files Building and Managing Tag Files Context Tagging ® creates tag files to store information about symbols and, optionally, cross-reference information from your source code. Many of the most powerful SlickEdit® Core features use this information to speed your coding. Building Tag Files Tag files are automatically created and maintained for files in the workspace (see Creating Tag Files for Run-Time Libraries).
-
Building Tag Files 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 dialog box opens showing the progress as the tag file is built. For source files other than these languages, use the Add Tag File dialog, which allows you to choose from a list of languages the source type for which to insert the tag file.
-
Building Tag Files Generate References creates an inverted file index so that you can quickly find which files contain 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.
-
Managing Tag Files See Managing Tag Files for more information. Tagging Run-Time Libraries Create extension-specific tag files for include files of compiler packages or utility libraries or both. This allows the Context Tagging ® feature set to work for all symbols, not just those symbols in the project. Context Tagging needs all symbol information to work properly.
-
Managing Tag Files The left pane of the dialog lists all of your tag files, separated into categories (see Tag File Categories below). A tag file having a File bitmap with blue arrows indicates the tag file is built with support for crossreferencing. 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 Context Tagging - Tag Files Dialog.
-
Managing Tag Files • Other Extension-Specific Tag Categories - The tag files listed under each of the other language-specific categories apply to that language only. Use these categories to add tag files for third-party libraries. 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.
-
Context Tagging ® Options The following settings are available: • Retag modified files only - If checked, SlickEdit® Core will incrementally rebuild the tag file, only retagging 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. • Generate References - If checked, the tag file will be built with support for cross-referencing.
-
Context Tagging ® Options tions setting. See Context Tagging Options Dialog for descriptions of the options. Tip 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting). See Virtual Memory Tab for more information.
-
Chapter 6.
-
Code Navigation Navigation There are two types of navigation in SlickEdit® Core: Code Navigation, which provides in-depth symbol navigation and structure matching, and Cursor Navigation, which pertains to more simple movements within text and files. Code Navigation Some of the most powerful features in SlickEdit® Core are its code navigation methods, particularly Symbol Navigation. These features allow you to navigate your code the way you think about it, rather than just as a set of files.
-
Code Navigation Tagging Tab . When the cursor is in the prototype, pressing Ctrl+Dot will navigate to the function and vice versa. If you do not set one of these options, you will be prompted with the Select a Tag Dialog the first time you navigate from a symbol to its definition. • Auto-close visited files - SlickEdit Core can automatically close a visited file, one that was opened through symbol navigation but not edited.
-
Code Navigation 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 → Go to Matching Parenthesis). The find_matching_paren command supports matching parenthesis pairs { }, [ ] and ( ). Tip For Python, SlickEdit® Core supports the matching of the colon (:) token and the end of context. See Begin/End Structure Matching for Python for more information.
-
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 General setting. On the General Options dialog, select the More Tab , then select one of the Paren match style options. The Highlight style option temporarily block-selects the text within the parenthesis pair.
-
Cursor Navigation 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. • next_proc/prev_proc - Places the cursor on the next/previous function heading.
-
Symbol Browsing goto_line . 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. When the Seek dialog appears, enter the position to seek for. You may specify a C syntax expression.
-
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 ®, so symbols are updated immediately or in the background as you edit.
-
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).
-
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. Hover the mouse over the bitmap of any item in the hierarchy or members panes to see a tooltip that shows the symbol’s signature and scope.
-
Class View 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. The following options are available: • C++ Refactoring - Displays a menu of C/C++ refactoring options. See C++ Refactoring for more information.
-
Outline View • Show in Symbol Browser - Jumps to the member in the symbol browser. See Symbols View for more information. • Increase/Decrease Listed Members Limit - Controls the number of members displayed in the members pane. When this option is selected, the command line will prompt you for a variable value. The default is 400. • Sort Classes By Hierarchy and Sort Classes By Name - These options toggle the display of classes sorted either by hierarchy or alphabetically by name.
-
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. Press Ctrl+Comma to go back. Outline View Options Right-click on any symbol in the Outline view to access the following options: • C++ Refactoring - Displays a menu of C/C++ refactoring options.
-
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. • Auto Expand - Automatically expands all levels within the current file. If this option is deselected, you will need to click to expand items manually. • Expand All - Expands all symbols or levels in the current file.
-
Preview View provides this same capability, it cannot match the speed of Find Symbol. See 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. The Preview view does not have a search capability, so you should use the new Find Symbol View to search for symbols. This provides you with more power and more control over your symbol searching.
-
Preview View 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. You can do a few things with the symbol list: • Hover the mouse over the bitmap of any item to see a tooltip that shows the symbol’s signature and scope.
-
References View Table 6.1. Preview View Information Editor Element in Use Preview View Display Any source file open in the editor The Preview view shows the definition or declaration of the symbol under the cursor, along with the symbol’s documentation comments, if any exist. The Outline, Symbols, Class, and Find Symbol views Single-click on a symbol and the Preview view displays the selected symbol and its documentation comments, if any exist.
-
References View 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. For this reason, references are not generated automatically for run-time library tag files.
-
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. The text file will then be displayed in the editor.
-
Symbols View The top part of the view window contains an option and combo boxes that are used for filtering. The bottom 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.
-
Symbols View • 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.
-
Symbols View • 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. See Viewing Base and Derived Classes for more information. Note that the Class View provides this same functionality.
-
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. Double-clicking will then go to the prototype’s corresponding code section.
-
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.
-
Symbols View Each option has three states: If the option is selected, only the specified items will be displayed. If the option 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. The following options are available: • Class Members • Public - When selected, public members are displayed. • Protected - When selected, protected members are displayed. • Private - When selected, private members are displayed.
-
Symbols View • 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. • Declarations • Template - (C++ only) When selected, only template classes are displayed. When unselected, only non-template classes are displayed.
-
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 methods are displayed. • Static (class data) - When selected, only static data members are displayed. When unselected, only non-static data members are displayed.
-
Code Templates 102
-
Instantiating a Template 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. Some parameters are replaced with calculated or pre-defined values, like date or author.
-
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 template. For a class template, the name will likely be the class name or a part of the class name. In the sample template, $safeitemname$ is a form of this name that strips out any spaces, making it safe to use as part of an identifier.
-
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. Add the template files to the newly-defined template. Create the Template Source Files This is the same process as writing any source file.
-
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. There are different operations based on whether you want to create a new category or not. You will be prompted for the name of the new template. Fill in a name and click OK.
-
Substitution Parameters default delimiter $ is used: Table 6.2. Predefined Substitution Parameters Parameter Name Description $itemname$ Name of item entered, as on the Add New Item dialog. $fileinputname$ Name of item entered, as on the Add New Item dialog, without file extension. $safeitemname$ Name of item entered, as on the Add New Item dialog, with all unsafe characters replaced with safe characters.
-
Organizing Templates Parameter Name Description $safeprojectname$ Current project name (no path, no extension), with all unsafe characters replaced with safe characters. For example, if the project name was: My Project.vpj, then $safeprojectname$ would evaluate to My_Project for a C++ source code file. $workspacename$ Current workspace name (no path, no extension). $safeworkspacename$ Current workspace name (no path, no extension), with all unsafe characters replaced with safe characters.
-
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: /templates/ItemTemplates/Java/Dialogs/ 2. Place all templates for the category under this directory. 3. Create a new project or open an existing one. 4. From the main menu click File → New Item from SlickEdit Template. 5.
-
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. • Template file - File name of the currently selected template.
-
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 Template Manager dialog by clicking the Options button. Global Substitution Parameters The Global substitution parameters area on the Template Options dialog lists the substitution parameters that are common to all templates.
-
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 Parameters. The Add Parameter dialog contains the following: • Name - This is the name of the substitution parameter WITHOUT delimiters.
-
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. Locating Templates Installed Templates Templates that are installed with the product are located at: /eclipse/plugins/com.slickedit.
-
Manually Creating a Template 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 parameter. For more information on substitution parameters, see Substitution Parameters. 3. Create an XML file and give it an extension of .
-
Manually Creating a Template 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: • A .h file that contains the class definition. • A .cpp file that contains the class implementation.
-
Code Template Metadata File Reference MyClass.cpp MyClass.h 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.
-
Code Template Metadata File Reference Elements DefaultName DefaultName is an optional child element of TemplateDetails. Specifies the default item name when using 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. • Attributes - None. • Child elements - None. • Parent elements - TemplateDetails. • Value - Text value is required.
-
Code Template Metadata File Reference • Child elements - None. • Parent elements - TemplateDetails. • Value - Text value is required. The text value specifies the description of the template item. The description 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
Code Template Metadata File Reference 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). My C++ Class My complete C++ class header and implementation MyClass.
-
Code Template Metadata File Reference My complete C++ class header and implementation MyClass.cpp MyClass.cpp MyClass.h Name Name is a required child element of TemplateDetails. Specifies the name for the template item. See the example below. • Attributes - None.
-
Code Template Metadata File Reference 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 Predefined Substitution Parameters. See the example below. • Attributes: • Name - Parameter name. This is the name of the substitution parameter WITHOUT delimiters.
-
Code Template Metadata File Reference 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 Predefined Substitution Parameters. See the example below. • Attributes - None. • Child elements - Parameter. • Parent elements - TemplateContent. • Value - N/A. Example The following example illustrates the metadata for an item template for a custom Java class. When MyClass.
-
Code Template Metadata File Reference • 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. PAGE 146
Code Template Metadata File Reference Example The following example illustrates the metadata for an item template for a custom Java class. My Java Class My custom Java class MyClass.
-
Text Editing MyClass.java 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. • Parent elements - SETemplate. • Value - N/A.
-
Selections Text Editing SlickEdit® Core provides familiar operations for selecting, copying, moving, and operating on text, with enhanced 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.
-
Selections 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 select_block command (Ctrl+B or Edit → Select → Block). Then, move the cursor to the end of the block to be selected by using the arrow keys (or by using the mouse). • Mouse method - Right-click and drag the text to be selected.
-
Selections 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 usually the best way to edit lines of code, and they also work with SmartPaste®, which reindents pasted lines according to the surrounding code (see SmartPaste).
-
Selections Key or Key Sequence Function Shift+Up Start or extend selection up one line. Shift+Down Start or extend selection down one line. Shift+PgUp Start or extend selection up one page. Shift+PgDn Start or extend selection down one page. Ctrl+Shift+Home Start or extend selection to top of buffer. Ctrl+Shift+End Start or extend selection to bottom of buffer. Ctrl+X Cut selected text. Ctrl+C Copy selected text to clipboard. Ctrl+V Paste clipboard. Ctrl+Shift+V List clipboards.
-
Selections Command Key Sequence or Menu Item 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 General setting. On the General Options dialog, select the More Tab . mou_move_to_cursor Ctrl+R Moves the selected text to the cursor. mou_copy_to_cursor Ctrl+Shift+R Copies the selected text to the cursor. mou_click L Left click Drags and moves the selected text.
-
Selections Command Key Sequence or Menu Item Description log, click the More Tab , then set the Line insert style to Before. fill_selection, gui_fill_selection Edit → Fill Fills the selected text with a character. indent_selection Tab Indents the selected text by the indent for each level or by one tab stop. Indenting will be with tab or space characters depending upon whether the Indent with tabs check box is on.
-
Selections Command Key Sequence or Menu Item Description lected area. Line selections are word-wrapped with current margin settings. Block selections are word-wrapped within the columns of the block. Character selection is not supported. execute_selection Alt+= Executes each line or sub-line of the selected text as if entered on the command line. put , gui_write_selection None Writes the selected text to file name. Use File → Insert a File to insert a file.
-
Selections Adding Numbers to a Selection: Enumeration You can automatically add incrementing numbers to a selection of code by using the enumerate command. To configure enumeration properties, from the main menu click Edit → Other → Enumerate. For a list of the options that are available on the Enumerate dialog, see Enumerate Dialog. Counting Selected Lines and Characters SlickEdit® Core automatically counts the number of lines and characters in a selection.
-
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 remains 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. On the General Options dialog, select the Selections Tab .
-
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 → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the General Tab ).
-
Sorting Text dent levels, or decimal points shown. To set these options, from the main menu, click Window → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. On the General Options dialog, select the General Tab . Select one of the Current line highlight options. Click on the color boxes to change the box color or the column marker color.
-
Sorting Text 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. • Sort on selection - When this option is selected, each line intersecting with the selection is sorted based on the selected column. Sort on selection and Sort within selection have the same effect except when sorting a block or column selection.
-
Inserting Literal Characters To use the command line for sorting, first activate the command line by pressing Esc. Sort command syntax 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 selections only. • sort_on_selection - To sort on a column field, press Ctrl+B to select an area of text, then invoke the command sort_on_selection.
-
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.
-
Color Coding Configuration 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the Color Coding setting. The Color Coding Setup dialog box is displayed. 2. Select the Tokens Tab , then click New. The Enter New Keywords dialog box is displayed. 3. Enter the new lexer name. Usually this is a language name such as C or Java.
-
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 Creating Color Coding for a New Language). Click Colors at the bottom of the dialog to display the Color Settings dialog, which allows you to specify the color for color coding elements and other editor elements (see Setting Colors for Screen Elements).
-
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 the File Extension Setup setting. On the Extension Options dialog, select the extension you wish to work with from the Extension drop-down list, then select the Advanced Tab .
-
Syntax Indent Syntax Indent and SmartPaste® Syntax Indent and SmartPaste are two of the many SlickEdit® features designed to decrease typing, improving 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.
-
SmartPaste® Note • When you change the tab stops and indent for all languages except COBOL, change the Tabs text box to + 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. • For COBOL files, the Tabs text box also affects the Tab key.
-
Completions Note SmartPaste only works with line selections. For information about creating a line selection, see Line Selections.
-
Auto-Complete Completions Completions save keystrokes as you are typing code by providing a way to automatically complete partially-typed text. There are several types of completions in SlickEdit® Core: • Auto-Complete - A feature set that includes syntax, keyword, and symbol completions. • Word Completion - Completions that work for any text in an editor window. • Command Line Completions - Completions for command line entries.
-
Auto-Complete These visual hints can also be individually turned on or off through the Auto-Complete options. See AutoComplete Tab . Tip 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 Window → Preferences, expand SlickEdit and click General in the tree, then double-click the Key Bindings setting). For more information, see Creating Bindings.
-
Word Completion Auto-Complete options can be configured for each file extension type. This allows you to activate and deactivate particular features on a per-language basis. To change Auto-Complete options, see AutoComplete Tab . Word Completion Word Completions search the current editor window for text matching the prefix at the current cursor position. Most completions are driven by Context Tagging ®, matching symbols such as function names and variables.
-
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 .
-
Directory 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® Core: • Directory Aliases - Directory aliases are short identifiers for long directory names. They save you from having to type long path names when you are prompted for a file name or directory.
-
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. Make sure your new identifier is selected, then in the large text box to the right, enter the alias value by typing in the directory path that you want the identifier substituted with. 6. Click OK.
-
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\.
-
Extension-Specific Aliases 1. From the main menu, click Window → Preferences, expand SlickEdit and click General in the tree, 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. Note the Alias file name. If you wish to store the aliases in another file, type a new file name with the .als extension here. 5. Click Aliases.
-
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 alias and its value. To create a new alias, complete the following steps: 1. Click New, then type the characters you wish to use for an identifier in the Alias Name text box. 2. Click OK.
-
Extension-Specific Aliases • You can use special escape sequences in your aliases, which will be substituted upon expansion with certain values. See Alias Escape Sequences for more information. • You can also specify parameters in alias values. When the alias is expanded, you are prompted with a dialog to input the values. See Parameter Prompting for more information. 4. Click OK. Alias Escape Sequences Alias escape sequences can be used in alias values.
-
Extension-Specific Aliases Escape Sequence Description %\x-Increment Decrement column by ddd. %\s Preserves trailing spaces - place at the end of a line. %\l Preserves leading spaces - place at the beginning of the first alias line. %(ParameterName) Parameter replacement. See Parameter Prompting. %\m MacroName ArgumentList% Calls the specified Slick-C® macro with a specified optional argument. %EnvironmentVariable% Inserts the value of the environment variable specified.
-
Extension-Specific Aliases Alias Name and Description wm - A WinMain function template with indenting and a cursor position. Value int APIENTRY WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { %\i%\c } 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.
-
Syntax Expansion 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. Click OK when you are finished. Example: Instantiating a Variable in Java with Parameter Prompting In Java, instantiating variables can be a repetitive task.
-
Syntax Expansion Settings Syntax Expansion Syntax Expansion is a feature designed to minimize keystrokes, increasing your code editing efficiency. When you type certain keywords and then press the spacebar, Syntax Expansion inserts a default template that is specifically designed for this statement.
-
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. Tip SlickEdit® Core can display Syntax Expansion choices for the word prefix under the cursor. To turn this option on/off, select the Auto-Complete Tab on the Extension Options dialog, and select/ deselect the Syntax expansion option.
-
Dynamic Surround and Surround With To add syntax expansion and indenting for other languages, complete the following steps: 1. Use the prg.e macro as a template. This file is located in the macros subdirectory of your installation directory. Make a copy of it and give it another name. 2. Change the #define constants EXTENSION and MODE_NAME near the top of the file to reflect the new extension and mode name respectively. Do not use any spaces in these constants. 3.
-
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. Unsurround is also available to remove outer code block structures from statements.
-
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 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 The finished code is shown as follows: Figure 6.24.
-
Surround With Statements that are pulled into the block are indented according to your settings on the Indent Tab of the Extension Options dialog (Window → Preferences, expand SlickEdit and click General in the tree, then 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the Color setting).
-
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.
-
Surround With 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. Modify the template to suit your needs. For a list of escape sequences and template examples, see Alias Escape Sequences. For more information about using the Alias Editor, see Creating an ExtensionSpecific Alias. 3.
-
Surround With • 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 Creating Bindings for more information. • sur_text - This is a Slick-C® function that can only be used inside of a Surround With template. It is used to indicate where the selected text should be placed and can be used multiple times within a single Surround With template.
-
Unsurround will be used. In the case of surround_with_if, "if" matches the beginning of both the if and if...else templates, but the if template is used because it is an exact match. After you create your wrapper command, you can bind it a key or invoke it from the command line. For more information on working with commands, see the Slick-C® Macro Programming Guide. Unsurround Unsurround is a feature that lets you remove the surrounding text from a code block.
-
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 delete_line operations are invoked. Selecting this option will prevent the dialog from appearing when these operations are used. To see the dialog again, use the cut_code_block command.
-
Named 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 temporary, named bookmark on the current line. • Pushed Bookmarks - Used to set temporary "breadcrumbs" as you explore the code.
-
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. There are two commands that can be used: alt_bookmark, for setting a bookmark, and alt_gtbookmark, for navigating to the bookmark.
-
Setting Bookmark Options 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 Bookmarks view. Pushing a Bookmark To push a bookmark for the current line, click Search → Push Bookmark or use the push_bookmark command.
-
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. SlickEdit® Core can push a bookmark whenever you jump to the top or bottom of the buffer (Ctrl+Home/Ctrl+End, or top_of_buffer/bottom_of_buffer commands, respectively).
-
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 displays a list of breakpoints and lets you easily add, remove, and activate them. To display the Breakpoints view, click Window → Show View → Other, expand Debug and double-click Breakpoints.
-
Commenting Blocks and Lines 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. SlickEdit Core also makes your comments easier to read by automatically wrapping them as you type. Existing comments can be "reflowed" to match current comment wrap settings.
-
Creating Doc Comments right sides of a line comment. For code examples and descriptions of the other available options, see Comments Tab . 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 programming language and the tool processing the comments. SlickEdit® Core supports the most common doc comment formats (Javadoc, XMLdoc, and Doxygen).
-
Creating Doc Comments Javadoc Format To use the Javadoc commenting format, select the start characters /** and use style @param. Check Insert 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 * @param height * * @return int */ int setDimensions(int length, int width, int height) { ...
-
String Editing Doxygen Format To use a Doxygen comment format, select the start characters /*! or //! (based on your preference) and the \param style. 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 * \param height * * \return int */ int setDimensions(int length, int width, int height) { ...
-
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 .
-
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. • If you are more comfortable with keystrokes, you may prefer command line searching with Find and Replace Commands. • Use the Find and Replace View if you prefer working within an interface.
-
Incremental Searching 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 Function Ctrl+R Search in reverse for the next occurrence of the search string. Ctrl+S Search forward for the next occurrence of the search string.
-
Find and Replace Commands Keys Function Ctrl+Shift+W (GNU Emacs emulation) Toggle word searching on and off. 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.
-
Find and Replace Commands Option Description R Interpret search string as a SlickEdit® regular expression. U Interpret search string as UNIX regular expression. B Interpret string as a Brief regular expression. N Do not interpret search string as a regular expression. P Wrap to beginning/end when string not found. W Limit search to words. Used to search for variables. W=SlickEdit-regular-expression Specifies the valid characters in a word. The default value is [A-Za-z0-9_$].
-
Find and Replace Commands Option Description character of a DBCS sequence unless this option is specified. , (Comma) Delimiter to separate ambiguous options. XCCLetters Requires the first character of search string NOT be one of the color coding elements specified. For example, XCS requires that the first character not be in a comment or string.
-
Find and Replace Commands Option Description * Used with the “Search hidden text” (H) or “Highlight matches” (#) options to find all matches and un-hide or highlight them. & Use Wildcard regular expression syntax (*, ?). # Highlight matched patterns with highlight color. V (Replace commands only) Preserve case. When specified, each occurrence found is checked for all lowercase, all uppercase, first word capitalized, or mixed case.
-
Find and Replace Commands Key Action Y or Space Make change and continue searching. N or Backspace No change and continue searching. L or Dot Make change and stop searching. G or ! Make change and change the rest without prompting. Q or Esc Exit command. By default, the cursor is NOT restored to its original position.
-
Find and Replace View Key Action Replace Command Search Examples The table below provides examples of using command line replace. Table 6.12. Replace Command Search Examples Example Description c $/$\$ Replace occurrences of forward slashes with back slashes. c/x/y/m Replace occurrences of "x" in the selected area with "y" using default search case sensitivity. c $x$y$m Replace occurrences of "x" in the selected area with "y" using default search case sensitivity.
-
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 multiple files. Figure 6.28. Find and Replace View Saving Search and Replace Values When the Find and Replace view is invoked, the options that were used for your last search are displayed, providing a way to repeat the last search.
-
Find and Replace View 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. Click the Color button on the Find tab of the Find and Replace view to specify the syntactic elements for filtering.
-
Find Symbol View the only open search view windows. You can open and close search results view windows by rightclicking 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 information. Find Symbol View The Find Symbol view (Search → Find Symbol) is used to locate symbols in your code. It allows you to search for symbols by name using either a regular expression, substring, or fast prefix match.
-
Find and Replace with Regular Expressions Characters have special meaning during search and replace operations. • UNIX regular expressions - When regular expressions are turned on for a search and replace command, 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. See UNIX Regular Expressions for a list of backslash (\) options.
-
Find and Replace with Regular Expressions Example Description Replace with: \d12 SlickEdit regular expression: Search for: ^a+$ Replace with: \12 Brief regular expression: Search for:
-
Find and Replace with Regular Expressions Example Description UNIX regular expression: Search for: (if|while) Replace with: x\1y\2 Replace occurrences of "if" and "while" with "xify" and "xwhiley." Unmatched groups are null. Note: The UNIX syntax \2 (SlickEdit syntax #1, Brief syntax \1) is replaced with null. 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: ^(.*?),(.
-
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 instead of the maximal matching operator (UNIX +, SlickEdit syntax #, Brief syntax \:@), the above search and replace would prefix each digit in the file with a "$" character, which is probably not what you want.
-
Code Beautifiers Beautifying Code Code Beautifiers Code beautifiers, available for many languages, reformat the layout of existing text based on settings that you specify, such as begin/end styles and indenting. To beautify selected lines of code, or to beautify the entire buffer, from the main menu, click Format → Beautify (or use the gui_beautify command). A dialog box is displayed with functions specific to the type of project that is active.
-
Quick Refactoring Refactoring Refactoring is a precise code editing feature that you can use to clean up and improve the understandability of your source code. Refactoring allows you to make disciplined, system-wide changes to code without affecting the external behavior. There are two types of refactoring available within SlickEdit® Core: C++ Refactoring and Quick Refactoring. C++ Refactoring supports the C++ language only, while Quick Refactoring supports C++, C#, Java, and Slick-C®.
-
Quick Refactoring Quick Extract Method After selecting a set of lines, Quick Extract Method creates a new method with the selected lines as the body. It discovers any undeclared variables and creates them as parameters to the new method. The extracted method is created in the same scope as the original method. Quick Extract Method is only available for C++, C#, Java, and Slick-C®. Figure 6.30.
-
C++ Refactoring Quick Modify Parameter List This refactoring allows you to add, delete, and re-order parameters for a selected function. The refactoring will modify the parameter list for the selected function and all of its counterparts within the class hierarchy. 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.
-
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: • The symbol under the cursor (or any symbol selected in the Symbols or Outline views). • All of the symbol overloads.
-
C++ Refactoring The Method name text box allows you to choose the name of the newly extracted method. Uncheck Replace 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.
-
C++ Refactoring Push Down to Derived Class Moves class members to a class that inherits from the selected class. Figure 6.34.
-
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. Moving this will break the code. Constructors and destructors cannot be moved. Members can only be moved one level at a time. Figure 6.35.
-
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 Class members are pulled up one level at a time. Constructors and destructors cannot be moved. Any dependencies 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. This occurs, for example, when a function being moved uses a static global variable that is defined in the original class' .cpp file when the definitions are moved to a different .cpp file. Figure 6.37.
-
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 Extract Class Breaks a large class into a better abstraction by moving some responsibilities into a new class or interface. This refactoring creates new files. When using the Extract Class refactoring, keep in mind the following information: • The default path uses the same directory as the original class. • The default file names are the .(cpp/h). • Default paths and file names can be changed. • The files will be added to the current project.
-
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 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.
-
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 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. Figure 6.45.
-
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. Figure 6.46. C++ Refactoring: Convert Local to Field Replace Literal with Constant Replaces the selected literal with a constant, replacing use of the literal with the new constant. Figure 6.47.
-
C++ Refactoring Create Standard Methods Creates an assignment operator, copy constructor, default constructor, and destructor for the selected class. Figure 6.48.
-
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 refactoring setup before proceeding to avoid errors.
-
C++ Refactoring Figure 6.49.
-
C++ Refactoring The following example shows a warning that is not severe enough to prevent parsing of the file. Figure 6.50.
-
C++ Refactoring Finally, the following example shows a test resulting in no errors or warnings.
-
Reviewing Refactoring Changes Figure 6.51.
-
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). • The right pane shows the refactored file(s). For convenience, this pane can be edited.
-
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. Click Cancel to discard changes and have all files remain the way they were before the refactoring process.
-
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 Development User Guide → Reference → Refactoring).
-
Hexadecimal View and Edit Mode 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 → Hex or Display → Line Hex (or use 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.
-
Selective Display To define which characters to display, from the main menu click Window → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting and select the Special Characters tab. See Defining Special Characters below. Note Viewing special characters is only available for ASCII files.
-
Selective Display hide. This dialog is displayed by clicking Display → Selective Display, or by using the selective_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 definitions expanded and the rest collapsed. Figure 6.53.
-
Selective Display 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 with Selective Display bitmaps.
-
Other Display Options The Selective Display dialog also contains static options for expanding/collapsing sub-levels. See Selective 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.
-
228
-
Chapter 7.
-
Language Editing Modes 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 Language Editing Modes and Extension Options below for more information.
-
Extension Options Extension Options The behavior of the editor can be customized for files based on specific language extensions. The Extension 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 General in the tree, then double-click the File Extension Setup setting. Alternatively, display the dialog by using the setupext command. Figure 7.1.
-
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. Creating a New Extension If SlickEdit® Core does not provide options for a language extension that you are working with, you can add the extension.
-
C/C++ Formatting Options C and C++ This section describes some of the advanced features and options that are available in SlickEdit® Core 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.
-
C/C++ Formatting Options 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. • Insert blank line between braces - Specifies whether a blank line should be inserted between braces when a template expands with braces.
-
C/C++ Formatting Options The following options are available: • Indent first level of code - Specifies whether smart indenting should indent the cursor after declarations such as functions. • Indent CASE from SWITCH - When checked, template editing places the case statement indented from the switch statement column. • Use continuation indent on function parameters - Determines whether function parameters should always use the continuation indent.
-
C/C++ Formatting Options 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 (). • Insert padding between parens - When checked, a space is placed after the open paren, and before the close paren, providing padding for the enclosed text. For example, if () becomes if ( ).
-
C/C++ Beautifier The following options are available: • Main style - Specifies the main function declaration template inserted. Select ANSI C/C++ if you want an old ANSI C main declaration inserted. You can define a template by using aliases, or you can write a replacement function for c_insert_main. The command find-proc c_insert_main will locate the macro source for this function.
-
C/C++ Beautifier • 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. Begin-End Style Tab Figure 7.6.
-
C/C++ Beautifier 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.
-
C/C++ Beautifier to the Syntax indent text box on the Indent Tab of the Extension Options dialog. • 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. This option has no effect if the original file has no tab characters.
-
C/C++ Beautifier 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; // trailing comment • Indent column 1 comments - Normally comments that start in column 1 are left alone. Select this option if you want the indent for these comments to be adjusted.
-
C/C++ Beautifier 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. Trailing comments are comments that are displayed at the end of lines that contain statements or declarations.
-
C/C++ Beautifier The following options are available: • Indent preprocessing - When this option is selected, the indent before the # character of preprocessing 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. Otherwise, preprocessing within a brace block start in column 1.
-
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 built-in functions, preset #defines, and include directories.
-
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. The header file configures the parser to emulate the compiler that is chosen in the Compiler Name field. Creating New Configurations There are two ways to begin a new configuration.
-
C/C++ Preprocessing #define #define #define #define #define #define MYNAMESPACEDECL(name) MYPACKEDMACRO MTYPELESS MYPOINTER(t) MYNULL MYENDNAMESPACE namespace name { __packed void* t* ((void*)0) } 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.
-
Java 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. Note The usercpp.
-
Java Formatting Options Java This section describes some of the features and options that are available for Java, including extensionspecific 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. 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.
-
Java Formatting Options 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. • Insert blank line between braces - Specifies whether a blank line should be inserted between braces when a template expands with braces.
-
Java Formatting Options • Use continuation indent on function parameters - Determines whether function parameters should always use the continuation indent.
-
Java Beautifier } }, thirdarg ); myLongMethodName(new ActionListener() { // special case anonymous class first argument public void actionPerformed(ActionEvent e) { createdButtonFired(buttonIndex); } }, secondarg, thirdarg ); Java Beautifier To beautify Java source code, from the main menu click Format → Beautify (or use the gui_beautify command). The Java Beautifier dialog appears, where you can specify preferences for how the code is beautified.
-
Javadoc Editor • Add blank line after parameter comment - If checked, a blank line is added if a tag follows an @param tag. • Add blank line after parameter comment group - If checked, a blank line is added if a tag follows an @param group. • Add blank line after return comment - If checked, a blank line is added if a tag follows the @return tag. • Add blank line after description - If checked, a blank line is added between the description and the first @ tag.
-
Java Refactoring Java Refactoring See Java Refactoring for information about Java refactoring in SlickEdit® Core.
-
XML XML and HTML Features for XML and HTML are described below. See also XML/HTML Formatting. XML XML features in SlickEdit® Core include Context Tagging ®, validation, well-formedness checking, a beautifier, 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.
-
XML The following settings are available: • Case for inserted tags - This option is to specify if you want your tag names to be lowercase or uppercase. For example, if you select Uppercase, then would become . Under normal circumstances, preserve the case of your XML tags, but for certain special cases (e.g. XHTML) you might want to change this setting. • Case for inserted attributes - This option is to specify if you want attributes cased inside the body of a tag.
-
XML and 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. Unknown XML tags are left "as is" and not removed. XML Beautifier To beautify XML source code, from the main menu click Format → Beautify (or use the gui_beautify command).
-
XML 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting. On the Extension Options dialog, select the Indent Tab ).
-
XML • 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. • Use original relative indent - Reindent broken tag lines using the original relative indent amount from the starting column of the tag.
-
XML • 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. plain text), bounded by the opening and closing tag, will be indented one syntax indent level. • Literal - When on, all white space and line breaks are preserved. In addition, tags within the content are treated as literal text.
-
XML
|
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.
-
XML 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
would be beautified to | . Under normal circumstances you will want to preserve the case of your XML attributes, but for certain special cases (e.g. XHTML) you may want to change this setting. • Word value case - Not available for XML. • Hex value case - Not available for XML.
-
XML 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: • Indent column 1 comments - Normally comments that start in column 1 are left alone.
-
XML 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 comments, we mean comments which appear at the end of lines which contain tags.
-
XML • 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 remote external DTD, the DTD file is downloaded and cached locally.
-
XML 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. This feature allows you to work offline or from a test location. For example, if you need to work with XML documents that contain external DTDs while offline you can map the URL to the DTD to a local file.
-
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 begin tag respectively. HTML This section describes some of the features and options that are available for HTML, including extensionspecific options, the HTML Beautifier, and more. HTML support includes Context Tagging ®, a beautifier, Color Coding, Syntax Expansion, and Syntax Indenting for HTML, JSP, and ASP.
-
HTML 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 XML/HTML Formatting for complete information. Other miscellaneous tag and attribute options are still provided through the HTML Formatting Options dialog. To access these options, click Window → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
-
HTML Languages similar to HTML have similar Formatting Options dialogs which are not specifically documented. Figure 7.24.
-
HTML 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 becomes | . • 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. For example, if you select Uppercase, then | would become | .
-
HTML • Use tags for alignment - (Not available in SlickEdit Core.) This option is used by the HTML toolbar. When this option is selected, the tag is used for aligning text. For example, rather than using a tag to designate alignment, use the following tagging: • Tag Options - Opens the XML/HTML Formatting Scheme Configuration dialog. See XML/HTML Formatting for more information.
-
HTML 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
-
HTML 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. Specify 0 to align broken tag lines with the starting column of the tag.
-
HTML • 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 indented one syntax indent level. • Literal - When on, all white space and line breaks are preserved. In addition, tags within the content are treated as literal text.
-
HTML | 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.
-
HTML 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 would be beautified to | . • Word value case - Specifies how you want word values cased after the = of an attribute inside the body of a tag. For example, if you choose UPPER, then | would be beautified to | .
-
HTML 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: • Indent column 1 comments - Normally comments that start in column 1 are left alone. Turn this on if you want the indent for these comments to be adjusted as well.
-
HTML • 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 comments, we mean comments which appear at the end of lines which contain tags.
-
XML/HTML Formatting 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 tag (assuming that the tag is a standalone tag) signals the end of the previous paragraph. This has the benefit of cleaning up unwanted (and unexpected) indenting. For example: This is a paragraph of content. start of the table below it.
-
Enabling/Disabling 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 individually for all XML and HTML files that are opened in SlickEdit®, or just for the current document.
-
Enabling/Disabling XML/HTML Formatting next to Enable XML Formatting and/or Enable HTML Formatting. To toggle Tag Layout and/or Content Wrap on or off for either file type, check or uncheck those items.
-
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 disabled. Therefore it cannot be enabled for the current document. To enable it for the current document, you would first need to enable the global setting by placing a check next to Format → XML/HTML Formatting → Enable HTML Formatting → Tag Layout.
-
Working with Schemes Default Schemes XML/HTML Formatting comes with two default schemes. Each time that you open an HTML file for editing, by default, the html (default html) scheme is used. Each time an XML file is opened, the xml (default xml) scheme is used. You can configure the settings for each default scheme or specify your own default schemes (see Specifying a Different Default Scheme).
-
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. To specify the scheme for the current document, click Format → XML/HTML Formatting → Current Document Options, and pick the scheme to use from the drop-down list. The scheme you choose is remembered the next time that the document is opened.
-
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. To delete a selected scheme, right-click and choose Delete Scheme.
-
Formatting Settings formatted in your code. The following are examples: Sample text of a tag set to (block) style. Sample text of a tag set to (semi-block) style. Notice how wrapping occurs within this tag. 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. Click OK and the new tag is now listed in the Tags column. Note Tag names cannot have spaces.
-
Formatting Settings 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® Core whether or not the specified tag is intended to be closed with an end tag. This information is used for SlickEdit Core to know when to start or stop calculating information based on the tag. For example, the tag in HTML has a start and end tag, while the tag does not have an end tag.
-
Formatting Settings 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 specified in the Tag content width group box. See Tag Content Width Settings below for details.
-
Formatting Settings • 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 , where the content needs to be rendered exactly as it appears in the code. Note • When Treat as content is selected, the wrapping options in the Tag content width group box, as well as options on the Tag Layout tab, are unavailable.
-
Formatting Settings 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® Core preserves the width of the existing 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, Automatic, or Fixed right) will be used instead.
-
Formatting Settings | Example of both settings unchecked: | Example of start checked and end unchecked: | Note Dynamic Surround is triggered when you type a tag that has both options Start and End tag on separate line checked.
-
Ada 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. See XML Formatting Options and HTML Formatting Options for more information on these dialogs.
-
Ada Formatting Options Ada This section describes some of the features and options that are available for Ada, including extension-specific 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 doubleclick the File Extension Setup setting.
-
Ada Beautifier 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 defaults to the Tabs text box on the Indent Tab of the Extension Options dialog box (Window → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting).
-
Ada Beautifier 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" would be beautified to "PROCEDURE".
-
Ada Beautifier tions) have their colons vertically aligned. For example, before beautify: procedure foo ( A_Var : Boolean ; Another_Var : Boolean) ; After beautify: procedure foo ( A_Var : Boolean ; 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.
-
Ada Beautifier • Nested paren list item - A parenthesized item that is itself enclosed in a larger parenthesized list.
-
Ada Beautifier 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. • Force type declaration comments to next line - When selected, trailing comments appearing at the end of a TYPE declaration line are forced onto the next line.
-
COBOL 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. This amount is in addition to the current indent level, and in addition to the Additional indent for logical operator setting.
-
COBOL Formatting Options 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
-
Pascal 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. • Embedded SQL Dialect - Specifies the specific type of SQL that is embedded in your COBOL source. This affects embedded SQL-language color coding.
-
Pascal Formatting Options 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting.
-
PL/I 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. • Begin/End comments - Specifies whether a comment is appended after the end keyword to indicate the type of loop or case it terminates. In addition the begin and end for procedures and functions are commented.
-
PL/I Formatting Options 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 template editing. 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.
-
Python 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. • Insert blank line between DO/END - Indicates whether syntax expansion should insert a blank line when a DO/END block is inserted.
-
Begin/End Structure Matching for 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 → Go to Matching Parenthesis).
-
306
-
Chapter 8.
-
DIFFzilla® Comparing and Merging SlickEdit® Core provides two powerful ways to compare and merge files: DIFFzilla and 3-Way Merge. 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. As edits are made, the diff view is updated as you type, so you don't have to re-run the comparison.
-
DIFFzilla® Comparing Two Files To diff two source files, complete the following steps: 1. From the main menu click Tools → File Difference, or use the diff command. The DIFFzilla® dialog 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. If the file names only differ by path, you only need to specify the path for Path 2.
-
DIFFzilla® file. Note You can only use the interactive dialog output style when diffing a selected range of lines. Therefore, 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.
-
DIFFzilla® 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. Comparing Two Directories You can differences two source trees to determine what files have been added or removed and generate a list of file names.
-
DIFFzilla® 6. Click Save. The Save Multi-File Output dialog box opens. Figure 8.3.
-
DIFFzilla® 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. 9. Zip the files if you want. Automatic Directory Mapping The DIFFzilla® dialog box automatically updates the Path 2 text box with a directory, based on file paths that you previously typed in this field.
-
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® dialog for diffs (see Using the DIFFzilla Dialog). For more information about this working with Backup History, see File History and Backups. 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.
-
3-Way Merge 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. In the Output file Filename text box, enter the name of the output file, or click the Ellipses button to select from an existing file. 5. Select any Merge style or Output style that you want. 6. Click OK.
-
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.
-
Compare Two Backup History Elements Using DIFFzilla 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 → Show View → Other, expand Team and click History). You can, however, use DIFFzilla ® to compare and merge with the History view, instead of using the default Eclipse compare tool.
-
Working with FTP 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 operations can be accessed from the FTP view window or by right-clicking on FTP files after a connection is active. FTP View The FTP view can be used to connect to FTP servers and open files.
-
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. See 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. Click the FTP button to start a new session. 2. The FTP Profile Manager dialog box appears.
-
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. 6. To stop the current operation, click the Stoplight button . Stopping a Connection To stop a connection, use the FTP view and complete the following steps: 1.
-
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. Using the Regex Evaluator Type some samples of the text you are trying to match in the top portion of the view window labeled Test Cases.
-
Using the Calculator and Math Commands 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 details. 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. Entering a Regular Expression Enter the regular expression to test in the text field.
-
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. Almost all the editing keys including undo, next word, and previous word are supported. The calculator uses a slightly enhanced C expression syntax.
-
Math Commands To add hex FF with octal 77 with binary 111 with decimal 99, complete the following steps: 1. Click Hex then type or click FF. 2. Click +. 3. Click Octal, and type or click 77. 4. Click +. 5. Click Bin, and type or click 111 . 6. Click +. 7. Click Dec, and type or click 99. 8. Select the output base by clicking one of the base buttons and type or click = to compute the result.
-
Math Commands Operator Description ^ xor +, blank(s), - addition, implied addition, subtraction *, /, % multiplication, division, remainder ** power 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. Math Command Examples Example Description math 2.5*2 Multiplies 2.
-
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. Prime Numbers Prime numbers are often useful for sizing hash tables.
-
OS File Browser OS File Browser SlickEdit® Core provides a way to display the operating system’s (OS) file manager/browser. For example, 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).
-
328
-
Chapter 9.
-
Recorded Macro Operations Recorded Macros There are two types of macros in SlickEdit® Core: macros that you record, described below, and macros that are available for programming (see Programmable Macros). You can automate repetitive tasks by recording a series of SlickEdit Core operations in a macro. After you create a macro, you can run it, save it, bind it to a key sequence, and/or modify the macro’s source code. Recording a macro generates Slick-C® code for performing the action being recorded.
-
Recorded Macro Operations 1. From the main menu, click Macro → Record Macro (or use one of the toggle methods to start recording, as described under Recorded Macro Operations above). 2. Enter the keystrokes that you want to record. For example, to record a macro of the cursor moving three spaces to the right, press the right arrow key three times. You can also change a configuration option, view settings, or expand a code template during macro recording. 3.
-
Recorded Macro Operations the execute_last_macro_key command (see Binding Macros Using execute_last_macro_key). Binding Macros Using the Key Bindings Dialog After recording a new macro, the List Macros Dialog is automatically displayed. You can access the List Macros dialog any time from the main menu by clicking Macro → List Macros, or by using the list_macros command. Click Bind to Key to open the Key Bindings dialog, showing a listing of only your recorded macros.
-
Recorded Macro Operations Creating bindings for recorded macros works the same as creating bindings for SlickEdit Core commands. Click Add to initiate the binding, then specify the key sequence or mouse event to use. See Managing 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.
-
Recorded Macro Operations Note The prefix key sequence Ctrl+Shift+F12 works in all emulations except SlickEdit text mode edition. In that emulation, the prefix key sequence is Ctrl+Shift+T. Each macro that you record and bind using this feature is saved to a new file named lastmac.e, located in your configuration directory, where matches the key you used when creating the binding (keys 0-9, A-Z, or F1-F12).
-
Using Macros to Discover and Control Options your configuration directory. To edit a macro bound using this method, open the .e file for the macro you want to edit, make and save the changes, then from the main menu, click Macro → Load Module (F12 or gui_load command). Find and select the .e file you just edited and click Open. The message Module(s) loaded appears on the message line, and SlickEdit Core will now honor the changes you made to the .e file when you use the corresponding key sequence.
-
Loading Macros Programmable Macros Many of the actions performed using SlickEdit® Core are performed using Slick-C® macros. Slick-C functions are mapped to menus, buttons, and keys and perform the action behind an event. Use Slick-C to customize, modify, and bind functions to other shortcuts. Loading Macros To load a Slick-C ® macro file, from the main menu click Macro → Load Module, or use the gui_load command. The Open dialog box is displayed, prompting you for a file.
-
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.
-
338
-
Chapter 10.
-
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. If there are no clipboards, the message line states No clipboards. Figure 10.1.
-
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.
-
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.
-
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).
-
Find and Replace View • 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 Find and Replace View to access the following items: • Saved Search Expressions - See Saving Search and Replace Values. • Configure Options - Displays the Search Tab of the General Options dialog, from which you can set the default search options that the Find and Replace view should use.
-
Find and Replace View • 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.
-
Find and Replace View 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 Advanced Tab , and enter your desired characters in the Word chars field.
-
Find and Replace View • 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. See Selective Display for more information. • Highlight matches - Select this option to highlight all matched patterns in the current search range. Highlight colors for these matches are customizable.
-
Find and Replace View • Look in - This field allows you to specify a range for your search to the current selection, current pro348
-
Find and Replace View 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. • File types - Specifies one or more file types (extensions) to search for. Type in this field or use the drop-down list to select the extensions desired.
-
Find and Replace View • 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. • List matching lines only - Selecting this option will display only one line in the search results window for each line containing one or more matching patterns on the same line, and will highlight all matching patterns.
-
Find and Replace View • 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. See Using Tagged Search Expressions for more information. • Preserve case - Select this option to perform a case-sensitive search and replace operation.
-
Find and Replace View Tip You can use the menu items Edit → Undo and Edit → Redo to undo/redo replacements. Replace in Files Tab This tab on the Find and Replace View provides the same functionality as the Replace Tab , with the added ability to conduct multi-file replacements. It contains one additional option, described below. Figure 10.8.
-
Find and Replace View 353
-
Find Symbol View • Leave modified files open - Select this option to open all of the files on which a replace has been performed. The Results options are the same as those on the Find in Files Tab . Tip You can use the menu items Edit → Multi-File Undo and Edit → Multi-File Redo to undo/redo replacements in multiple files. Find Symbol View The Find Symbol view is used to locate symbols in your code.
-
Find Symbol View • 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
-
Find Symbol View in the current function scope. • - Select this setting to only search in files that are in the current project. • - Select this setting to only search in files that are in the current workspace. • - Select this setting to search all extension-specific tag files for the indicated extension. This may also include your workspace tag file. • Specific tag files - Select one of the specific tag files listed to limit search to that file.
-
Go to Definition Dialog • Manage tag files - Displays the Context Tagging - Tag Files Dialog, which can be used to update 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. Tip This dialog has been deprecated in favor of the Find Symbol View.
-
Selective Display Dialog Dialogs Related to Viewing and Displaying This section describes SlickEdit® Core dialogs and views related to viewing and displaying within the editor. 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.
-
Selective Display Dialog 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. The following settings are available: • Match case - When checked, a case sensitive search is performed.
-
Macro Dialogs 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. Multi-Level Select Multi-level to set multiple levels of selective display based on braces or indent.
-
Save Macro Dialog Macro Dialogs This section describes SlickEdit® Core dialogs related to macros. For more information about working with macros, see Recorded Macros, Programmable Macros, and the Slick-C® Macro Programming Guide. Save Macro Dialog The Save Macro dialog appears when you end macro recording, or when you click Macro → Save lastmacro. You can also display the dialog by using the gui_save_macro command.
-
Variable Editor Dialog The dialog shows a list of all macros you have recorded. Use the buttons to perform the following operations: • Run - Runs the selected macro. See Running a Recorded Macro for more information. • Cancel - Closes the dialog. • Edit - Opens the macro source for editing. See Saving and Editing Recorded Macros for more information. • Delete - Deletes the selected macro. See Deleting Recorded Macros for more information.
-
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. • Delete - Deletes current item. • Format - Allows you to change the type of the current item. • Insert - Inserts a new hash table or array element. • Expand All - Expands all items so you can see the entire data structure.
-
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. • Squish - Deletes array items which have the value _notinit.
-
Menu Editor Dialog 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 Variables). • Caption - Title displayed for the menu item. For menu items, set the caption to "-" to specify a line separator.
-
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, specify 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.
-
Auto Enable Properties Dialog 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. • Allow when window is iconized - Indicates that this command should be enabled if the editor control is an editor window which is iconized.
-
Tools Dialogs • Requires a clipboard - Indicates that this command should be disabled if there is no editor control clipboard available. • Requires a selection - Indicates that this command should be disabled if there is no selection.
-
Organize Imports Options Dialog Tools Dialogs This section describes SlickEdit Core dialogs related to tools and utilties. See Chapter 8, Tools and Utilities for more information. Organize Imports Options Dialog The behavior of the Organize Imports and Add Import features is controlled by the options on the Organize Imports Options dialog box, pictured below. This dialog can be accessed by right-clicking in the editor and selecting Imports → Options. Figure 10.17.
-
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. packages. If set to 2, import statements will be grouped by second level package names. For example, all your imports from java.
-
3-Way Merge Dialog 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: • Base file - Specifies the file/buffer name of the original source file before any changes are made. • Revision 1 and 2 - Specifies the file/buffer names of the modified versions of the base file. • Output file - Specifies the output file name.
-
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 available: • Interactive - Provides a friendly side-by-side dialog box which lets you pick the change you want in the output file. It also lets you edit. • Interleaved buffer - Creates an editor buffer which you must edit to resolve conflicts.
-
DIFFzilla® Dialog Diff Types The following Diff types are available: • Text Compare - Compares two files and shows the differences between them. When this option is selected, 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.
-
DIFFzilla® Dialog • 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" under the Line range options. All symbols from Path 1 are diffed against all symbols from Path 2. Performing a multi-file diff always diffs all symbols.
-
DIFFzilla® Dialog 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. • Ignore trailing spaces after text on each line - When selected, differences in trailing spaces at the end of lines are ignored.
-
DIFFzilla® Dialog Figure 10.21. DIFFzilla®: Dialog Setup Options Setup options for the DIFFzilla® dialog are described as follows: • 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.
-
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 previous 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 in the Multi-File Diff Output dialog. Figure 10.22.
-
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. This is especially useful when you have not completed merging files and you want to continue at a later time. Also, you can generate a file list.
-
Options Dialogs 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 Tag File Categories. The following buttons are available on the Context Tagging ® - Tag Files dialog: • Done - Saves tag file settings and closes the dialog box. • Add Files - Displays the Add Source Files dialog box, from which you can add a set of files to the currently selected tag file.
-
General Options Dialog Options Dialogs This section describes SlickEdit® Core dialogs and views related to options. 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the General setting. There are seven categories (tabs) available, listed below.
-
General Options Dialog 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.
-
General Options Dialog • 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 bindings 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. This option is unavailable using the CUA emulation.
-
General Options Dialog • 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. • Vertical line color - Click on the colored box to change the color of the line. • Auto restore - The Auto restore options control which elements of your SlickEdit Core environment are restored when you switch workspaces or close and re-open SlickEdit Core.
-
General Options Dialog 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 • 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 default, 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. • Regular expression - If checked, various search commands (/, find, or c) default to regular expression searching.
-
General Options Dialog 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 Color Settings Dialog (Window → Preferences, expand SlickEdit and click General in the tree, then double-click the Color setting).
-
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.
-
General Options Dialog lect behaviors. • CUA (default) - When this style is selected, selected text is deleted before a paste or character is inserted 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+) are extended as the cursor moves. Locking a selection requires one of the emulation commands select_line, select_block, or select_char.
-
General Options Dialog Note Viewing special characters is only available for ASCII files. To access Special Characters options, from the main menu click Window → Preferences, expand 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 Viewing Special Characters for more information about these settings. Figure 10.27.
-
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.
-
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.
-
General Options Dialog 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 buffer is closed or when exiting the editor. • Edit "A B C" start on file A - If selected, the first file opened becomes the active buffer.
-
General Options Dialog Elements and Setting Macro Variables for more information. • 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.
-
General Options Dialog • 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 command) to switch the focus between the two most frequently used open editor windows, rather than always going to the next window. Press Ctrl+Shift+Tab (prev_window command) to switch between all open editor windows.
-
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.
-
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. Figure 10.30.
-
General Options Dialog 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. On UNIX, this defaults to the directory specified by the TMP environment variable.
-
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. The cache size must be smaller than the amount of actual memory available.
-
Extension Options Dialog General settings on this dialog box are described below (see Extension Options - General Dialog Settings). Other options are categorized into the following tabs.
-
Extension Options Dialog 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. Tip Before configuring any of the Extension Options, always make sure the Extension drop-down list reflects the extension you wish to affect. • Refer to - When an extension refers to another extension, both extensions operate exactly the same.
-
Extension Options Dialog 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. • Syntax indent - When this option is selected, the Enter key indents according to language syntax. The value in the text box specifies the amount to indent for each level.
-
Extension Options Dialog the line only if the cursor position is before the intended indent location; otherwise, it will insert an additional 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 location. • Tabs - Set tabs in increments of a specific value or at specific column positions. To specify an increment of three, enter 3 in the text box.
-
Extension Options Dialog 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 margin indicator. The margin indicator will only appear if the Word wrap option is selected, which activates word wrapping.
-
Extension Options Dialog 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. • Break on word boundary - Breaks the text at the end of the line so that words are kept whole. This makes for easier reading, especially in text files.
-
Extension Options Dialog 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 Language Editing Modes for more information. • Alias filename - An alias defines a snippet of text that is inserted when the alias is expanded. Each extension can have one alias file, allowing aliases to be defined that do not affect other extensions.
-
Extension Options Dialog 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. For files that do not have a record format, the truncation length is turned off.
-
Extension Options Dialog Comment Block These settings are used when you comment out a selected block of text (Format → Comment Block or 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. To draw a box around the comment, fill in additional characters in the other fields.
-
Extension Options Dialog 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.
-
Extension Options Dialog 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 comments and a way to clearly see the indent level relative to lines that are not commented out. • At level of indent - Places and aligns characters vertically at the current indent level.
-
Extension Options Dialog Javadoc, select /**. For XMLdoc, select ///. For Doxygen, select /*! or //!. See Doc Comment Examples 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. For XMLdoc, select the style. For Doxygen, select the \param style.
-
Extension Options Dialog // The quick brown fox[CURSOR_HERE] jumped over the lazy dog. String Editing If Split strings on Enter is selected, when you press Enter to split a line when the cursor is inside of a string, the closing and opening quotes and, if necessary, operators, will automatically be inserted, and the string will be aligned with the original string. For example: String x = "The quick brown fox [CURSOR_HERE]jumped over the lazy dog.
-
Extension Options Dialog 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. • Start wrapping on line - This setting pertains to line comments only.
-
Extension Options Dialog 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. • Fixed right margin - If selected, lines will break before the specified number of columns in the Right column field has been reached.
-
Extension Options Dialog 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. • Color Coding - Click this button to display the Color Coding Setup dialog, allowing modification of language-specific color coding for the current language.
-
Extension Options Dialog • 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, select menu items by clicking and dragging the mouse. • Begin/End pairs - Specify the begin/end pairs to use for the selected extension in a format similar to a regular expression. This text box is unavailable for languages that have special begin/end matching built-in.
-
Extension Options Dialog The following options are available: • Enable auto-completion - If selected, activates the Auto-Complete feature. See Auto-Complete for 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 statements, putting in the parentheses and braces matching your specified coding style settings.
-
Extension Options Dialog • 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. This setting affects all extensions. • Show light bulb - If selected, displays the light bulb as a reminder when Auto-Complete suggestions are available for the current word prefix.
-
Extension Options Dialog List Members The following options apply to List Members. See List Members for more information. • 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 feature on demand, press Alt+Dot.
-
Extension Options Dialog • 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.
-
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. See Auto List Compatible Parameters for more information. • Pad parentheses - If selected, a space is inserted after the open parenthesis when a parameter name is automatically inserted.
-
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 Context Tagging Tab of the Extension Options dialog (Window → Preferences, expand SlickEdit and click General in the tree, double-click the File Extension Setup setting).
-
File Options Dialog • 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the File Options setting and select the Load tab. Figure 10.41. File Options: Load Tab The following settings are available: • Load entire file - When selected, the entire contents of the opened files are read into memory.
-
File Options Dialog 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. If you are using the load command to open files, use the switch +LC to specify this option.
-
File Options Dialog • 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. • Reinsert after current - (Not available in SlickEdit Core.) When selected, the editor will switch back to the previous buffer or window with the prev_buffer or prev_window command.
-
File Options Dialog 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. • Remove EOF character - When this option is set, the EOF character is removed from the end of DOS files when the buffer is saved.
-
File Options Dialog 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. • Line format - By default, the line format is set to Automatic, which means files are saved "as is" and there are no changes made to the line end characters.
-
File Options Dialog The following options are available: • AutoSave activated - Activates AutoSave, which prevents you from losing data when an abnormal editor 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 ® Core. After a file is saved or closed, the AutoSave temporary file is deleted the next time AutoSave occurs.
-
File Options Dialog different directory option has been selected. If the AutoSave directory is blank, \autosave is used. The configuration directory is defined by the VSLICKCONFIG environment variable. If the VSLICKCONFIG environment variable is not set, the directory in the editor executable directory is used as the configuration directory.
-
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 initialize the file list.
-
Key Bindings Dialog 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. To change the emulation mode, click Window → Preferences, expand SlickEdit and click Emulation in the tree. For more information, see Emulations.
-
Key Bindings Dialog • 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. For example, right-clicking within the filter displays the text "RButtonDn".
-
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 Creating Bindings and Bind Key Dialog for more information. • Close - Closes the Key Bindings dialog. You can also press Esc to close the dialog.
-
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. To assign the binding to a specific language editing mode, select this option and click the language editing mode from the drop-down list.
-
Redefine Common Keys Dialog 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 Word Wrap Tab ), the cursor will wrap to the previous line when the left margin is reached.
-
Redefine Common Keys Dialog 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. • Begin Line Text Toggle - Toggles the cursor between the first non-blank character of the current line and column 1. More Options The settings listed below appear on the Redefine Common Keys dialog box.
-
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 syntax indent for each level that is different from the tab settings (see Indenting with Tabs ), deselect this option. If you want your Backspace key to delete through tab characters one column at a time, select this option. • Treat leading spaces as tabs - If selected, the commands cursor_left and cursor_right will move the cursor by tab stops when within leading space.
-
Context Tagging ® Options Dialog • 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. • Start after seconds idle - When Background tagging of buffers is selected, re-tagging of buffers (opened files) starts after the user has not touched the keyboard or the mouse for this number of seconds.
-
Context Tagging ® Options Dialog 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.
-
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. See C/C++ Preprocessing for more information. Color Coding Setup Dialog The Color Coding Setup dialog provides the capability to specify colors for identifying your code.
-
Color Coding Setup Dialog General settings on this dialog box are described below (see Color Coding Setup Options - General Dialog Settings).
-
Color Coding Setup Dialog • 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.
-
Color Coding Setup Dialog 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. These words are always case-sensitive even if the Case Sensitive check box is not selected.
-
Color Coding Setup Dialog • 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. • ID start characters - Specifies characters which are valid for the start of an identifier or any part of an identifier.
-
Color Coding Setup Dialog 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. • $#### (Motorola) - When this option is selected, text such as $123ABC is color-coded in number color.
-
Color Coding Setup Dialog • &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 number color. • Z#### (Fortran) - When this option is selected, strings such as Z"123ABC" are color-coded in number color. • No Hex (COBOL) - When this option is selected, text such as 123ABC is not color-coded in number color.
-
Color Coding Setup Dialog 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.
-
Color Coding Setup Dialog • 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 character. • 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.
-
Color Coding Setup Dialog 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-specific settings for another language, but there's no guarantee it will work. • Color code line numbers (Basic) - When this option is selected, indicates that leading line numbers should be color-coded in line number color.
-
Color Coding Setup Dialog • Here Document (UNIX Shells/Perl) - Activates support for HERE documents. Note that if you prefix your terminator with one of our lexer names, you will get embedded language color-coding. Example of a HERE document in Perl, where HTMLEOF is used as the terminator to get HTML embedded language color-coding: print <... ... HTMLEOF Unknown languages are color-coded in string color.
-
Color Coding Setup Dialog 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: • Start delimiter - Delimiter which starts the multi-line comment. Currently, the first character of this string cannot be a valid identifier character.
-
Color Coding Setup Dialog • 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.
-
Color Settings Dialog 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 Delete 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. • Attribute values - List box contains the values for the specified tag and attribute.
-
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 Settings dialog, click Window → Preferences, expand SlickEdit and click General in the tree, then doubleclick the Color setting. Figure 10.56.
-
Font Configuration Dialog • Attribute (HTML only) - This is the color used for a recognized attribute of an HTML tag. For example, 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. It is not the color of the blinking cursor. • Current Line, Current Selected Line, Selection - SlickEdit Core will attempt to render these elements using your normal color settings for the Foreground color.
-
Font Configuration Dialog See 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 → Preferences, expand SlickEdit and click General in the tree, then double-click the Font setting. Figure 10.57. Font Configuration Dialog The following settings are available: • Screen Elements - The Element drop-down list of the Font Configuration dialog contains the screen elements for which fonts can be changed.
-
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 example, plain text). • Hex Source Windows - Editor windows that are being viewed in Hex mode (View → Hex). • Unicode Source Windows - Editor windows that are displaying Unicode content (for example, XML).
-
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 See 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. URL Mappings Dialog This dialog allows you to map URLs to a different location. See URL Mappings for information.
-
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). Figure 10.59.
-
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. Figure 10.60.
-
Web Browser Setup Dialog needs to launch one. To access this dialog, click Window → Preferences, expand SlickEdit and click 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: • Browsers - Select which Web browser you want to use. Selecting a preferred browser automatically sets the defaults for the other items in the Web Browser Setup dialog box.
-
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. To open it, on the FTP view window, click the button to start a new session. When the Connect dialog is displayed, click the Default Options button.
-
FTP Options Dialog • 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. • Upload without prompting - When on, saving an FTP file will upload the file. The same transfer type used to open the file is used to upload the file. • Resolve links - Default for adding a new connection profile.
-
FTP Options Dialog • 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. • Keep alive - Default used when adding a new connection profile. Keeps a connection alive even when idle. • Upload filename case - Default used when adding a new connection profile.
-
FTP Options Dialog • 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. • User ID - User ID used when logging into firewall. • Password - Password used when logging into firewall. • USER user@site - When this option is selected, host and port are required. User id and password are ignored.
-
FTP Options Dialog SSH/SFTP Tab This tab on the FTP Options Dialog is used to set the location of the client program used to establish connections 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 connection with the SSH server. SFTP support requires the OpenSSH client program to operate. Windows users can obtain the SSH client by downloading and installing the Cygwin package (http://www.cygwin.
-
Reflow Comment Dialog Reflow Comment Dialog The Reflow Comment dialog (Format → Reflow Comment), shown below, is used to reflow block comments, paragraphs, or a selection of the current file. Figure 10.67.
-
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 Comments Tab ). • Current paragraph - If selected, reflows the current paragraph within the block comment.
-
Current Document Options Dialog 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 → XML/HTML Formatting → Current Document Options, or by using the xml_html_document_options command. Figure 10.68. Current Document Options Dialog The dialog contains the following: • Formatting scheme - This drop-down specifies the formatting scheme applied to this document.
-
Chapter 11.
-
Using Unicode 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. All file data can be configured to Unicode UTF-8 data, but this would cause some problems.
-
Using Unicode 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 encoding recognition for XML files. Configure encoding recognition per extension or globally. Optionally store signatures and specify little endian or big endian.
-
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).
-
Using Unicode 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 Save Tab ), and save with tabs (save +t) only work correctly if all the characters are below 128.
-
Environment Variables 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 converted 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.
-
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 Using the set Command for more information. Caution Do not set the VSLICKCONFIG environment variable in vslick.ini. VSLICKCONFIG determines where the editor looks for vslick.ini.
-
Environment Variables Environment Variable Description VSLICKPATH must also contain the directories listed here. VSLICKBITMAPS One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain bitmap files (*.bmp). VSLICKPATH must also contain the directories listed here. VSLICKMISC One or more directories separated with a semicolon (;) (or a colon [:] on UNIX) that contain miscellaneous files including *.vlx, *.slk, *.api, *.idx, vslick.sta (UNIX: vslick.stu), *.
-
Setting Environment Variables in vslick.ini Environment Variable Description VST Specifies additional command line arguments to the macro compiler as if you typed them in when invoking the compiler. VSLICKXNOBLINK Suppresses the blinking cursor. VSLICKXNOPLUSNEWMSG Suppresses a message when starting a second instance of SlickEdit Core. Setting Environment Variables in vslick.ini Place configuration environment settings in the file vslick.ini.
-
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 environment variable settings are inserted. The current value of an individual environment variable may be retrieved by executing the set command followed by the name of the environment variable.
-
Viewing Configuration Variables Configuration Variables SlickEdit® Core has many behaviors that are controlled through properties not exposed in the options dialogs. They are set through global configuration macro variables in Slick-C®, using the set_var command. The most commonly used of these variables are listed in the table below.
-
Table of Configuration Variables Configuration Variable 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. def_buflist Change this variable to find the initial file in Buffer List. The default is 3. This macro variable determines how the list_buffers commands displays the buffer list.
-
Table of Configuration Variables Configuration Variable Description def_filelist_show_dotfiles Controls the global Show hidden files option on the General Tab of the General Options dialog. On Windows, the default value of this variable is 1; change to 0 to view Dot files. On UNIX platforms, the default value is 0; change to 1 to hide Dot files. (Dot files are files with names beginning with a dot character.) def_from_cursor Default is 0.
-
Table of Configuration Variables Configuration Variable Description def_plusminus_blocks When the value is set to 1, the plusminus command will try to find code blocks to expand or collapse if the cursor is on a line that does not have a Plus or Minus bitmap on it. The default is 1. def_preplace Default is 1. If the value is set to 0, the save command will NOT prompt you if you are inadvertently overwriting a file.
-
Directories and Files Configuration Variable Description that decrease performance when using ClearCase version control. def_vtg_tornado Set this variable value to 0 to prevent Context Tagging of Tornado files. def_xml_no_schema_list 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. Set the value to a list of space-delimited extensions that you want excluded for actual schema validation. For example: .
-
Configuration Directory 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/ on Windows, and $HOME/.secore/ on Linux.
-
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. If you experience a problem in the editor, you can often solve it by using a saved config directory.
-
Configuration Directory User Config File Description *.als A text file that contains user-defined extension-specific aliases. alias.slk A text file that contains user-defined global aliases (directory aliases). ftp.ini (UNIX: uftp.ini) A text file that contains user-defined FTP configurations. project.vpe (UNIX: uproject.vpe) A text file that contains user-defined extension-specific projects. ubox.ini A text file that contains user-defined box and line comment styles. uformat.
-
System Configuration Files User Config File Description maps, and binary files are stored here as well. vslick.sta (UNIX: vslick.stu) A binary file that contains dialog boxes, menus, macro pcode, key bindings, and all other configuration data not stored in one of the other configuration files. Both user and system configuration information is stored here. vusrdefs.e (UNIX: vunxdefs.
-
File Search Order System Config File Description format.ini A text file that contains default beautifier schemes. print.ini 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. prjtemplates.vpt A text file that contains default project packages. This file is NOT modified by the dialogs and is not preserved when a new editor is installed. syscpp.h (UNIX: usyscpp.
-
Search Order for Configuration Files 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. Configuration directory. The configuration directory is defined by the VSLICKCONFIG environment variable. 2. If VSLICKCONFIG is not defined, then My Documents\My SlickEdit Core Config is used. 3.
-
VLX File and Color Coding VLX File and Color Coding For more basic information about using Color Coding, see Color Coding. To modify the color coding for VLX files, use one of the following methods: • Use the Color Coding Setup dialog box (Window → Preferences, expand SlickEdit and click General in the tree, then double-click the Color Coding setting). • Modify the vslick.vlx file. • Or, create a new VLX file. The vslick.
-
Modifying the VLX File to Change a Color Definition • VHDL • Visual Basic .NET Modifying the VLX File to Change a Color Definition To modify an existing language-specific coloring definition, complete the following steps: 1. Open vslick.vlx for editing. 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. 4.
-
Creating a Lexer Name and a New VLX File Statement Description case-sensitive= [Y | N] Defines the case sensitivity for the language. This statement must be the first or second statement within the section. idchars=start_id_chars after_id_chars Defines the characters that are the start of a valid identifier and additional valid characters that may follow. This statement must be the first or second statement within the section.
-
Creating a Lexer Name and a New VLX File Statement Description the line is a comment before determining the color coding of symbols in the line. When the checkfirst option is specified, start_symbol is limited to one character in length. leading specifies that symbol is considered a line comment only if it appears as the first non-blank character. Space or tab characters are considered blanks. Currently, end_symbol may not be a valid identifier.
-
Creating a Lexer Name and a New VLX File Statement Description keywords= [keyword ] [keyword ] ... Defines words that should be displayed in keyword color. Keywords do not have to be valid identifiers. cskeywords= [keyword ] [keyword ] ... (Case-sensitive keywords) Defines words that should be displayed in keyword color only if found in the case specified. This statement should only be used for languages such as HTML which are case insensitive except for a few words.
-
Creating a Lexer Name and a New VLX File Value of style Description dqbackslashml Color double-quoted strings. If a double-quoted string ends in a backslash, it continues the string to the next line (like C). dqmultiline Color double-quoted strings. String may span multiple lines. dqdoubles Color double-quoted strings. Two double quotes represent one double quote. dqterminate Do not color-code a double-quoted string until the string is terminated.
-
Creating a Lexer Name and a New VLX File Value of style Description Intel Assembler). octo Octal numbers are of the form ddddO (like Intel Assembler). octq Octal numbers are of the form ddddQ (like Intel Assembler). poundbase Based numbers are of the form #base#number#exponent (like Ada). underlineint Numbers may have underlines between the numbers (like Ada). xhex Hexadecimal numbers are of the form 0xhhhh (like C). nonumbers Do not color-code numbers.
-
Editing the Key Binding Source Value of style Description tcl Special support for TCL language color-coding. bquote Perl- and Linux Shell-style backquote (subshell). model204 Special support for Model 204 language. cics Special support for CICS embedded in COBOL. python Special support for Python.
-
Menu Editing 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 generated by this command is vusrdefs.e. It is placed in your configuration directory if you have changed this location from the default.
-
Creating and Editing Menus Menu Editing For information about accessing SlickEdit® Core menus and associated options, see Menus. Creating and Editing Menus SlickEdit® Core menus are controlled by Slick-C® macro files. You can customize menus by editing these 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. Menus can be managed using the Open Menu dialog.
-
Using the ISPF and XEDIT Emulations Editing Menus To select a menu for editing, from the main menu click Macro → Menus (or use the open_menu command). Select the menu to edit from the list, then click Open. The Menu Editor will be displayed. See Menu Editor Dialog for a list of the available options. Defining Menu Item Aliases The Menu Item Alias dialog box allows you to define aliases (which are similar commands) for the command that is being executed.
-
ISPF Options Dialog Using the ISPF and XEDIT Emulations This section describes the features of the ISPF editor emulation and outlines some XEDIT line commands. ISPF Options Dialog The ISPF Options dialog is used to tune various ISPF emulation options. When you are in ISPF emulation, you can access this dialog from the main menu by clicking Window → Preferences, expand SlickEdit and click General in the tree, then double-click the ISPF Options setting. Figure 11.2.
-
ISPF Primary Commands 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. • ISPF Line Command First - Expose one or more lines at the beginning of a block of excluded lines. • ISPF Line Command Last - Expose one or more lines at the beginning of a block of excluded lines.
-
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 ispf_retrieve (F12). If configured to do so, the Home key will also place the cursor on the command line.
-
ISPF Primary Commands Command Description ispf_copy Insert the contents of a file or PDS member into the buffer. ispf_create Create a new file or PDS member containing the contents of the buffer. ispf_cut Cut lines out of the current buffer and place them in the clipboard. ispf_delete Delete lines in the given line range, or the entire buffer. ispf_edit This command is identical to the built-in edit command. ispf_end Close the current file.
-
ISPF Line Commands Command Description ispf_rchange Repeat the change requested by the most recent change command. ispf_renumber Immediately update the line numbers in a file. ispf_replace Save the contents of the current buffer to an existing file. ispf_reset Reset the contents of the line prefix area. ispf_return Close the current file. ispf_rfind Repeat the last find operation requested. ispf_save This command is identical to the built-in save command.
-
ISPF Line Commands 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 Description ISPF Line Labels Define a label. ISPF Line Command Shift Shift data left or right. ISPF Line Command A Identify a line after which lines are to be inserted. ISPF Line Command B Identify a line before which lines are to be inserted.
-
ISPF Line Commands Command Description ISPF Line Command Show Expose one or more lines having the left-most indentation level in a block of excluded lines. ISPF Line Command TABS Display the tab definition line. ISPF Line Command TE Insert one or more blank lines to allow power typing for text entry. ISPF Line Command TF Reflow paragraphs according to the current column boundary settings. ISPF Line Command TJ Join this line with the next line.
-
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 • )) [n] - Shift the block of lines n columns right, default 2 • < [n] - Data shift the current line n columns left, default 2 • << [n] - Data shift the block of lines n columns left, default 2 • > [n] - Data shift the current line n columns right, default 2 • >> [n] - Data
-
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 ISPF Insert Bounds Ruler BNDS Usage BNDS Remarks Insert a column boundary ruler line.
-
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 Usage • D [n] - Delete n lines starting with the line with the command. • DD - Delete a block of lines, must match another DD.
-
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. • LCC - Lowercase a block of lines, must match another LCC or LCLC. • LCLC - Lowercase a block of lines, must match another LCC or LCLC.
-
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. There are two forms to this command. The first form (M [n]) specifies that the line and the subsequent n-1 lines are to be moved. The second (block) form (MM) is placed on the first and last lines of the block to be moved.
-
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 Command MASK, ISPF Line Command TABS ISPF Overlay Lines O and OO for blocks Usage • O [n] - Overlay n lines starting with the line with the command. • OO - Overlay a block of lines, must match another OO.
-
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.
-
ISPF Line Commands TF Remarks Reflows paragraphs according to the current column boundary settings. See Also reflow_paragraph ISPF Join Lines TJ Usage TJ Remarks Join this line with the next line. See Also ISPF Line Command TS, join_line ISPF Split Line TS Usage TS Remarks Divides a line so that data can be added. The line is split at the column in which the cursor is in when you press Enter. This command does not support multiple lines.
-
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 • X [n] - Exclude n lines starting with the line with the command. • XX - Exclude a block of lines, must match another XX. Remarks Specifies one or more lines to be hidden (excluded).
-
ISPF Line Commands XEDIT ISPF Description / R Repeat the marked line. F A Paste text following line. A I Add (insert) line(s). P B Paste text before line. L LC Make line lowercase. LL LCC Make block lowercase. U UC Make line uppercase. UU UCC Make block uppercase. 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).
-
ISPF Line Commands Command Description imacro Save the name of an initial macro in the edit profile. level Set the modification level number in PDF library statistics. model Copy a model into the buffer or defines a model class. notes Control whether the MODEL command display notes or not. nulls Control null spaces. pack Control whether data is to be stored compressed or not. profile Display edit profile. recovery Specify edit recovery options.
-
Regular Expression Syntax Command Description ispf_home Place the focus on the command line in ISPF emulation. ispf_retrieve Does command line retrieval, getting the next command line from the list. ispf_retrieve_back Identical to the ispf_retrieve back command. ispf_top Move cursor up to the top of the buffer. ispf_up Move cursor up to the previous page of text. ispf_do_lc Immediately process all commands found in the line prefix area.
-
UNIX Regular Expressions Regular Expression Syntax This section provides lists of the UNIX, SlickEdit®, and Brief regular expression syntaxes, samples, and Unicode category specifications. UNIX Regular Expressions UNIX regular expressions are defined in the following table. Table 11.12. UNIX Regular Expression UNIX Regular Expression Definition ^ Matches beginning of line. $ Matches end of line. . Matches any character except newline. X+ Maximal match of one or more occurrences of X.
-
UNIX Regular Expressions UNIX Regular Expression Definition X{n1,}? Minimal match of at least n1 occurrences of X. X{,n2}? Minimal match of at least zero occurrences but not more than n2 occurrences of X. X{n1,n2}? Minimal match of at least n1 occurrences but not more than n2 occurrences of X. (?!X) Search fails if expression X is matched. The expression ^(?!if) matches the beginning of all lines that do not start with if.
-
UNIX Regular Expressions UNIX Regular Expression Definition [^char-set] Matches any character not specified by char-set. A dash (-) character may be used to specify ranges. [char-set1 - [char-set2]] Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. The expression [^A-Z] matches all characters except uppercase letters. For example, [a-z-[qw]] matches all English lowercase letters except q and w.
-
UNIX Regular Expressions UNIX Regular Expression Definition the Unicode Greek block. This is equivalent to [^\p{isGreek}]. See Unicode Character Blocks for Regular Expressions. \xhh Matches hexadecimal character hh where 0<=hh<=0xff. \dddd Matches decimal character ddd where 0<=ddd<=255. \d 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.
-
UNIX Regular Expressions UNIX Regular Expression Definition \ol 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. This is much safer and usually faster than using the \om option. \char Declares character after slash to be literal. For example, \* represents the star character. \:char Matches predefined expression corresponding to char.
-
UNIX Regular Expressions • +, *, ?, {}, +?, *?, ??, {}? (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 Description ^defproc Matches lines that begin with the word defproc. ^definit$ Matches lines that only contain the word definit. ^\*name Matches lines that begin with the string *name.
-
SlickEdit® Regular Expressions Sample UNIX Expression Description ters in the Greek block. \x{6587} Matches Unicode character with hexadecimal value 6587. Character set intersection. Matches all Unicode letters in the Greek block. [\p{L}-[qw]] Matches all Unicode letters except q and w. [\p{L}] Matches all Unicode letters. [\p{Lul}] Matches all Unicode uppercase and lowercase letters. [\P{L}] Matches all Unicode characters that are not letters.
-
SlickEdit® Regular Expressions SlickEdit Regular Expression Definition avoid ambiguous expressions. For example a:9()1 searches for nine instance of the letter a followed by a 1. X:n1, Maximal match of at least n1 occurrences of X. X:n1,n2 Maximal match of at least n1 occurrences but not more than n2 occurrences of X. X:*n1, Minimal match of at least n1 occurrences of X. X:*n1,n2 Minimal match of at least n1 occurrences but not more than n2 occurrences of X.
-
SlickEdit® Regular Expressions SlickEdit Regular Expression Definition cept uppercase letters. [^char-set] Same as [~char-set] above. [char-set1 - [char-set2]] Character set subtraction. Matches all characters in char-set1 except the characters in char-set2. For example, [a-z-[qw]] matches all English lowercase letters except q and w. [\p{L}-[qw]] matches all Unicode lowercase letters except q and w. [char-set1 & [char-set2]] Character set intersection.
-
SlickEdit® Regular Expressions SlickEdit Regular Expression Definition Regular Expressions. \xhh Matches hexadecimal character hh where 0<=hh<=0xff. \ddd Matches decimal character ddd where 0<=ddd<=255. \gd 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. \c Specifies cursor position if match is found. If the expression xyz\c is found, the cursor is placed after the z.
-
SlickEdit® Regular Expressions SlickEdit Regular Expression Definition \ol 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. This is much safer and usually faster than using the \om option. \char Declares character after slash to be literal. For example, \: represents the colon character. :char Matches predefined expression corresponding to char.
-
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 Description ^defproc Matches lines that begin with the word defproc. ^definit$ Matches lines that only contain the word definit. ^\:name Matches lines that begin with the string :name.
-
Brief Regular Expressions Brief regular expressions are defined in the following table. Table 11.16. Brief Regular Expressions Brief Regular Expression Definition % Matches beginning of line. < Matches beginning of line. $ Matches end of line. > Matches end of line. ? Matches any character except newline. * Minimal match of zero or more of any character except newline. This is the same as ?@. X+ Minimal match of one or more occurrences of X.
-
Brief Regular Expressions Brief Regular Expression Definition X\:,n2? Minimal match of at least zero occurrences but not more than n2 occurrences of X. X\:n1,n2? Minimal match of at least n1 occurrences but not more than n2 occurrences of X. \(X\) Matches sub-expression X but does not define a tagged expression. {X} Matches sub-expression X and specifies a new tagged expression. See Using Tagged Search Expressions for more information.
-
Brief Regular Expressions Brief Regular Expression Definition all Unicode lowercase letters except q and w. [char-set1 & [char-set2]] Character set intersection. Matches all characters in char-set1 that are also in char-set2. For example, [\x{0}-\x{7f}&[\p{L}]] matches all letters between 0 and 127. \x{hhhh} Matches up to 31-bit Unicode hexadecimal character specified by hhhh. \p{UnicodeCategorySpec] (Only valid in character set) Matches characters in UnicodeCategorySpec.
-
Brief Regular Expressions Brief Regular Expression Definition \d 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. \c Specifies cursor position if match is found. If the expression xyz\c is found, the cursor is placed after the z. \n Matches newline character sequence. Useful for matching multi-line search strings.
-
Brief Regular Expressions Brief Regular Expression Definition char. The predefined expressions are: • \:a [A-Za-z0-9 - Matches an alphanumeric character. • \:b\([ \t]#\) - Matches blanks. • \:c [A-Za-z] - Matches an alphabetic character. • \:d [0-9] - Matches a digit. • \:f \([~\[\]\:\\/<>|=+;, \t"’]#\) - Matches a file name part. • \:f \([~/ \t"’]#\) - UNIX: Matches a file name part. • \:h\([0-9A-Fa-f]#\) - Matches a hex number. • \:i\([0-9]#\) - Matches an integer. • \:n\([0-9]#\(.[0-9]#|\)|.
-
Unicode Category Specifications for Regular Expressions Sample Brief Regular Expression Description tice that the backslash must prefix the special character *. [\t ] Matches tab and space characters. [\d9\d32] Matches tab and space characters. [\x9\x20] Matches tab and space characters. p?t Matches any three-letter string starting with the letter p and ending with the letter t. Two possible matches are pot and pat.
-
Unicode Category Specifications for Regular Expressions 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 http://unicode.org). Table 11.18.
-
Unicode Character Blocks for Regular Expressions Subcategory Description Sc Symbol, Currency Sk Symbol, Modifier So Symbol, Other Zs Separator, Space Zl Separator, Line Zp Separator, Paragraph Cc Other, Control Cf Other, Format Cs Other, Surrogate Co Other, Private Use Cn Other, Not Assigned (no characters in the file have this property) Unicode Character Blocks for Regular Expressions The Unicode consortium standard regular expression block categories are supported.
-
Unicode Character Blocks for Regular Expressions • 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 Block Name 0000..007F BasicLatin 0080..00FF Latin-1Supplement 0100..017F LatinExtended-A 0180..024F LatinExtended-B 0250..
-
Unicode Character Blocks for Regular Expressions Range Block Name 0B80..0BFF Tamil 0C00..0C7F Telugu 0C80..0CFF Kannada 0D00..0D7F Malayalam 0D80..0DFF Sinhala 0E00..0E7F Thai 0E80..0EFF Lao 0F00..0FFF Tibetan 1000..109F Myanmar 10A0..10FF Georgian 1100..11FF HangulJamo 1200..137F Ethiopic 13A0..13FF Cherokee 1400..167F UnifiedCanadianAboriginalSyllabics 1680..169F Ogham 16A0..16FF Runic 1780..17FF Khmer 1800..18AF Mongolian 1E00..1EFF LatinExtendedAdditional 1F00..
-
Unicode Character Blocks for Regular Expressions Range Block Name 20A0..20CF CurrencySymbols 20D0..20FF CombiningMarksforSymbols 2100..214F LetterlikeSymbols 2150..218F NumberForms 2190..21FF Arrows 2200..22FF MathematicalOperators 2300..23FF MiscellaneousTechnical 2400..243F ControlPictures 2440..245F OpticalCharacterRecognition 2460..24FF EnclosedAlphanumerics 2500..257F BoxDrawing 2580..259F BlockElements 25A0..25FF GeometricShapes 2600..26FF MiscellaneousSymbols 2700..
-
Unicode Character Blocks for Regular Expressions Range Block Name 3100..312F Bopomofo 3130..318F HangulCompatibilityJamo 3190..319F Kanbun 31A0..31BF BopomofoExtended 3200..32FF EnclosedCJKLettersandMonths 3300..33FF CJKCompatibility 3400..4DB5 CJKUnifiedIdeographsExtensionA 4E00..9FFF CJKUnifiedIdeographs A000..A48F YiSyllables A490..A4CF YiRadicals AC00..D7A3 HangulSyllables D800..DB7F HighSurrogates DB80..DBFF HighPrivateUseSurrogates DC00..DFFF LowSurrogates E000..
-
Unicode Character Blocks for Regular Expressions Range Block Name FEFF..FEFF Specials FF00..FFEF HalfwidthandFullwidthForms FFF0..FFFD Specials 10300..1032F OldItalic 10330..1034F Gothic 10400..1044F Deseret 1D000..1D0FF ByzantineMusicalSymbols 1D100..1D1FF MusicalSymbols 1D400..1D7FF MathematicalAlphanumericSymbols 20000..2A6D6 CJKUnifiedIdeographsExtensionB 2F800..2FA1F CJKCompatibilityIdeographsSupplement E0000..
-
-
08SLICK0011_CORE_upd 1/24/08 11:05 AM Page 1 ® SlickEdit Corev3.3 for Eclipse ™ 1.919.473.0070 1.800.934.EDIT 1.919.473.0080 fax ® SlickEdit Core v3.3 for Eclipse SlickEdit Inc. 3000 Aerial Center Parkway, Suite 120 Morrisville, NC 27560 USA info@slickedit.com www.slickedit.com ™ SlickEdit, Visual SlickEdit, Clipboard Inheritance, DIFFzilla, SmartPaste, Context Tagging, Slick-C, and Code Quick | Think Slick are registered trademarks of SlickEdit Inc.
| | |