🚨 Oracle not porting Rdb to x86 and EOL on Itanium 12/2027 🚨

The EDT Editor,
Rebuilt for Modern Systems

Faithful DEC OpenVMS EDT for Linux and macOS: drop-in commands, ncurses screen mode, GOLD keypad, and extensions — migrated apps keep running without retraining.
edit source.cob
$ edit source.cob
EDIT/EDT source.cob
1  IDENTIFICATION DIVISION.
* FIND "PROCEDURE"
4  PROCEDURE DIVISION.
* SUBSTITUTE/GLOBAL "SECTION" "BLOCK"
3 substitutions
* DEFINE MACRO TIDY AS "TOP; FIND TODO; SUBSTITUTE DONE"
* TIDY
Substituted
* EXIT
source.cob written — 312 lines
Capabilities

Everything EDT, and more

VX/EDT implements the full OpenVMS EDT command set plus modern extensions for case-insensitive search, global substitution, redo, paragraph fill, and direct printer output.

🖥️

Line & Screen Modes

Starts in EDT line mode with the familiar * prompt. CHANGE enters full ncurses screen mode with GOLD-key keypad emulation. Ctrl/Z returns to line mode at any time.

🔍

Stateful Search

FIND sets the active search string. FNDNXT repeats in the current direction. ADVANCE and BACKUP control direction. Case-sensitive or general search via SET SEARCH.

♻️

Unlimited Undo & Redo

100-level undo stack captures complete editor state — buffers, cursor, direction, selection, and delete buffers. Full redo stack is built on every undo; cleared on any new mutating command.

📋

Named Buffers

The PASTE buffer provides clipboard functionality. User-named buffers (FIND =TEMP) hold arbitrary text. COPY, MOVE, and CLEAR manage content between buffers.

⌨️

Key & Macro Definitions

Redefine any PF key, GOLD+key, or Ctrl key combination with DEFINE KEY. Chain commands into named macros with DEFINE MACRO. Loaded automatically from EDT.INI.

🛠️

Modern Extensions

Global substitute with /GLOBAL, per-match confirmation with /QUERY, paragraph reformat with FILL, line printer output with PRINT, overstrike mode, and horizontal scroll.

Reference

Line-Mode Command Reference

All commands are case-insensitive. Qualifiers (/QUERY, /GLOBAL, /NOTYPE, /BRIEF, /SAVE) may be appended to any command before or after its arguments.

Display TYPE

CommandDescription
TYPE or TDisplay current line
TYPE nDisplay line n
TYPE a THRU bDisplay lines a through b (also a:b)
TYPE RESTDisplay from cursor to end of buffer
TYPE WHOLE or TYPE ALLDisplay entire buffer
TYPE BEGIN THRU ENDSymbolic first/last line references
TYPE . or TYPE CURRENTDisplay current line (dot notation)
TYPE .../NOTYPEExecute silently — suppresses all output

Range tokens: BEGIN / FIRST / START = first line  ·  END / LAST = last line  ·  . / CURRENT = cursor line

Navigation

CommandDescription
nMove cursor to line n (bare number, 1-based, clamped to file length)
TOPMove to first line of buffer
BOTTOMMove to last line of buffer
ADVANCE or ADVSet search / move direction forward
BACKUP or BACKSet search / move direction backward

Substitute SUBSTITUTE · SUBS

Active search string must be set with FIND before substituting. The replacement defaults to the contents of the PASTE buffer when omitted.
CommandDescription
SUBSTITUTE replacementReplace next occurrence of search string; advance to following match
SUBSTITUTEReplace next match using PASTE buffer as replacement
SUBSTITUTE ALL replacementReplace every occurrence in the entire buffer; prints count
SUBSTITUTE/GLOBAL replacementSynonym for SUBSTITUTE ALL
SUBSTITUTE/QUERY replacementPrompt Y/N before each replacement
SUBSTITUTE/GLOBAL/QUERY replReplace all, confirming each match interactively
SUBSTITUTE NEXTSynonym for plain SUBSTITUTE (advance to next after replacing)

Insert & Fill

CommandDescription
INSERT text or I textInsert text at current cursor position
INSERT "text with spaces"Quoted insertion preserves leading/trailing spaces
FILLReformat the paragraph at the cursor (or selected lines) to fit the current terminal width. Words are joined and rewrapped.
SET OVERSTRIKE / SET OVERTYPESwitch to overwrite mode — typed characters replace rather than insert
SET INSERT / SET NOOVERSTRIKEReturn to insert mode (default)

Delete

