HomePage |
RecentChanges |
EditorIndex |
TextEditorFamilies |
Preferences
Showing revision 5There are a couple of popular approaches to the command line language that any given editor can use.
- EmacsFamily uses M-x followed by an interactive function name. Arguments/parameters are specified separately. Essentially, the function is tagged with what argument types are required and the editor prompts as required.
- ViFamily editors use the ':' (aka colon) command to allow an "ex-language" command to be specified. This includes any arguments or parameters.
- IbmEditorFamily editors such as XEDIT are similar to VI in that they execute commands on the command line. A slight difference exists in that
- the command line is always present on screen
- there is a predefined order in which commands are found (a "path" if you will). First macros, then external programs, then finally intrinsics/built-ins.
- In XEDIT you can use a prefix such as "CMS" to indicate that you specifically want an external CMS command to run. Initially, a string that is not recognized as an XEDIT command is passed to CMS for processing. This behaviour may be overridden with set impcmscp off (set implicit cms/cp on|off), which causes the editor to complain instead.
- To ensure that a statement is processed as an XEDIT command, precede it with command</>; this will bypass an identically named macro. To ensure that a statement is processed as a macro, precede it with <tt>macro. (This is necessary if a macro's name contains numeric characters.)
- One or more question marks (?) act as a history recall command to retrieve the nth (n question marks) previous command sequence onto the command line for review.
- One or more equal signs (=) cause the last command sequence to be re-executed n times.
- Prefixing a command sequence with ampersand (&) leaves it on the command line after execution.
Both the IbmEditorFamily and ViFamily allow you to type operating system command lines and have them interpreted appropriately.
Note: Just because a command has been executed from the command line doesn't mean that it can't be interactive.