EnhProj macro for SlickEdit 2008
by Christopher Antos, Copyright © 2008, All Rights Reserved.
Compatibility
This macro uses a DLL, so it only works on Windows computers.
Also, it has only been tested with SlickEdit 13.0.2. It may or may not work
with older versions of SlickEdit (older versions are not supported).
Installation
- Extract the files from the .ZIP archive.
- Copy EnhProj.dll to your SlickEdit "win" directory (e.g. "c:\slick\win").
- Copy EnhProj.e to your custom macro directory (or your config directory).
- Open the EnhProj.e file in SlickEdit.
- Load the module by choosing Macro | Load Module... from the menu.
- Set up a key binding to invoke the enhOpen command (I use Ctrl+O).
Features
- The file list is automatically filtered as you type.
- Use the tabs to list Workspace files, Project files, or Any files from the
file system (i.e. starting from the current working directory).
- Press Enter to open the file highlighted in the list. If no file is
highlighted in the list then the file is opened from the file system, relative
to the current working directory.
Configuration
There are some configuration variables that control optional behavior.
Configuration variables can be set by typing "set-var config_var_name" at the
SlickEdit command prompt. At this time EnhProj does not have UI for setting
options.
- enhproj_ofd_which_list — Which tab to initially activate in a
new editor session. (-1 = remember across editor sessions, 0 = the Any tab, 1
= the Project tab, 2 = the Workspace tab).
- enhproj_ofd_sort_by_path — Set this to 1 to sort the list by
path. By default the list is sorted by filename.
- enhproj_ofd_case_sensitive — Set this to 1 to make the list
case sensitive. By default the list is case insensitive.
- enhproj_ofd_always_substring — Set this to 1 to always use
substring matches. By default the path portion uses a suffix match and the
filename portion uses a prefix match (to use a substring match just insert a
star (*) wildcard, e.g. "bar*\*foo").
How To Filter The File List
Typing filters the list.
- Type a filename prefix to filter the list.
- Type a path\filename prefix to filter by path as well as filename. The
path portion uses a suffix match, and the filename portion uses a prefix
match.
- Use * and ? wildcards to filter path or filename using wildcards.
- Type "*foo" to filter the list to files containing "foo" somewhere in
their name.
Examples:
- Type "foo" to see files that begin with "foo".
- Type "*foo" to see files with "foo" in their name.
- Type "bar\foo" to see files that begin with "foo" in the "bar" directory
(or any directory that ends with "bar").
- Type "bar*\*foo" to see files with "foo" in their names in any directories
with "bar" in their names.
Known Issues
- For some reason enhproj_ofd_remembered_list is not always remembered
across sessions. So setting enhproj_ofd_which_list = -1 does not reliably
remember the selected tab between editor sessions.
Future Enhancements
- Maybe hook up UI for choosing options.
- Maybe add autocompletion keys for the "Any" tab (similar to using Tab to
cycle through matching filenames at a command shell prompt).
- Maybe an option to merge the "Any" tab results into the "Project" and
"Workspace" tabs for convenience.