CommandLine

HomePage | RecentChanges | EditorIndex | TextEditorFamilies | Preferences

Difference (from revision 10 to current revision) (no other diffs)

Changed: 20c20
One of the neatest implementations of commands in a sub-shell I've seen is in the e.com TinyEditor?. e.com implemented macros by letting you bind named batch files to F-Keys (1.bat, 2.bat, etc.) Press the F-Key, and e.com would write the file being edited to a temp file, and run the named bat file in s 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, e.com would read the changed file back in to the editing buffer. This provided an elegant means of extending e.com, by creating batch files to be text filters, performing operations that weren't built into e.com, like sorting lines in a file. Not bad for a 5K editor. --DMcCunney
One of the neatest implementations of commands in a sub-shell I've seen is in the e.com TinyEditor?. e.com implemented macros by letting you bind named batch files to F-Keys (1.bat, 2.bat, etc.) Press the F-Key, and e.com 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, e.com would read the changed file back in to the editing buffer. This provided an elegant means of extending e.com, by creating batch files to be text filters, performing operations that weren't built into e.com, like sorting lines in a file. Not bad for a 5K editor. --DMcCunney

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 e.com TinyEditor?. e.com implemented macros by letting you bind named batch files to F-Keys (1.bat, 2.bat, etc.) Press the F-Key, and e.com 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, e.com would read the changed file back in to the editing buffer. This provided an elegant means of extending e.com, by creating batch files to be text filters, performing operations that weren't built into e.com, like sorting lines in a file. Not bad for a 5K editor. --DMcCunney


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