CommandDescription
DELETE or DDelete current line
DELETE nDelete line n
DELETE a THRU bDelete a range of lines
DELETE RESTDelete from cursor to end of buffer
DEL L / DL / DELETE LINEDelete current line (or selected range)
DEL C / DC / DELETE CHARACTERDelete character at cursor; saved to character delete buffer
DEL W / DW / DELETE WORDDelete word forward from cursor; saved to word delete buffer
DEL EOL / DELETE EOLDelete from cursor to end of line; saved to PASTE buffer
UND L / UNDELETE LINERestore last deleted line
UND C / UNDELETE CHARACTERRestore last deleted character
UND W / UNDELETE WORDRestore last deleted word

Select, Cut & Paste

CommandDescription
SELECT or SELAnchor the select range at the current line
CUTMove current line (or selected range) to PASTE buffer
APPENDAppend current line (or selected range) to PASTE buffer without clearing it
PASTEInsert contents of PASTE buffer at cursor
REPLACEReplace current line (or selected range) with PASTE buffer
RESETCancel select range and reset direction to ADVANCE

Undo & Redo

CommandDescription
UNDO or URestore editor state to before the last text-modifying command. Up to 100 levels. Pushes current state onto the redo stack.
REDORe-apply the last undone change. Cleared when any mutating command is executed.

Undo/Redo captures: buffer contents, all named buffers, cursor position, direction, select anchor, active search string, and all delete buffers.

Buffer Management

CommandDescription
SHOW BUFFER / SHOW BUFFERSList all buffers with line counts and modification flags
FIND =NAMESwitch to named buffer (created on first access). Special names: =MAIN, =PASTE
COPY range TO =NAMECopy lines to a named buffer (non-destructive)
COPY WHOLE TO =NAMECopy entire buffer
MOVE range TO =NAMEMove lines to a named buffer (removes from source)
CLEAR NAMEClear and delete a named buffer
CLEARClear the current buffer

File I/O

CommandDescription
INCLUDE filenameInsert the contents of an external file at the cursor position
WRITE filenameWrite the current buffer to filename
WRITE file BUFFER NAMEWrite a named buffer to a file
PRINTSend the entire buffer to the system printer (lpr / lp)
PRINT rangePrint a specific range of lines

Display & Search Settings

CommandDescription
SET NUMBERS / SET NUMBEREnable line numbers in screen mode
SET NONUMBERS / SET NONUMBERDisable line numbers
SHOW NUMBERSReport current line-number setting
SET SEARCH EXACTCase-sensitive search (default)
SET SEARCH GENERALCase-insensitive search
SET MODE CHANGEEnter screen mode (synonym for CHANGE)
SET MODE LINEReturn to line mode (no-op if already in line mode)
SET OVERSTRIKECharacters typed replace rather than insert
SET INSERTCharacters typed insert at cursor (default)

Macros & Key Definitions

CommandDescription
DEFINE KEY key AS "cmd"Bind a key to a line-mode command
DEFINE KEY GOLD key AS "cmd"Bind a GOLD+key combination
DEFINE KEY CONTROL x AS "cmd"Bind a Ctrl+key combination (also CTRL)
DEFINE KEY PF3 AS "FNDNXT"Example: rebind PF3 (also PF1–PF4, F1–F4)
DEFINE MACRO NAME AS "cmd; cmd; ..."Define a named macro — semicolons separate commands
SHOW MACRO / SHOW MACROSList all defined macros
SHOW MACRO NAMEShow the definition of a specific macro
MACRONAMEExecute any defined macro by name at the * prompt

Exit

CommandDescription
EXIT or EXSave the file and exit (exit code 0)
QUIT or QExit without saving (exit code 1)
HELP or HDisplay line-mode command reference
CHANGE or CEnter screen mode
Qualifiers

Command Qualifiers

Qualifiers may be placed anywhere in a command — on the verb or after the arguments — and multiple qualifiers can be combined.

Example: SUBSTITUTE/GLOBAL/QUERY "new text"    or    TYPE WHOLE/NOTYPE

/QUERY
Prompt Y/N before each SUBSTITUTE replacement
/GLOBAL
Apply SUBSTITUTE to all occurrences in the buffer
/NOTYPE
Suppress all output for this command
/BRIEF
Use terse output format (recognised, reserved for future use)
/SAVE
Auto-save the file after this command completes
Screen Mode

Keypad & Screen Mode Reference

Enter screen mode with CHANGE or C. Return to line mode with Ctrl/Z. The GOLD key is F1 / PF1 — on MacBook, use fnF1, or hold fn then tap F1.

