Closed jaredpetker closed 1 year ago
The real problem is editing the past. You can keep a working buffer and then provide sed-like commands for mutating that state where there are edits to be made.
Check out MultilineTest. It's a single line editor with these commands:
p - print buffer
d - delete last line
c - clear buffer
e - execute buffer
? - show these commands
Here's an example session:
The number of rows in the buffer is in the prompts. And the ":" means it's not a valid expression. A "." means it's valid and ready for execution.
The mit-scheme (local) repl allows for continous entry into the repl across newline boundaries until the root expression is complete.
Downloaded mit-scheme for macos from instructions here: https://groups.csail.mit.edu/mac/users/gjs/6.945/dont-panic/