EnhProj macro for SlickEdit 2008 and 2009
by Christopher Antos, Copyright © 2008-2009, All Rights Reserved.
Purpose
SlickEdit 14 has a new Smart Open toolbar. EnhProj is very similar, but is
much faster in a workspace with tens of thousands of files, and works on both
SE14 and SE13.
Compatibility
This macro uses a DLL, so it only works on Windows computers.
Itt has been tested with SlickEdit 13.0.2 through 14.0.0. 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). The Smart
tab is the default and merges the files from the Any and Workspace tabs
into a single combined list.
- 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.
- Press Shift+Enter to create/open the file name as typed.
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 Smart
tab, 1 = the Any tab, 2 = the Project tab, 3 = 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 0 to use a prefix
match for the filename portion. By default the filename portion uses a
substring match. The path portion always uses a suffix match. (To use a
substring match even when enhproj_ofd_always_substring=0, just insert a
star (*) wildcard, e.g. "*foo" or "bar*\*foo" or etc).
- enhproj_ofd_cx — Set this to 0 to reset the position/size of
the open file dialog.
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 with "foo" in their name (or use "*foo" if prefix
matching is configured).
- Type "bar\foo" to see files that begin with "foo" in the "bar" directory
(specifying a directory forces prefix matching).
- Type "bar*\*foo" to see files with "foo" in their names in any directories
with "bar" in their names.
Future Enhancements
- Maybe merge open files into the Smart list.
- Maybe merge recently open files (history) into the Smart list.
- Maybe hook up UI for choosing options.
- Maybe add an autocompletion key.