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\. Type the following command on the command line to set or create the VER- SION environment variable:

set VERSION=c:\version20

For more information about setting environment variables, see Environment Variables.

Extension-Specific Aliases

You can set up aliases for any frequently used text, such as comment headers. Extension-specific aliases are set up on a per-language basis. Each extension can have one alias file, allowing aliases to be defined that do not affect other extensions.

After typing the alias identifier, extension-specific aliases can be expanded by pressing Ctrl+Space

(codehelp_complete command). Extension-specific aliases are stored in a file that you can specify and typically have the extension .als.

Tip

If the alias is a Syntax Expansion modification, you can simply press Space to expand the ali- as. See Syntax Expansion for more information.

An Auto-Complete option is available to show a tooltip of the matching alias for the word under the cursor. Click Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting. Choose the Extension from the drop-down list, then select the Auto-Complete Tab and check the option Alias expansion. See Completions for more information.

Creating an Extension-Specific Alias

When you define a new alias for a file extension, each time that you open or create a file with that exten- sion, the aliases will be available.

Choosing the Alias File

Before defining a new alias, you must specify the file in which the alias is to be stored. The quickest way to do this is to click Window Preferences, expand SlickEdit and click General in the tree, then double-click the Alias setting and pick an alias file from the predefined list. After you select the alias file, the Alias Editor dialog appears, allowing you to create the aliases.

If you wish to specify your own file to store aliases, or if you are using an extension that does not have a predefined file in the list, complete the following steps:

152

Page 174
Image 174
Slick V3.3 manual Extension-Specific Aliases, Creating an Extension-Specific Alias, Choosing the Alias File