Jon's Own Editor (JOE)

So, I wrote my own text editor. Not only that, this is about the third implementation of this particular editor (in Modula-2 for DOS, then Modula-2 for Windows, and now Delphi/Pascal for Windows). Why on earth would anyone waste an instant writing a text editor when the world is full of them. Well, read on...

This style of editor was first popularized when the VI (Visual) editor was first created for Unix systems back in the 1970s. This was in an era where full screen editors were rare, and when people still used CRT terminals connected over serial lines. There was no standardization of keyboards (function keys, for example).

My first exposure to VI style editors was when the UCSD Pascal operating system was introduced, back in the 1980s. An enhancement to that editor, called the Advanced System Editor (ASE) added features like macros and persistence of editor meta data between edit sessions. I got used to using that editor and used it for years.

When UCSD bit the dust, I found that I missed ASE. Editors of this type have a number of characteristics that today's editors lack, including:

1) it is possible to do EVERYTHING with these editors without taking your hands off of the home row of the keyboard. No need to hunt around and find the mouse. No need to move to the cursor keys or numeric keypad and back. If you are an expert typist, this is a huge productivity gain.

2) editing using this approach is MUCH faster than any of the standard editors (Notepad, Word, or the various programming editors in the "Studio" IDEs) because of commands not available in other standard editors.

How is this achieved? By using a very non-standard keyboard UI.

With standard editors, if you type "f", an "f" is inserted into the text. With JOE, if you type "f", you start a "Find" operation. By using the alphabetic keys as "command keys", you now have 26 additional "function keys" right at your finger tips. And if you're a touch typist, they are much easier to use accurately than the traditional function keys.

The down side is that in order to enter text, you have to enter a command ("I" or Insert), type the text, and then enter a special command to terminate the text entry. Many/most people find this penalty to be too much to pay. I don't.

Most VI editors, and JOE in particular, allow you to map any command to any key on the keyboard. This ability to customize means that the UI is not frozen, as it is for many other editors. For example, I use -H as a Backspace function (because that is how it was 25 years ago, and my fingers have not forgotten!) and -M as "Enter" (same reason). And I map the cursor keys to a star of Control characters (T, F, G, and V).

One thing I like about writing my own tools is that they can be made to do exactly what I want and need them to do. So, I threw in a [hidden] database that stores attributes for each file you edit. Want "FRED.TXT" to always appear in a small window in the upper left part of the screen, in red, while "ETHYL.TXT" always takes up half the screen, on the right, in green? That's done for you automatically? Want to always start off where you left off? Done.

Then I decided to hide a calculator inside the editor. Put your cursor on a number and press "+", and it is added to an internal accumulator. Combine this with macros (see below), and you can perform calculations on numbers that are in your document. Not quite a spreadsheet, but very handy when you need it.

Ever have two versions of a document and wonder how they differ? Sure, there are programs out there that do this nicely now, but if you edit two files with JOE, it can compare the two and show you the differences on the screen.

There are a variety of tools that other editors lack, like

a) You can move a line over 10 spaces, and then move a block of text over by the same amount. With every other editor, I find myself typing s over and over and over again.

b) You can move a column in the middle of a line over, and then do the same to adjacent lines. This can be particularly helpful when trying to convert a standard DOS/Windows file listing into a more useful format. It is easy to eliminate and adjust columns of text.

c) You can go to the next occurrance of a character with two key strokes. If you go to the next ".", you end up at the end of a sentence. In a programming language, if you go to the next ";", you end up at the end of the next statement.

d) You can not only move around inside the text buffer, but you can control how the text is displayed on the screen. There are commands to put the current line in the middle of the display, or at the top of the display. How often have you searched for a string with an editor and ended up with that string on the last line of the file? That is rarely useful if you want to understand the context of the string that you found. Many editors do it exactly wrong.

e) Many of these commands can be combined. If you type "D", to start deleting text, you can then go to the next "." and delete the rest of the sentence. Or you can Jump to the beginning or end of the file. Or you can jump to a pre-defined "Marker" (or bookmark). All within the Delete command.

e) JOE has macros. I can record arbitrary sequences of text and commands and then execute them. These facilities are not available with the standard editors. Combine this with the other editor functions, and I can have a macro that always finds and puts the found text in the middle of the screen. Flexible.

Anyway. I doubt that anyone else is interested, but here's Joe...

You can download JOE here (1.2 MB). Just unzip the files and put them in a new folder.