We Open Source
A community education resource
5 FreeDOS editors I love
Power up your FreeDOS experience with these text editors.
The FreeDOS Project is a modern, open source implementation of the classic DOS operating system. While DOS pretty much went away with the advent of Windows95 in 1995, FreeDOS continues to carry forward this retrocomputing operating system. I like to use FreeDOS to play fun DOS games, run my favorite DOS applications, and write my own DOS programs.
Whether I’m working on a program source file or editing my system configuration, I need to use a plain text editor. But not all editors are alike. In fact, FreeDOS includes a variety of popular text editors that each fill a particular need.
Try these 5 FreeDOS text editors
Everyone has their own favorite editor, and I have a few favorites that I keep using all the time. Here are 5 editors installed with FreeDOS that I like using the most.
FreeDOS Edit
FreeDOS Edit is a no-frills editor that’s meant to make it easy to modify your files, including editing your system configuration files like FDCONFIG.SYS
or FDAUTO.BAT
. This full-screen editor provides the classic DOS editor feel, with the basic editor features like cut/copy/paste and search/replace:
Read more: Explore the five steps of the FreeDOS boot sequence
One feature I love is the ASCII table, which provides a handy reference to the DOS Extended ASCII characters, such as the line drawing outlines:
FreeDOS Edlin
Edlin is a line editor, so it’s quite different from other editors you have probably used. Edlin is similar to the ed line editor on Linux and Unix systems, where you type commands at a prompt. For example, type the i
(insert) command at the *
prompt to insert new lines in a file; type .
on a line by itself when you’re done adding lines. Use the w
(write) command to save the file, and q
to quit the editor:
I like using Edlin when I want to create a batch file to automate a set of tasks, usually after typing several commands. With Edlin, I can still see the output that came before it, so I can just retype the commands into a new batch file:
Freemacs
If you’re an Emacs fan, you might try the Freemacs editor. Freemacs is a programmable editor that tries very hard to act like GNU Emacs. Freemacs uses the same user interface that you’d see when using GNU Emacs in terminal or curses mode, making it an easy transition for Linux users:
Freemacs supports a variety of edit modes, including one for plain text documentation that supports word wrapping and “reflowing” paragraph text. To reflow a paragraph, type M-q
(that’s the meta or Esc key, followed by the q
key) and Freemacs will balance the lines in your paragraph. Freemacs also supports a C editing mode that makes it easier to edit C-like programs:
When I first used Freemacs in the early 1990s, I wrote a lot of FORTRAN77 programs to analyze data for my physics labs. Freemacs has an excellent for-mode that makes it easy to write FORTRAN77 programs. This highlights any trailing spaces as a purple dot. It also expands tabs to spaces, so you can hit the Tab key at the start of a new line and Freemacs will automatically insert six spaces for you.
If you type numbers at the start of a new line, for-mode indents these line labels for you, right-aligned at column 5 (FORTRAN77 reserves column 6 only for a “continuation” marker). Hit Tab when you’re done with the line label to start typing program statements in column 7.
Fed, the folding editor
Fed is my favorite editor for FreeDOS programming. Fed stands for Folding editor, because it can “fold” a block of code in a source file. This helps to remove distracting code that you don’t need to see right away, even large blocks such as functions. Most of the time, I use this feature to fold or hide #ifdef
statements that don’t apply to the system I’m working on:
That yellow-on-red block isn’t an error in the code, it’s how I’ve defined the colors in Fed so I can see what code I’ve folded. Fed lets you change all the colors in the editor. I prefer to edit my FreeDOS programs with white text on a blue background, with comments in bright blue so they almost “fade away” so they don’t get in my way.
Fed also supports different video modes for editing text. I like to use 25 lines, which is the default text mode, but you can go up to 50 lines if you prefer:
OpenWatcom’s Vi
If you prefer the Vi editor, the FreeDOS distribution includes several Vi-workalike editors, including Elvis and Vim. My favorite is the Vi included with the OpenWatcom C compiler. This is more than just the classic Vi from Unix; OpenWatcom’s Vi supports colors, menus, and tiled windows. It can even apply syntax highlighting colors to the file you are working in:
I usually configure my own startup file to remove the menu but leave the highlighting. This makes my code easier to read:
Install your favorite
FreeDOS includes over fifteen different editors. Try them out and find the one you love!
To install the editors, run the FDIMPLES
package manager program in FreeDOS, then use the arrow keys to navigate to the “Editors” package group and select to install all packages:
More from We Love Open Source
- Explore the five steps of the FreeDOS boot sequence
- A throwback experiment with Linux and Unix
- Looking ahead to 30 years of FreeDOS
- Getting started with Llamafile tutorial
- Technology history: Where Unix came from
The opinions expressed on this website are those of each author, not of the author's employer or All Things Open/We Love Open Source.