Overview
QEdit, from SemWare, was the editor a lot of us lived in under DOS: instant to start, white text on a blue screen, and every command a keystroke away. KooperEdit (ke) brings that editor to the modern terminal. It keeps the look, the pull-down menus, the QEdit and WordStar keys, line, column and character blocks, keyboard macros and split windows.
It also adds what a modern editor should have:
- an optional VS Code keyboard layout, with Shift+arrow selection and
Ctrl-C/X/V/Z; - mouse support, including a right-click menu;
- a built-in file explorer;
- JavaScript scripting for automation and customisation;
- a script workspace: a split screen where you write JavaScript that cleans up or converts the document beside it, with an output pane.
ke notes.txt # edit a file (a new one if it doesn't exist)
ke '*.go' # quoted: open the file explorer showing Go files
ke src/ # open the file explorer in src/
ke +120 main.go # start at line 120
ke --keys vscode # use the VS Code layout (remembered)
ke -s fix.js data # run a JavaScript file after loadingPress Esc (QEdit layout) or F10 (VS Code layout) for the menus, and F1 for help (in the VS Code layout F1 is the command palette). The version is on the opening screen and in Help → About, and Help → What's new lists the changes in each release.
Download
KooperEdit 1.0.0 — First Release · v1.0.0 · released 4 December 2026 · release notes · all releases
| macOS | Intel 4.3 MB Apple silicon 4.0 MB |
|---|---|
| Linux | x86-64 4.3 MB ARM64 3.9 MB |
| Windows | x86-64 4.4 MB |
| FreeBSD | x86-64 4.2 MB |
Unpack the archive and put ke (ke.exe on Windows) somewhere on your PATH. SHA256SUMS has the checksum of every file: sha256sum -c SHA256SUMS --ignore-missing (shasum -a 256 -c on macOS).
The binaries aren't signed, so macOS may refuse to open one downloaded with a browser: allow it under System Settings → Privacy & Security, or run xattr -d com.apple.quarantine ke. On Windows, SmartScreen may ask you to choose More info → Run anyway.
go install github.com/colboycolinmeeks/kooperedit/cmd/ke@latestScreenshots
File Block Text Search Window Macro Script Print Misc Quit Help 1 # T╔═════════════════════════════════╗ 2 ║ Mark character Alt-A ║ 3 - F║ Mark line Alt-L ║ 4 - B║ Mark column Alt-K ║ 5 - W║ Mark word ^K T ║ 6 - B║ Begin block ^K B ║ 7 ║ End block ^K K ║ 8 ## ║ Unmark Alt-U ║ 9 ╟─────────────────────────────────╢ 10 1. ║ Copy block Alt-C ║ 11 2. ║ Move block Alt-M ║ 12 3. ║ Delete block Alt-G ║ 13 ║ Fill block... Alt-F ║ 14 > H║ Sort block ║ <**║ Shift left F7 ║ ║ Shift right F8 ║ ╟─────────────────────────────────╢ ║ Cut to scrap Shift-Del ║ ║ Copy to scrap ^Ins ║ ║ Paste scrap Shift-Ins ║ ║ Paste overwrite ^K Ins ║ ╟─────────────────────────────────╢ ║ Write block to file... Alt-W ║ ║ Read file as block... Alt-R ║ ╚═════════════════════════════════╝
Two keyboard layouts
There are two complete layouts. QEdit (the default) has QEdit's Alt keys plus the WordStar Ctrl keys and the Ctrl-K, Ctrl-Q and Ctrl-O two-key commands. VS Code has the keys most people know today. Switch with Misc → VS Code keys, in Settings, or with ke --keys vscode; the choice is remembered.
| QEdit layout (default) | VS Code layout | |
|---|---|---|
| Menus | Esc | F10, Esc, Alt+menu letter |
| Open file / explorer | Alt-E (Enter on the empty prompt browses) | Ctrl-O, Ctrl-P |
| Save / quit | Ctrl-K S / Alt-X | Ctrl-S / Ctrl-Q |
| Select | Alt-A / Alt-L / Alt-K (char/line/column), Shift+arrows | Shift+arrows, Ctrl-A, Ctrl-L, Ctrl-D |
| Copy / cut / paste | Ctrl-Ins / Shift-Del / Shift-Ins | Ctrl-C / Ctrl-X / Ctrl-V |
| Undo / redo | Alt-Backspace / Ctrl-Q O, plus Ctrl-U unkill | Ctrl-Z / Ctrl-Y |
| Find / replace / again | Ctrl-Q F / Ctrl-Q A / Ctrl-L | Ctrl-F / Ctrl-R / F3 |
| Script workspace | Alt-Y, then F5 to run | same |
| Line numbers | F12, Ctrl-K N | F12 |
| Help / What's new / About | F1, Help menu | Ctrl-K H, Help menu (Alt-H) |
Some keys work in both: Shift+arrow selection, Alt-Up/Down to move lines (add Shift to copy them), Ctrl-/ to comment or uncomment using the right prefix for the file type, and F12 for line numbers. Misc → List commands shows every command, and you can run one straight from the list.
Blocks, the QEdit way
KooperEdit has QEdit's three kinds of block. Only one exists at a time, and in the QEdit layout it stays marked while you move around, so you can mark something, go somewhere else and copy or move it there.
| Type | Mark with | Covers |
|---|---|---|
| Character | Alt-A … Alt-A, or Ctrl-K B … Ctrl-K K | Text from one character to another |
| Line | Alt-L … Alt-L | Whole lines |
| Column | Alt-K … Alt-K | A rectangle of columns, which is ideal for tables |
| Key | Block command |
|---|---|
Alt-C | Copy the block to the cursor |
Alt-M | Move the block to the cursor, even between files |
Alt-G | Delete the block (bring it back with Ctrl-U, unkill) |
Alt-F | Fill the block with a character |
Alt-W / Alt-R | Write the block to a file / read a file in as a block |
| Block → Sort | Sort the lines; with a column block, sort by those columns |
F7 / F8 | Shift the block's lines left or right |
Copy and cut with nothing selected act on the current line, the way both QEdit and VS Code behave. Copies also go to your system clipboard through the terminal (OSC 52) where the terminal allows it. Unkill keeps the last 50 deletions, and Restore line (Ctrl-Q L) puts the cursor line back the way it was when you arrived on it.
Search and replace
Find (Ctrl-Q F) asks for the text and then for options, exactly as QEdit did:
| Option | Meaning |
|---|---|
B | Search backwards |
G | Global: start at the beginning (or end) of the file |
L | Local: search only inside the marked block |
I | Ignore case |
W | Whole words only |
X | Regular expression; in a replacement, $1, $2 … insert the groups |
N | No prompting when replacing (replace all) |
Replace (Ctrl-Q A) asks Yes/No/Only/Rest/Quit at each match, and reports how many changes it made. There's also incremental search (Alt-F3), where the cursor jumps as you type, plus go to line or column, match bracket and previous position to get back to where you were before a jump.
Files, windows and macros
Open files with Alt-E (or Ctrl-O). Pressing Enter on the empty prompt, or typing a folder or a wildcard such as src/*.go, opens the file explorer: Enter opens, Backspace goes up, ~ goes home, . shows hidden files, and typing jumps to a name.
- Saving is safe: the file is written to a temporary file and then renamed, so a failed save can't truncate it. Optional
.bakbackups keep the previous version. - Line endings: Windows (CRLF) files are detected and kept that way.
- Windows: split the screen into up to eight windows. Windows on the same file share the text, and you can zoom, grow and shrink them.
- Placemarks:
Ctrl-K 0–9set one andCtrl-Q 0–9jump back to it, across files. - Keyboard macros:
Ctrl-K Mrecords your keystrokes onto any key you choose; macros can answer prompts too, and can be saved and loaded. - Shell:
F9drops you into your shell, andAlt-F9runs one command and shows its output. - Printing: pipes the file or block into
lpr, or any command you set.
The mouse
Click to place the cursor, drag to select, double- and triple-click for words and lines, middle-click to paste. Right-click opens a menu with cut, copy, paste, select, undo, find the word under the pointer, comment, indent and sort, and Open file when the text under the pointer names a file that exists, including forms like path/to/file.go:42.
JavaScript scripting
KooperEdit has a JavaScript engine (goja) built in, with an editor object that can read and change text, run any command, bind keys, add commands and menu items, show prompts and lists, and react to events. Modern JavaScript works: let/const, arrow functions, classes, destructuring, Map and Set, optional chaining, regex named groups and lookbehind.
| Where scripts run | How |
|---|---|
| At start-up | ~/.config/kooperedit/init.js, then every scripts/*.js in name order |
| In the script workspace | Write a script beside a document and press F5 |
| One-off | Ctrl-K J evaluates a line; ke -s file.js runs a file at start-up |
| Keys, menus and hooks | Functions given to bindKey, addCommand, addMenuItem and on |
// Wrap the selection in quotes, on Alt-'
editor.addCommand("Quote", "Wrap selection in double quotes", () =>
editor.replaceBlock(t => '"' + t + '"'));
editor.bindKey("Alt-'", "Quote");
// Makefiles need real tabs
editor.on("open", name => {
editor.option("expandTabs", !/(^|\/)(GNU)?[Mm]akefile$|\.mk$/.test(name));
});
// Count words in the selection or the file
editor.addCommand("WordCount", "Count words", () => {
const b = editor.block();
const n = (b ? b.text : editor.text()).split(/\s+/).filter(Boolean).length;
editor.message(n + " words");
});Every command in the editor can be bound to a key, run by name or called with editor.exec("Command"). A whole script run is a single undo step.
The script workspace
The script workspace is for small programs that work on the document you're editing: cleaning up messy text, applying a batch of regex fixes, converting one format to another, or pulling information out of a file. Press Alt-Y and the screen splits in three:
┌──────────────────────┬──────────────────────┐
│ document │ script (JavaScript) │
│ (what the script │ │
│ works on) ├──────────────────────┤
│ │ output │
└──────────────────────┴──────────────────────┘- F5 runs the script against the document, and a whole run is one undo step.
print()andconsole.log()write to the output pane, along with how long the run took and whether the document changed.- If the script fails, the cursor jumps to the line with the error.
editor.newDocument()puts the result in a new document and leaves the original untouched, which is ideal for conversions.
// Convert "key=value" lines to JSON in a new document
const obj = {};
for (const l of editor.lines()) {
const m = l.match(/^\s*([^=#]+?)\s*=\s*(.*)$/);
if (m) obj[m[1]] = m[2];
}
editor.newDocument(JSON.stringify(obj, null, 2), "config.json");
print(Object.keys(obj).length + " keys");Script → Examples has ready-made scripts to start from: tidy whitespace; CSV → JSON, JSON → CSV and CSV → Markdown table; pretty-print JSON; sort and remove duplicate lines; several regex rules in one pass; extract matches; INI → JSON; lines → SQL; number lines; and statistics.
Settings and configuration
Misc → Settings lists the options. They're saved when you close the list and when you exit, to ~/.config/kooperedit/settings.json (or $KOOPEREDIT_HOME, or $XDG_CONFIG_HOME/kooperedit).
| Setting | Default |
|---|---|
| Keyboard layout | qedit |
| Mouse, line numbers, insert mode, auto indent | On |
| Word wrap | Off |
| Right / left margin | 72 / 0 |
| Tab width / expand tabs | 8 / On |
| Show end-of-file marker | On |
| Make .bak backups | Off |
Colours come from the fixed 256-colour palette, so the classic white-on-blue look isn't changed by your terminal's colour scheme.
Building from source
KooperEdit builds with Go 1.24 or newer (the module asks for a newer toolchain, which Go downloads for you) and runs in any modern terminal: xterm, GNOME Terminal, iTerm2, Windows Terminal, kitty and so on. The repository's SCRIPTING.md and docs/ folder have the full user guide, scripting reference and command list.
make # builds ./bin/ke
./bin/ke notes.txt
make install # copies ke to /usr/local/bin (PREFIX=~/.local for your home dir)
make release # builds for Linux, macOS, Windows and FreeBSD