Linux 12 min read

JOE Editor: Classic Terminal Editing with WordStar

Suresh S Suresh S
JOE Editor: Classic Terminal Editing with WordStar

In the modern landscape of Linux text editors, the community is largely polarized. On one side, you have the modal purists who swear by Vim or Neovim. On the other side, you have the Lisp hackers who live their entire lives inside Emacs. For beginners who find both of those options terrifying, there is Nano—a simple, user-friendly editor that is undeniably easy to use but severely lacks advanced features.

But what if you want something that sits perfectly in the middle? What if you want an editor that boots instantly, requires no complex configuration files, but still offers advanced features like vertical window splits, regular expression search, and keyboard macros?

Enter JOE (Joe’s Own Editor).

Created by Joseph Allen in 1992, JOE is a remarkably robust terminal-based text editor that brings the legendary keybinding scheme of the 1980s word processor WordStar to modern Linux and Unix systems. It is the ultimate “Goldilocks” editor for system administrators who want power without a paradigm shift.


1. The WordStar Legacy: Why Keybindings Matter

To truly appreciate JOE, you must understand the history of the keybindings it uses.

In the late 1970s and early 1980s, the dominant word processor for the CP/M operating system (and later MS-DOS) was WordStar. During this era, many computer keyboards did not have dedicated arrow keys. To navigate a document, users had to keep their hands firmly on the home row of the keyboard.

WordStar solved this by inventing the “Cursor Diamond.” By holding down the Control (Ctrl) key and pressing the keys S, D, E, and X, the user could move the cursor left, right, up, and down.

This layout became so profoundly ingrained in the muscle memory of an entire generation of writers and programmers that many refused to use anything else. (Fun fact: George R.R. Martin famously wrote the entire ‘A Song of Ice and Fire’ series using a DOS machine running WordStar 4.0 because of his attachment to this exact interface).

JOE perfectly preserves this legendary WordStar layout, allowing veteran users to navigate massive configuration files at blistering speeds without ever moving their hands to the arrow keys.


2. Installation and The Multi-Personality Architecture

JOE has been a staple in Linux repositories for three decades. Installing it is trivial on any system.

Debian / Ubuntu / Pop!_OS:

sudo apt update
sudo apt install joe

Fedora / RHEL:

sudo dnf install joe

Arch Linux:

sudo pacman -S joe

The Emulation Modes

One of the most unique architectural features of JOE is that it is essentially a chameleon. By invoking the editor using different command names, it will read different configuration files and emulate entirely different text editors:

  • joe: The standard editor using default WordStar-inspired bindings.
  • jstar: A pure, strict WordStar emulator.
  • jmacs: Reconfigures the keybindings to emulate GNU Emacs (perfect if you want Emacs bindings without installing a massive Lisp machine).
  • jpico: Reconfigures the editor to perfectly emulate Pico (the predecessor to Nano), providing a highly simplified interface for absolute beginners.
  • rjoe: “Restricted JOE” – allows the user to edit a specific file but prevents them from executing shell commands or opening other files on the system (useful for restricted administrative accounts).

3. Navigating the Interface and The Help Menu

When you launch JOE by typing joe filename.txt, you are presented with a very clean interface. There is a simple status bar at the top of the screen displaying the file name, your line number, and the current time.

Unlike Vim, JOE is modeless. You do not need to press i to insert text. You simply start typing, and the text appears on the screen.

The Most Important Shortcut: Ctrl+K H

If you forget every other shortcut in this guide, remember this one.

In JOE, almost all complex commands begin with the prefix Ctrl+K. To open the Help Menu, press Ctrl+K, release both keys, and then press H.

A remarkably well-designed, contextual help menu will drop down from the top of the screen. It is organized into logical blocks, showing you exactly how to navigate, search, format text, and manage windows. You can leave the help menu open while you type, or press Ctrl+K H again to dismiss it.

The Cursor Diamond Navigation

