Piece table
Edit a file without copying it.
A 1971 paper by Charles Crowley described representing a document as a sequence of references into immutable buffers — the original file, plus an "add" buffer of new edits. Microsoft Word built its document model on this; Visual Studio Code's editor still uses it (with some clever buffer-list compression).
Two buffers: the original file (read-only) and an append-only edit buffer. The document is a linked list (or tree) of pieces (start, length, which-buffer). Insert: append to edit buffer, splice a new piece into the list. Delete: split or trim pieces. Undo: pop from a stack of operations.
Microsoft Word. AbiWord. The text buffer in Visual Studio Code (since 2018, after a famous performance overhaul).
Piece tables make undo nearly free — the original is never modified, so undoing is just reverting the piece list. Other text buffers must replay forward to reconstruct old states.