PF Keys
KeyAction
F1 / PF1GOLD prefix — next key becomes GOLD+key
F2 / PF2HELP screen
F3 / PF3FNDNXT — repeat last search
F4 / PF4Delete current line
GOLD+F2BOTTOM — jump to last line
GOLD+F3FIND prompt — type new search string
GOLD+F4Undelete line (UND L)
Cursor Movement
KeyAction
Arrow keysMove one position in each direction
HomeBeginning of current line
EndEnd of current line
GOLD+TOP — first line
GOLD+BOTTOM — last line
GOLD+Shift current line left (delete leading space)
GOLD+Shift current line right (insert leading space)
Ctrl Keys
KeyAction
Ctrl/AToggle insert / overstrike mode
Ctrl/BMove to beginning of line
Ctrl/EMove to end of line
Ctrl/FFNDNXT (repeat last search)
Ctrl/KDelete to end of line (DEL EOL)
Ctrl/TToggle case of character at cursor
Ctrl/UDelete to beginning of line (saved to PASTE)
Ctrl/W / Ctrl/L / Ctrl/RRefresh / redraw screen
Ctrl/ZReturn to line command mode
BackspaceDelete character to the left
DeleteDelete character at cursor (DEL C)
ReturnSplit line / insert newline
Numeric Keypad
KeyNormal
Kp 0LINE — move to next/previous line start
Kp 1WORD — move one word in current direction
Kp 2EOL — move to end of line
Kp 3CHAR — move one character
Kp 4Set direction ADVANCE
Kp 5Set direction BACKUP
Kp 6CUT to PASTE buffer
Kp 7PAGE — page down one screen
Kp 8SECTION — move 16 lines
Kp 9APPEND to PASTE buffer
Kp .SELECT — set range anchor
Kp -DEL W — delete word forward
Kp ,DEL C — delete character at cursor
GOLD + Keypad
KeyAction
GOLD+Kp 0Open line (insert blank line above)
GOLD+Kp 1Toggle case of character at cursor
GOLD+Kp 2DEL EOL — delete to end of line
GOLD+Kp 3Insert literal text (prompt)
GOLD+Kp 4BOTTOM
GOLD+Kp 5TOP
GOLD+Kp 6PASTE — insert PASTE buffer at cursor
GOLD+Kp 7Command prompt — enter any line-mode command
GOLD+Kp 8FILL — reformat paragraph to terminal width
GOLD+Kp 9REPLACE line(s) with PASTE buffer
GOLD+Kp .RESET — cancel select, reset direction
GOLD+Kp -UND W — undelete word
GOLD+Kp ,UND C — undelete character
GOLD + Letter Keys
KeyAction
GOLD+QQUIT without saving
GOLD+NToggle line numbers on/off
Additional GOLD+letter bindings can be defined with DEFINE KEY GOLD x AS "command" in EDT.INI or at the * prompt.
Configuration

Startup & Configuration

VX/EDT reads a personal configuration file at startup and accepts a command file on the command line for non-interactive batch use.

Invocation

SyntaxDescription
edit file.txtOpen file in interactive line mode
edit file -command cmds.edtRun commands from file, then enter interactive mode
edit file -command=cmds.edtAlternate = syntax

EDT.INI Startup File

Location (checked in order)
$EDT_INI environment variable path
$HOME/EDT.INI
$HOME/edt.ini
Lines beginning with !, #, or ; are comments and are silently ignored — in both EDT.INI and -command files.

Example EDT.INI

~/EDT.INI
! EDT personal configuration
SET SEARCH GENERAL
SET NUMBERS

DEFINE KEY GOLD Q AS "QUIT"
DEFINE KEY GOLD E AS "EXIT"
DEFINE KEY GOLD F AS "FIND"
DEFINE KEY GOLD S AS "SUBSTITUTE"
DEFINE KEY CONTROL P AS "PASTE"

DEFINE MACRO HEADER AS "TOP; INSERT // Generated"
DEFINE MACRO TIDY AS "SET NUMBERS; TYPE WHOLE"
DEFINE MACRO FIXALL AS "TOP; FIND TODO; SUBSTITUTE/GLOBAL DONE"

VX_TTY — Xcode / Debugger I/O Redirect

Environment VariableDescription
VX_TTY=/dev/ttys003Redirect all editor I/O (line mode prompts, screen mode ncurses rendering) to the specified terminal device. Allows running VX/EDT under Xcode or lldb while displaying in a separate Terminal window.
To use: open a Terminal window, run tty to get its device path (e.g. /dev/ttys003), then set VX_TTY=/dev/ttys003 in your Xcode scheme's Environment Variables. Also set TERM=xterm-256color.
Build