While arrow keys work perfectly fine, true JOE mastery involves the WordStar diamond:

  • Ctrl+S: Move cursor left.

  • Ctrl+D: Move cursor right.

  • Ctrl+E: Move cursor up.

  • Ctrl+X: Move cursor down.

  • Ctrl+A: Jump to the beginning of the word.

  • Ctrl+F: Jump to the end of the word.

  • Ctrl+U: Page Up (scroll up an entire screen).

  • Ctrl+V: Page Down (scroll down an entire screen).


4. Essential File Operations

Because JOE is modeless, you use Ctrl+K chords to perform file management tasks.

Saving and Quitting

  • Ctrl+K D: Save (Write) the current file to disk.
  • Ctrl+K X: Save the file and instantly Exit the editor.
  • Ctrl+C: Abort/Exit. If you have unsaved changes, JOE will safely pause and ask you to confirm if you want to discard them.

Block Operations (Copy, Cut, Paste)

Modern graphical editors use the concept of “highlighting” text with a mouse. Vim uses “Visual Mode.” JOE uses the classic concept of “Marking Blocks.”

To copy or cut a paragraph of text:

  1. Move your cursor to the very beginning of the text you want to select.
  2. Press Ctrl+K B (Begin Block).
  3. Move your cursor to the very end of the text.
  4. Press Ctrl+K K (K-End Block). The text between the two points will now be visually highlighted.

Now you can act upon the block:

  • Ctrl+K C: Copy the block to your current cursor position.
  • Ctrl+K Y: Delete (Cut) the highlighted block entirely.
  • Ctrl+K W: Write the highlighted block out to a brand new file on your hard drive.

5. Deep Dive: Configuring JOE (joerc Internals)

Out of the box, JOE works exceptionally well. However, power users will want to customize keymaps, automatic indentation, default tab sizes, and color themes. JOE stores its configuration in a file called joerc.

Customizing the joerc File

When JOE starts, it searches for a configuration file in the following order:

  1. ~/.joerc (user-specific configuration)
  2. /etc/joe/joerc (system-wide default)

To customize JOE, copy the system-wide configuration file into your home directory:

cp /etc/joe/joerc ~/.joerc

Open ~/.joerc in JOE. The file is heavily commented and structured. Here is a breakdown of the key directives you can modify:

Basic Behavior Flags

You can enable or disable features by toggling their flags (e.g., prefixing them with a hyphen - to disable, or omitting the hyphen to enable).

-nonotice          # Suppress the introductory startup notice
-backups           # Automatically create backup files (e.g., filename.txt~)
-autoindent        # Enable automatic indentation on new lines
-spaces            # Insert spaces instead of tabs when pressing Tab key
-tab 4             # Set the default tab stop width to 4 characters
-margin 80         # Set the right margin margin for text-wrapping

Customizing the Status Bar

The status bar can be formatted using specific format string escapes. Search for the lstatus directive in your .joerc. Here is a custom format that displays the filename, current line, column, percentage through the file, and active modes:

lstatus %f %m %y %L %c %p%
  • %f: Filename
  • %m: Modified flag (* if unsaved)
  • %y: Syntax highlighting language
  • %L: Total lines
  • %c: Current cursor column
  • %p: Percentage position of cursor in the file

6. Writing Custom Syntax Highlighters (.jsf Files)

JOE features a built-in syntax highlighting engine that relies on State-Transition Rules defined in .jsf (JOE Syntax File) format. These files are typically stored in /usr/share/joe/syntax/.

Unlike complex tokenizers or regex parsers, a .jsf file is compiled into a simple, ultra-fast deterministic finite state machine (FSM).

Structure of a .jsf File

A JSF file consists of named states. Each state matches characters and transition rules to decide which color group (e.g., Class, Comment, String) to apply and which state to transition to next.

