HomePage | RecentChanges | EditorIndex | TextEditorFamilies | Preferences

A command line is an essential feature for a text editor because quite often there are too many commands to bind to keys and there may be parameters to pass to the command that are not easy to pass by keystrokes.

NealStephenson? said it best [In the Beginning...]

The existance of a command line is a key feature of powerful text editors.

Command lines are used in the ViFamily, EmacsFamily, IbmEditorFamily, and others.

Also most editors that do have a commandline have an escape, usually the bang ('!') that allows one to execute system commands. Thus giving the editor a basic Shell feature.

An alternative is the ability to "filter" a buffer of text with a command. That command could be either a built-in, a macro, or a Shell command. In VI, this is the '|' pipe character's function on the CommandLine.

Perhaps we should distinguish between a command line and a shell escape?

For instance, editors in the IBMEditorFamily? like T, cse, or X2 have an actual command line on the screen interface. Editors like Vi provide a means to execute a command in a sub-shell (via ":!<command>") but don't have a command line per se.

One of the neatest implementations of commands in a sub-shell I've seen is in the TinyEditor?. implemented macros by letting you bind named batch files to F-Keys (1.bat, 2.bat, etc.) Press the F-Key, and would write the file being edited to a temp file, and run the named bat file in a sub-shell, passing it the temp file name. The bat file would run, performing the defined operations in the bat file on the temp file. When the bat file exited, would read the changed file back in to the editing buffer. This provided an elegant means of extending, by creating batch files to be text filters, performing operations that weren't built into, like sorting lines in a file. Not bad for a 5K editor. --DMcCunney

HomePage | RecentChanges | EditorIndex | TextEditorFamilies | Preferences
Edit text of this page | View other revisions
Last edited May 3, 2008 9:02 pm (diff)