Most text editors load a file into memory, mutate it, and write it back. This breaks down on large files — a 10 GB log, a 100 GB database dump, a 1 TB dataset.
Microscope takes a different approach. It never modifies the original file. Instead it records edits as a compact, append-only event log. The original file is memory-mapped and treated as immutable storage; the internal text representation is a persistent data structure that shares structure with prior versions rather than copying bytes. Opening a 1 TB file is instantaneous — no bytes are read until you look at them. Saving is instantaneous — nothing is written to the original file until an explicit :w.
The event log is a first-class artifact: small, versioned, and replayable. A future file format will pair the original file with its log as a single unit — the file as the base, the log as the diff — analogous to how Git stores a repository but applied to individual file editing.
- a Rust port is available on the
claude_rustbranch — reduces the line-index footprint from 16 bytes to 8 bytes per line using a tagged pointer (not possible in Go due to GC constraints)
-
basic text editor
- navigate with
Left,Right,Up,Down,PgUp,PgDn,Home,End - undo redo with
Ctrl+U,Ctrl+R
- navigate with
-
instant start-up, instant edit
-
able to handle very large files, potentially even larger than system memory.
-
able to recover from crash
-
able to edit while still loading the file and exit without losing any progress
-
vim-like command mode, search, goto line, etc.
-
initial release comes with no suffix, e.g.
0.1.7 -
bug fix releases come with suffix, e.g.
0.1.7a, 0.1.7b -
the latest stable release should be one lower than latest releast with highest suffix. for example, if
0.1.7bis the latest release, then0.1.6zis the stable release
-
use
microscope -hfor help -
when user opens a file using
microscope inputfile, the program will create a log file (journal file) stored at<tmp>/microscope_log/<path>where<tmp>is system default temporary folder -
when user edit the file, every action will be written to log file.
-
when exit the program the log file is preserved to export
-
user can use command
:w outputfileto write the current file into a new file, ifoutputfileis empty, it will overwrite the current file and exit -
user use
microscope -r inputfileto replay the log to make a new file. the program will write the output to stdout
update go.mod directly from github GOPROXY=direct go mod tidy
