SlickEdit Core provides a command line as a means to execute most SlickEdit Core operations 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.
SlickEdit® Core commands that contain two or more words are written throughout our documentation with underscore separators: for example, cursor_down. Note that in the user interface, however, these commands are displayed with hyphen separators: for example, cursor-down. Both of these forms work in SlickEdit Core, so you can use whichever style you prefer.
Although SlickEdit Core shares a heritage with our stand-alone editor, SlickEdit, some SlickEdit commands are not available when the functionality is not applicable to the Eclipse environment.
To activate or toggle the SlickEdit® Core command line in any emulation, click on the message line with the mouse. Key bindings are also provided for toggling the cursor to the command line, based on your emulation:
BBEdit - Esc
Brief - Esc
CodeWarrior - Esc
CodeWright - F9
CUA (SlickEdit Core's default emulation) - Esc
Epsilon - Alt+X or F2
GNU Emacs - Alt+X or F2
ISPF - Esc
SlickEdit (Text Mode edition) - Esc
Vim - Ctrl+A
Visual C++ - Esc
Visual Studio default - Esc
Xcode - Esc
Eclipse - Esc
See Emulations for more information.
The SlickEdit® Core 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.
As you type a command on the SlickEdit® Core command line, a list of matching completions is displayed, including any command line arguments used in a previous command. Use the Down arrow to move to the next command in the list, and the Up arrow to move to the previous command. Press the Enter key to select the current command.
Some commands, like set_var, prompt for arguments. SlickEdit Core maintains a history of arguments used for each command. Use the same completion and history mechanism as described above for commands to complete arguments. Typically, the most recent argument you typed is automatically displayed.
Command completions are useful for discovering operations in SlickEdit Core. For instance, to find all operations that begin with "find", type find in the command line, and SlickEdit Core will display a list of those commands. Some search commands do not begin with "find", like gui_find, so you may not discover all related commands this way. To find all commands containing the word "find," use the Key Bindings options page (Window → SlickEdit Preferences → Keyboard → Key Bindings or gui_keybindings command). See Key and Mouse Bindings for more information.
For information about other items that can be automatically completed, see Completions.
The SlickEdit® Core command line is a text box control just like the text boxes that appear in various dialog boxes. For a list of key shortcuts that can be used inside the command line and other text boxes within SlickEdit Core, see Key Shortcuts in Text Boxes.
You can use the SlickEdit® Core command line to determine what keys are associated with what commands, and vice-versa.
Alternatively, you can use the Key Bindings options page (Window → SlickEdit Preferences → Keyboard → Key Bindings or gui_keybindings command) to see a list of command/key binding associations. See Key Binding Options for more information.
To determine the function of a key or key binding, use the what_is command (Help → What Is Key). For example:
Click Help → What Is Key, or activate the SlickEdit® Core command line (by pressing Esc) and type what_is (or type what and press the spacebar for auto-completion), then press Enter.
The status area will prompt with the text What is key. Enter the key sequence in question. The status area will then update with the appropriate information. If the key or key sequence is not bound to a command, no message will appear.
To determine the key to which a command is bound, use the where_is command (Help → Where Is Command). For example:
Click Help → Where Is Command, or activate the command line and type where_is, then press Enter.
The command line will prompt with the text Where is command. Enter the command in question. The status line will display the key binding or state that the command is not bound to a key.
In addition to setting options through the graphical interface, you can specify or override some options on the SlickEdit® Core command line for immediate, one-time use. This way, you don't need to constantly open the Options dialog to change an option every time you want to enable or disable it. For example, when using the save or save_as command, you can specify many of the Save File Options, such as Expand tabs to spaces, for just this one operation.
Switches are described in the documentation when the switch is helpful or applicable. To use a switch, type it between the command and file name. Depending on whether you want to enable or disable the option, type a plus (+) or minus (-) sign before the switch character. No matter the default setting, the specified switch will be used.
For example, perhaps you have the Save File Option Expand tabs to spaces set to False. This means that when you save a file, tabs are not expanded to spaces. However, you may want to quickly save a file with tabs expanded. To enable the option just this once, use the save command with the E switch, as follows:
save +E
You can use the SlickEdit® Core command line to start a program. Click on the command line or press Esc to toggle the cursor to the command line. Type the program name and arguments and press Enter. When entering a command that the editor does not recognize as an internal command, a path search is performed to find an external program to execute. To use a program whose name contains space characters, enclose the name in double quotes. For example, "this is" will start a program named this is.exe if it exists.
To get an operating system prompt, type the command dos with no arguments or from the main menu, click Tools → OS Shell.
Many commands that display dialog boxes have equivalent commands that prompt for arguments on the SlickEdit® Core command line. For example, the gui_open command (File → Open or Ctrl+O), which displays the Open file dialog, corresponds to the edit command, which is used to open files via the SlickEdit Core command line. If you frequently use key bindings to open dialogs, a faster method of entering arguments is to use Command Line Prompting. When this feature is enabled, you are prompted on the command line for arguments that you would otherwise select as options on a dialog. For example, instead of displaying the Open file dialog when you press Ctrl+O, the SlickEdit Core command line is invoked, so you can type the name of the file to open and any other desired arguments. To enable Command Line Prompting, from the main menu, select Window → SlickEdit Preferences → Keyboard → Advanced and set the Command line prompting option to True.
The following table contains a partial list of user interface commands and their command line counterparts.
Commands are essentially the names of functions. The Help system contains a list of macro functions, organized into categories (see Help → Help ContentsMacro Functions by Category). The following is a list of commands that we use frequently in our own work, which you may also find useful.
|
1. |
e file |
Edit a file |
|
2. |
sa file |
Save file as |
|
3. |
number |
Go to line number |
|
4. |
f symbol |
Find a symbol |
|
5. |
/ search_string / options |
Search for a string |
|
6. |
c/ search / replace / options |
Replace a string |
|
7. |
gt/ search / options |
Substring search for a symbol |
|
8. |
sb name |
Set a bookmark |
|
9. |
gb name |
Jump to a bookmark |
|
10. |
man command |
Show UNIX man page |
|
11. |
cd directory |
Change directory |
|
12. |
del filename |
Delete file |
|
13. |
pushd directory |
Push directory |
|
14. |
popd |
Pop directory |
|
15. |
set env=value |
Set environment variable |
|
16. |
dos command |
Execute command outside of editor |
|
17. |
math expr |
Evaluate expression |
|
18. |
eclipse_open_resource |
Opens the Eclipse Open Resource dialog. |
|
19. |
eclipse_next_view |
Cycles forward through the Eclipse view menu. |
|
20. |
eclipse_maximize_part |
Toggles maximization of the active editor or view. |
|
21. |
eclipse_show_outline |
Activates the Outline view. |