Let’s write a simple syntax highlighter for a custom configuration format (.conf) that highlights comments (starting with #) and double-quoted strings:

# Custom Highlighter for MyConfig (.jsf)
# Define the colors we will map tokens to
=Idle
=Comment       bold green
=String        yellow
=Keyword       bold blue
=Number        magenta

:idle Idle
    # If we see a '#', transition to comment state
    "#"             comment
    # If we see a double quote, transition to string state
    "\""            string
    # If we see a digit, transition to number state
    "0-9"           number
    # If we see a letter, transition to potential keyword check
    "a-zA-Z"        word            buffer

:comment Comment
    # Keep consuming characters until a newline is found
    "\n"            idle
    *               comment

:string String
    # Escape characters
    "\\"            string_escape
    # Close quote transitions back to idle
    "\""            idle            string
    # Keep consuming string content
    *               string

:string_escape String
    # Skip any character after escape and return to string state
    *               string

:number Number
    "0-9"           number
    *               idle            recolor=-1

:word Idle
    "a-zA-Z0-9_"    word            buffer
    *               idle            strings
        "port"      Keyword
        "host"      Keyword
        "enable"    Keyword
    done

How to Register the New High-Lighter

To make JOE use this custom highlighter for files ending in .conf:

  1. Save the file as myconfig.jsf inside /usr/share/joe/syntax/ or ~/.joe/syntax/.
  2. Open ~/.joerc and search for the FileType section.
  3. Add a binding linking the file extension to the syntax name:
    *conf       myconfig

7. Macros, Multi-file Operations & Automation Pipelines

A major factor separating JOE from basic editors like Nano is its capacity to handle complex multi-file scenarios and pipeline automation directly inside terminal sessions.

Managing Multiple Buffers (Files)

You can open multiple files simultaneously by listing them on the command line:

joe file1.txt file2.txt file3.txt

To manage these buffers:

  • Ctrl+K N: Switch to the next file buffer.
  • Ctrl+K P: Switch to the previous file buffer.
  • Ctrl+K L: Open a prompt to load and open a new file buffer.
  • Ctrl+K E: Edit/switch to a specific buffer by entering its name.

Executing Advanced Macro Pipelines

Let’s walk through a highly practical scenario: You have an XML file, and you need to find every tag <item id="XYZ"> and extract just the raw IDs into a new document.

Here is the exact keystroke pipeline to record and execute this:

  1. Open the file: joe input.xml
  2. Start recording macro: Press Ctrl+K [
  3. Open Find prompt: Ctrl+K F
  4. Search for <item id=" and press Enter.
  5. Move cursor past the quotes: Use Ctrl+F (End of Word) or arrow keys.
  6. Start highlighting: Ctrl+K B (Begin block)
  7. Move cursor to the closing quote.
  8. Stop highlighting: Ctrl+K K (End block)
  9. Append the highlighted ID block to a temporary file: Press Ctrl+K W, type /tmp/extracted_ids.txt and hit Enter. If the file exists, JOE will ask if you want to append. Press A to append.
  10. Move cursor down to the next line to prepare for the next run.
  11. Stop recording: Press Ctrl+K ]

To repeat this automatically, you can now run the macro by pressing Ctrl+K \. You can also execute it a specific number of times (e.g. 50 times) by entering a repeat prefix.


8. Modern Terminals, UTF-8, and TrueColor Setup

By default, JOE is lightweight enough to run on ancient serial terminals. However, if you are running it inside a modern GPU-accelerated terminal emulator (like Alacritty, Kitty, or WezTerm), you can configure JOE to support 24-bit TrueColor and full UTF-8 Unicode characters.

Enabling UTF-8 Support

To ensure that emoji and non-ASCII character sets render correctly, start JOE with the -asis option, or edit your ~/.joerc file to enable it permanently:

-asis              # Allow 8-bit character display (required for UTF-8)

Ensure your shell environment variables are correctly set:

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

Configuring 256-Color and TrueColor Themes

JOE supports 256 colors out of the box, provided your terminal environment reports support. Verify this using:

echo $TERM

If this doesn’t say xterm-256color, add the following to your ~/.bashrc or ~/.zshrc:

export TERM=xterm-256color

Inside your ~/.joerc, you can define custom color palettes using 256-color codes. The syntax is:

ColorGroup foreground background [attributes]

For example, to configure search result highlights to use a bright orange background with black text:

Search black 208 bold

9. JOE Commands & Keybindings Reference Cheatsheet

Here is a comprehensive reference sheet of JOE’s default WordStar-inspired commands.

File Operations & Buffers

KeybindingActionDescription
Ctrl+K DSave / WriteWrites current buffer changes to disk
Ctrl+K XSave and ExitSaves active file and closes editor
Ctrl+CAbortCancels current operation or exits without saving
Ctrl+K ESwitch BufferSwitch to another open file buffer
Ctrl+K NNext BufferSwitch focus to next file in buffer list
Ctrl+K PPrevious BufferSwitch focus to previous file in buffer list

Text Formatting & Blocks

KeybindingActionDescription
Ctrl+K BMark StartMarks the beginning of a text block
Ctrl+K KMark EndMarks the ending of a text block
Ctrl+K CCopy BlockCopies the marked block to the cursor position
Ctrl+K YCut BlockDeletes (cuts) the marked block
Ctrl+K WWrite BlockWrites the marked block to a new file
Ctrl+TFormat ParagraphRe-flows text within margins (great for Markdown)
KeybindingActionDescription
Ctrl+ECursor UpMoves cursor up one line
Ctrl+XCursor DownMoves cursor down one line
Ctrl+SCursor LeftMoves cursor left one character
Ctrl+DCursor RightMoves cursor right one character
Ctrl+ABeginning of WordJumps cursor to start of current word
Ctrl+FEnd of WordJumps cursor to end of current word
Ctrl+K FFind / ReplaceSearch for string patterns or regular expressions
Ctrl+LFind NextRepeats the last search query

10. Conclusion: The Perfect Middle Ground

In 2026, the text editor landscape is more crowded than ever. However, JOE maintains its relevance by occupying a very specific, highly valuable niche.

It is an editor that boots in milliseconds, making it perfect for rapid SSH sessions into remote servers. It does not require you to learn a complex modal paradigm like Vim, nor does it require you to configure a massive Lisp environment like Emacs.

By wrapping powerful features—like macro recording, window splitting, custom JSF syntax highlighters, and block writing—inside an intuitive, easily discoverable interface anchored by a brilliant help menu, JOE proves that good software design is truly timeless. Whether you are a nostalgist craving the WordStar diamond, or a modern sysadmin who simply wants a capable, modeless terminal editor, JOE is an indispensable tool to have in your Linux toolkit.

Frequently Asked Questions (FAQ)

Q: What is the JOE text editor? A: JOE (Joe’s Own Editor) is a classic, terminal-based Linux text editor that offers advanced features like macros and window splitting while utilizing the legendary WordStar keybinding scheme.

Q: Why are WordStar keybindings historically significant? A: In the late 70s and 80s, many keyboards lacked arrow keys, so WordStar invented the “Cursor Diamond” (Ctrl+S, D, E, X) to navigate without moving hands off the home row. This efficient layout became ingrained in the muscle memory of an entire generation of users.

Q: What is JOE’s “Multi-Personality Architecture”? A: JOE can emulate entirely different text editors depending on how it is invoked. For example, running jmacs emulates GNU Emacs, jpico emulates Pico, and jstar acts as a strict WordStar emulator.

Q: Does JOE require you to switch modes to type text like Vim? A: No, JOE is modeless. You do not need to press a key like ‘i’ to enter insert mode; you simply start typing and the text appears on the screen, while commands are executed using Ctrl+K chords.

Q: How do you open the help menu in JOE? A: You can open the contextual help menu at any time by pressing Ctrl+K, releasing both keys, and then pressing H. The menu drops down from the top of the screen and guides you through commands.

Suresh S

Written by Suresh S

Systems Engineer & Tech Educator with 8+ years of experience in Linux Administration, Cloud Computing, and Cybersecurity. Founder of FreeTechLearner, dedicated to creating practical tutorials that help students and professionals build real-world skills.

Share this post:

Discussion

Loading comments...