Zero Editor
  • Rust 94.9%
  • Objective-C 2.9%
  • Python 1.4%
  • Shell 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Francesco Ippoliti 9a5ff74505
Some checks failed
Check / macos (push) Has been cancelled
chore: release Zero Editor 0.5.2
2026-11-03 21:13:41 +01:00
.github/workflows feat: release Zero Editor 0.1.0 2026-10-16 12:04:32 +02:00
assets feat: heavier editor font strokes 2026-11-03 20:54:08 +01:00
docs chore: release Zero Editor 0.5.0 2026-11-02 15:53:52 +01:00
scripts chore: release Zero Editor 0.5.2 2026-11-03 21:13:41 +01:00
src fix: vim dd deletes the empty last line 2026-11-03 21:13:18 +01:00
.gitignore feat: Zero Editor - Minimalist Zed-inspired text editor for macOS in Rust 2026-10-13 14:52:25 +02:00
build.rs fix(macos): support opening all file types from Finder and LaunchServices 2026-10-13 15:09:24 +02:00
Cargo.lock chore: release Zero Editor 0.5.2 2026-11-03 21:13:41 +01:00
Cargo.toml chore: release Zero Editor 0.5.2 2026-11-03 21:13:41 +01:00
CHANGELOG.md chore: release Zero Editor 0.5.2 2026-11-03 21:13:41 +01:00
LICENSE feat: release Zero Editor 0.1.0 2026-10-16 12:04:32 +02:00
README.md chore: release Zero Editor 0.5.2 2026-11-03 21:13:41 +01:00

Zero Editor

Zero Editor

A local macOS text editor built in Rust. A clean interface and keyboard-driven editing.

Inspired by Zed's simplicity and Vim's editing workflow. No accounts, integrated AI or remote document services.

Download

Download Zero-Editor-v0.5.2-macos-arm64.zip from the latest release, extract it and move Zero Editor.app to Applications. This package targets Apple Silicon, with macOS 12 as its declared minimum. Only the current development Mac has been checked; older macOS versions have not been verified.

The app is ad hoc signed, without a Developer ID signature or notarization. macOS may block its first launch. Release assets include a SHA-256 checksum file. Intel and universal builds are not included.

Features

  • Flat Nord interface with the tab bar as the macOS titlebar, Helvetica Neue Medium UI and bundled Meslo LG editor fonts.
  • Native menu bar (File, Edit, View, Go, Window) listing every command and its shortcut, with Open Recent.
  • Reorder tabs by dragging; drag a tab out of the bar into a new window, or onto another window to move it there.
  • New tabs from the inline +, double-clicking empty tab-bar space, or ⌘N / ⌘T.
  • Split with the next tab, or the previous tab when the current tab is last.
  • Finder, drag-and-drop and command-line file opening, with immediate editor focus.
  • Open a folder as the window's project (⌘⇧O, drag and drop or zero <folder>) and jump to any file with Quick Open (⌘P).
  • zero command-line tool with --wait, usable as $EDITOR for git and other terminal tools.
  • Open files are watched: clean tabs reload when the file changes on disk; modified tabs show a banner.
  • Command palette with fuzzy ranking, showing the on/off state of toggles, context menus and popups that close when clicked outside.
  • Non-modal find bar: the document stays editable while it is open. Literal/regex search, case sensitivity, wraparound and single/global replacement; regex replacements support $1, $2, etc.
  • Unicode-aware line:column navigation, undo/redo that groups typed words, line/block editing commands and comment toggling (⌘/).
  • Optional Vim mode with Normal, Insert, Visual and Visual Line modes.
  • Line numbers, syntax highlighting, language selection, font zoom and optional whitespace markers.
  • Word wrapping by default; toggle it with ⌘⌥W. Line numbers, the current visual-line highlight and the vertical scrollbar work with wrapping on or off. With wrapping off, long lines scroll horizontally and follow the cursor.
  • Smart indentation, Tab/Shift+Tab and indentation-aware backspace.
  • UTF-8, UTF-16 LE/BE with or without BOM, and Windows-1252 fallback.

Editing is direct by default; Vim mode is opt-in. See the roadmap for what comes next.

Tabs and windows

Drag a tab along the bar to reorder it. Drop it outside the bar to move it into a new native window, or on another window to move it there; a window left without tabs closes. The context menu and File menu offer Move Tab to New Window. Middle-click closes a tab.

The split icon (⌘\) pairs the current tab with its immediate right neighbor. On the last tab, it pairs with the previous tab, preserving tab order. Activate it again to return to one pane. Editing either pane keeps the pair visible; selecting a tab outside the pair updates the split. A single tab does not split.

The status bar shows the document path, language, encoding, cursor position and selection length. Confirmations such as saves appear there briefly; problems that need action stay in a banner. Whitespace markers are available from the command palette or ⌘..

Projects and Quick Open

Open Folder… (⌘⇧O) makes a folder the window's project; its name appears at the left of the tab bar. Dropping a folder on the app or passing one to zero does the same. Quick Open (⌘P) lists the project's files with fuzzy matching, honoring .gitignore and skipping hidden files; indexing stops at 50,000 files. Without a project, Quick Open lists open tabs and recent files.

Vim mode

