DOS Lesson 14: The EDIT Applet

The EDIT program that comes with DOS looks like another external
DOS command, but in this case it is more appropriate to call it an Applet.
An applet is the name given to a small, limited application. In this case, EDIT is an ASCII text editor. It is a handy application, composed of EDIT.COM (the application itself), and EDIT.HLP, which contains all of the Help files. Also, EDIT is a BASIC program, so you need to have QBASIC.EXE available as well if you want to run it. This is not a problem if you are running EDIT from a hard drive where you have installed DOS, but if you want to run it from a floppy disk, such as an emergency utilities disk, you need to remember to place QBASIC.EXE on the same floppy as EDIT.COM.

Why use EDIT?

EDIT is a very basic text editor. You would not use it for writing
a novel, or for desktop publishing. But it is a very handy little program for
two major uses in DOS. The first is for editing DOS configuration files. The
two files most commonly edited this way are CONFIG.SYS and  AUTOEXEC.BAT. The second common use for EDIT is to create or edit batch files. Batch files are files that contain DOS commands which are executed in order whenever the batch file is run. We will cover both of these topics in future installments, but first it is useful to learn a little about the tool we will be using.

How to use EDIT

From the command prompt, simply type the command EDIT.


This will open EDIT, and you will see a screen that says “Welcome
to the MS-DOS Editor.” Under this is an option that says <Press Enter
to see the Survival Guide>. This brings up a one screen summary of how to
get around in EDIT. It turns out that this involves some keyboard commands that carry over to Windows as well, so learning this can pay dividends in the future. Someday you may actually need to know how to navigate Windows without a mouse, and knowing these keyboard equivalents will pay off.

On top of your screen is the Menu Bar. This has the following
Menus, which should be familiar to anyone who has used Windows, since the menus are very similar. You have File, Edit, Search, Options, and Help. Pressing the ALT key activates the Menu Bar. The first letter of each menu is now shown in White to indicate the “hot” letter you can use to activate that menu. The FILE menu is already highlighted in a black box. If you hit “enter”, that menu will open down. If any menu choice is highlighted, you can hit enter to select that menu choice. You can use the arrow buttons. The down and up arrows move up and down within a menu, and the right and left arrows move from one menu to the next. Note that each menu has many options that also have “hot” letters, or some other keyboard shortcut. “Hot” letters work by holding down the ALT key while pressing that letter. So, if you are working on a file, and want to check the HELP system, you just hold down the ALT key and press “H”, and that menu will open. In Windows, it works just the same, except there the “hot” letters are underlined.

If you look at the bottom of the screen you see some other keyboard
shortcuts. The first one is also for the Help system, which you can get to by
pressing F1. That is not two keys, but refers instead to the “function keys” at the top of the keyboard. Pressing F1 for help is another semi-standard in the Windows world. Not all programs follow this practice, but most do. So if you are ever at a loss in any program, press F1 and see what happens.

At this point, you know at least three ways to get to the Help system, and two ways to get to any menu option. With a little practice you can
get around quite easily in EDIT.

If you open the EDIT application as we did above, you will see that you are working on an “Untitled” document. The moment you save the document (ALT+F, S), you will see the title change to the name of your document. The SAVE dialog window allows you to create the name. (Be sure that it is no
more than 8 characters, and no more than 3 letters for the extension. This is
DOS!) You can also choose which directory or drive you want to save it to,
and once you have everything right you need to select OK (or if you change your mind, select Cancel). To navigate from one element to the next on this screen, you use the TAB key.

You can also include a file name as an argument in the EDIT command.
If the file already exists, EDIT will open that file. If it does not already
exist, EDIT assumes you are creating a new file with this name, and opens a
blank screen ready for you to start typing.

EDIT’s capabilities

EDIT is a fairly primitive application, but it does have some good basic capabilities. From the Edit menu, you can do Cut, Copy, and Paste in your files. And from the Search menu you can Find a text string, and even
Change it to something else when you find it. In the Options menu you will find that you can the default color scheme, in case white text on a blue background disagrees with you.

EDIT with a mouse

It is possible to use a mouse with EDIT. Remember, though, that is DOS, and in DOS you have to load the mouse driver yourself before you can use a mouse. In many of the cases where you will want to use EDIT you will not
have a mouse driver installed, and I have therefore focused on using a keyboard. In the long run, you will be happier mastering keyboard navigation, and using the ALT key, the arrow keys, and the TAB key will become second nature. And if you ever do find yourself trying to navigate in Windows with a mouse, these skills come in handy. Many times I have seen people completely stymied by a situation where a program window has somehow moved to the point where all of the control buttons are “off” the screen. So there is nothing for the mouse to click on. I sit at the  keyboard, hit a few keys , and everyone says “How did you do that?” Definitely cool.

 Save as PDF