Building VX/EDT

Single-file C++17 source. Requires ncurses (standard on macOS and most Linux distributions).

macOS / Clang
clang++ -std=c++17 -Wall -O2 \
  edt.cpp -lncurses -o edt
Linux / GCC
g++ -std=c++17 -Wall -O2 \
  edt.cpp -lncurses -o edt

Requirements

  • C++17 or later
  • ncurses or ncursesw
  • POSIX — macOS 12+, Linux glibc 2.17+
  • No external runtime dependencies
  • lpr or lp for PRINT command (optional)

Frequently Asked Questions

Curious about how Sector7 can facilitate your application migration? Explore our FAQs for expert insights.

What is VX/EDT and when would I use it?

VX/EDT is Sector7’s faithful reimplementation of the DEC OpenVMS EDT editor for Linux and macOS. It preserves familiar line-mode commands, ncurses screen mode, GOLD-key keypad behaviour, and common qualifiers so teams moving off OpenVMS can keep the same editing workflow on POSIX systems.

For the broader platform picture—languages, runtimes, and production cutover—see Sector7’s overview of OpenVMS to Linux and UNIX migration and the technical tools directory.

Do OpenVMS EDT line-mode commands work the same way in VX/EDT?

Yes. VX/EDT is built around a drop-in compatible command set: navigation, FIND / FNDNXT, SUBSTITUTE with qualifiers such as /GLOBAL and /QUERY, buffer operations, INCLUDE / WRITE, and the usual range syntax (THRU, WHOLE, REST, and so on). Commands remain case-insensitive, matching OpenVMS EDT expectations.

Enter full-screen editing with CHANGE or C; return to the asterisk prompt with Ctrl/Z. The on-page command reference summarises behaviour for quick lookup.

How does the GOLD key work on a PC or Mac keyboard?

On OpenVMS terminals, GOLD is typically F1 / PF1. VX/EDT follows the same model: press GOLD, then the second key (for example GOLD+F2 for BOTTOM, or GOLD plus keypad keys in screen mode).

On laptops without a dedicated function row, use Fn with F1 as needed. The Screen Mode section on this page lists PF keys, cursor GOLD combinations, Ctrl keys, and GOLD+keypad bindings for day-to-day reference.

Where does VX/EDT read EDT.INI from?

At startup VX/EDT checks, in order: the path in the $EDT_INI environment variable (if set), then $HOME/EDT.INI, then $HOME/edt.ini. Lines beginning with !, #, or ; are treated as comments—in both EDT.INI and -command script files.

Use DEFINE KEY and DEFINE MACRO entries to persist PF-key, GOLD, and Ctrl bindings across sessions. The Startup & Configuration section documents invocation flags and a sample EDT.INI.

Can VX/EDT run from a command file or non-interactive workflow?

Yes. Launch with edit <file> -command <script> (or the -command=<script> form) to execute a sequence of EDT commands—useful for scripted edits, repeatable migration steps, or CI-style checks alongside other tooling.

For larger automation and assessment across a codebase, many teams pair editor workflows with LegacyScan and Sector7’s broader toolset bundles.

How do undo and redo work in VX/EDT?

UNDO (U) restores the editor to the state before the last text-changing command, with up to 100 levels of history. Each undo pushes the current state onto a redo stack so REDO can re-apply the last undone change.

Captured state includes buffer contents, named buffers, cursor position, direction, selection anchor, active search string, and delete buffers—mirroring the depth teams expect from OpenVMS EDT-style editing.

What is required to build VX/EDT from source?

VX/EDT ships as a single-file C++17 source module linked against ncurses (available by default on macOS and typical Linux distributions). A POSIX toolchain—clang++ or g++—is sufficient; there are no additional runtime dependencies beyond the OS curses library.

The optional PRINT command expects a working lpr or lp line-printer interface when used. Exact compiler examples appear in the Building VX/EDT section on this page.

Where can I get help with a larger OpenVMS migration beyond the editor?

VX/EDT removes a common friction point—keeping the EDT editing experience on modern platforms—but most production moves also involve languages, system services, databases, and operational cutover. Sector7 has delivered large-scale OpenVMS migrations since the 1980s using proprietary converters and proven methodology.

Explore migration services (including the assessment process and zero code freeze approach), browse the VX/TOOLS technical catalog, and contact us to discuss scope, timelines, and tooling fit.

Transform Your Legacy Software Today!

Get In Touch
Unlock the potential of your legacy software with our expert migration services.