Turn it on from View → Vim Mode or the command palette (Vim mode); the setting is kept in settings.json. With Vim mode off, editing works exactly as before. The status bar shows NORMAL, INSERT, VISUAL or V-LINE and the pending keys, and Normal and Visual modes use a block cursor. ⌘ shortcuts keep working in every mode.

  • Motions: h j k l (or the arrow keys) w b e W B E 0 ^ $ gg G f F t T ; ,, with counts.
  • Operators d c y > < with motions and text objects iw aw iW aW i" a" i' a' i( a( i[ a[ i{ a{ i< a< (ib ab iB aB too).
  • Commands: x X dd cc yy D C Y p P r J ~ o O i a I A s S, u / ⌃R and . to repeat the last change.
  • Registers: unnamed, 0, a–z (uppercase appends) and + / * for the system clipboard.
  • Search: /, ?, n, N and * (whole word under the cursor), through the find bar.
  • Ex commands: :w, :q, :q!, :wq, :x and :N to go to line N.

Keys are read from the text they produce, so [ ] { } @ # ~ typed with ⌥ on non-US layouts work as expected. A change and the text typed after it undo as one step. Macros and other ex commands are not available.

Command line

File → Install Command Line Tool links ~/.local/bin/zero to the app, without sudo; add ~/.local/bin to PATH if it is not there already.

zero notes.md src/main.rs   # open files in Zero Editor
zero ~/dev/project          # open a folder as the project
zero --wait COMMIT_EDITMSG  # return when the tab, its window or the app closes
export EDITOR="zero --wait"

Document recovery

Session data lives in ~/Library/Application Support/dev.zero.editor/:

  • session.json: documents, order, cursor position, language, encoding and the disk baseline used to detect external changes.
  • drafts/: copies of unsaved changes.
  • session.previous.json: the previous committed session and its retained drafts.
  • session.lock: prevents competing processes from overwriting the same session.

Changes are archived on a background thread after approximately 400 ms of inactivity. Closing a window or quitting waits for pending writes. A crash can lose changes that have not yet been archived. Files and manifests use a synchronized temporary file and rename; immutable drafts preserve the previous session if a new write fails. Saving follows symlinks and preserves Unix permissions, but does not guarantee preservation of ACLs or extended attributes.

Open files are watched for changes on disk. A tab without unsaved changes reloads automatically, keeping the cursor line and scroll position; a modified tab shows a banner and keeps its text.

Closing a modified tab offers Save / Don't save / Cancel; ⌘D chooses Don't save. If the file changed on disk or was deleted, saving offers Overwrite / Reload from disk / Cancel. Reload discards local changes and undo history, detects the disk encoding again and keeps the tab open. Sessions retain the disk baseline across restarts and show a banner if a restored file changed while the app was closed. Older sessions without a baseline use the disk contents at restore time. Files received at startup are added to the recovered session. If recovery fails, the original data is preserved and automatic archiving is suspended. A second process can edit files but cannot archive drafts into the locked session.

All windows share one session writer. Detaching preserves the buffer, cursor and undo history. Closing a window retains its documents for the next launch; close individual tabs to remove them from the session. Windows reopen with their tabs, position, size, split and project. Sessions saved by 0.4.x reopen in one window.

Text size, word wrap, whitespace markers, syntax highlighting and Vim mode apply to every window and are kept in settings.json in the same folder.

Malformed Unicode with a BOM is rejected. If a Windows-1252 document contains unrepresentable characters, saving stops; explicitly convert it to UTF-8 from the palette before saving again.

Shortcuts

Action Shortcut
Command palette ⌘⇧P
Toggle adjacent split ⌘\
Toggle word wrap ⌘⌥W
New tab ⌘N / ⌘T
Open file / folder ⌘O / ⌘⇧O
Quick Open ⌘P
Save / Save as ⌘S / ⌘⇧S
Close tab / window / Quit ⌘W / ⌘⇧W / ⌘Q
Find / Find and replace ⌘F / ⌘⌥F
Next / previous match ⌘G / ⌘⇧G
Go to line:column ⌃G
Undo / Redo ⌘Z / ⌘⇧Z
Duplicate lines ⌘⇧D
Delete lines ⌘⇧K
Toggle comment ⌘/
Move lines up / down ⌥↑ / ⌥↓
Select language ⌘L
Toggle whitespace markers ⌘.
Increase / decrease / reset font size ⌘+ / ⌘− / ⌘0
Select tab ⌘1 … ⌘9
Next / previous tab ⌃Tab / ⌃⇧Tab
Close popup and return to editing Esc

Build and development

Requires macOS, Command Line Tools and Rust stable (edition 2024). Dependencies are pinned in Cargo.lock.

cargo run --locked -- src/main.rs
cargo fmt --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --locked
./scripts/build_app.sh

The script creates an ad hoc signed target/Zero Editor.app without installing it. Use ./scripts/build_app.sh --install to install explicitly, or --debug for a development bundle. Set ZERO_EDITOR_STATE_DIR=/path/to/state to isolate a development session.

src/main.rs owns each window's UI; src/desktop.rs coordinates native windows and session writing. src/tab.rs implements document editing and encoding; src/session.rs and src/storage.rs handle recovery and atomic writes. src/vim/ is the UI-free Vim engine; src/watch.rs, src/project.rs and src/cli.rs handle file watching, project indexing and the zero tool. The remaining modules cover search, fuzzy matching, commands, tabs, context menus, highlighting and theme.

Current limits

No LSP, multiple cursors, file tree, Vim macros or plugins. Undo history uses bounded in-memory snapshots and does not survive a restart. Search highlights render per line, while multiline regexes remain navigable and replaceable. Saving over a file changed or deleted on disk asks for confirmation first.

License

MIT for code. Meslo LG is distributed under the Apache License 2.0; the bundled files are thickened by scripts/embolden_meslo.py.