Mirror of https://codeberg.org/Gottox/e \\ a text editor written in C https://codeberg.org/Gottox/e
  • C 99.7%
  • Meson 0.2%
Find a file
2026-03-02 08:52:21 +01:00
.github ci: disable clang-format for now 2025-08-01 17:40:41 +02:00
include add get function to e_list 2026-02-03 18:24:25 +01:00
parsers src: update 2025-08-01 17:40:41 +02:00
src message.c: add support for termination words in message parsing 2026-02-07 15:20:27 +01:00
subprojects librope: fix ignored rv values 2026-03-02 08:52:21 +01:00
test test: reduce timeouts to a reasonable value 2026-02-07 15:20:30 +01:00
.clang-format parsers: update parsers, ignore parsers for clang-format 2024-01-04 22:49:39 +01:00
.clang-format-ignore chores: rearrange source into subprojects 2024-05-22 18:33:47 +02:00
.editorconfig librope: fix inserts 2024-01-04 22:52:42 +01:00
.gitignore subprojects: add libjsonwrap 2024-11-02 16:15:40 +01:00
.Mk.yaml chores: move subproject wraps to codeberg. 2026-02-07 15:20:29 +01:00
LICENSE Create LICENSE 2023-12-22 12:43:29 +01:00
logo.svg various work on libttyui, add libhighlight, various other 2024-04-12 17:46:44 +02:00
meson.build cleanup; message parsing works for non-continous chunks. 2026-01-30 13:29:53 +01:00
meson_options.txt chores: fix meson_options 2024-05-17 16:12:05 +02:00
README.md Update README.md 2026-02-07 15:29:41 +01:00

e - a text editor

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.

ToDo

  • rope data structure
  • range/cursor handling
  • command framework (do/undo)
  • daemon lifecycle
  • tree-sitter integration
  • command line frontend
  • vt100 frontend

Concepts

  • e-editor
    • 0-n documents representing opened files
      • 0-n documents editors
        • 0-n cursors
          • cursor position
          • edit actions

protocol

The e editor accepts a very simple line based clear text message protocol. A message consists of a sequence of arguments. Each argument is seperated by a space. If an argument contains spaces it must be escaped using backslashes, be enclosed in quotes or be sent as a trailing payload.

These three messages are equivalent:

ping Hello\ World!
ping "Hello World!"
ping @12
Hello World!

The @ symbol indicates that the following number is the length of a trailing payload. The payload is sent in the next line. If multiple trailing payloads are needed they can be chained:

ping @10 @10
Argument 1
Argument 2

Note that each trailing payload must be followed by a newline.

It is also possible to use termination markers to indicate the end of an argument.

ping @EOT
Hello World!
@EOT

The Marker must start with an @ symbol and be followed by an identifier. The identifier must start with a letter and can contain letters, numbers and underscores. Note that the marker must be unique within the transmission and must be placed at the start of a line. The newline before the marker isn't considered part the argument value.

There's the reserved marker @EOF which indicates that the rest of the transmission is part of the argument.

The client always sends a message starting with a verb.