e will be a text editor written in C. It'll follow a transparent client-server to allow concurrent editing of the same file(s). tree-sitter will be used for syntax highlighting and basic code analysis.
e isn't ready for use (or even testing) yet.
- rope data structure
- range/cursor handling
- command framework (do/undo)
- socket protocol (json/bjson?)
- daemon lifecycle
- tree-sitter integration
- command line frontend
- vt100 frontend
- e-editor
- 0-n documents representing opened files
- 0-n documents editors
- undo/redo stack
- 0-n cursors
- cursor position
- edit actions
- 0-n documents editors
- 0-n documents representing opened files
newline delimited json protocol with optional trailing payload or inline payload
{ "action": "insert", "payload": "Hello World!" }
A trailing payload is indicated by the payload
field being a number.
{ "action": "insert", "payload": 12 }
Hello World!
For convenience there is an alternative syntax for commands, that is easier to type in a terminal. This mode is never sent by e but can be used to make interaction with the daemon easier.
command arg1 arg2 arg3
The above is equivalent to:
{ "action": "command", "payload": ["arg1", "arg2", "arg3"], "payload_str": "arg1 arg2 arg3" }
you can also embed json in the payload:
command arg1 arg2 {"foo": "bar"}
is equivalent to:
{ "action": "command", "payload": ["arg1", "arg2", {"foo": "bar"}], "payload_str": "arg1 arg2 {\"foo\": \"bar\"}" }