Ferenc Nagy I had the task to install programs on the computers connected to our database within the institute in the early 1990-s. It meant tapering the the CONFIG.SYS and AUTOEXEC.BAT. That time the built-in editors of the DOS were very user-unfriendly.
Turbo Prolog, however, offered the very smart edit predicate opening an editor window. This window could open auxiliary editor window. The handling of the edited text wase based on pairs of function keys or three of them. Like copy block [Ctrl-F5]at block start[Ctrl-F5]at its end[Ctrl-F5]at its new place; search and replace [F4]sought text[F4]replacement[F4]. The above function keys allow that the sought text and the replacement contain newline characters. (If you press enter then a triangle appears in them and you can define line groups to change.) The English help screens are embedded in the edit predicate. The Hungarian help file is available on my homepage. See the whole stuff at http://franknagy.atw.hu/Tipp/Proledit/index.html. Main screen of the program on my homepage containing links to the executable program and sample screens.
There you can see that the program starts with color selection for directory and edited file. Its command line parameter is a file name or wildcard mask for initial file selection. The mask can be changed by F4. F10 saves the edited file. In case of pressing Esc a question appears: "File has been changed. Quit anyway (y/n)?"