aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 745486240a8b60d8fdceb429d74a6ea0de3d8b38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Ecex

Ecex is a small C editor with GLFW/OpenGL rendering and C config/plugins loaded
through CCDJIT.

## Build

Dependencies:

- `clang`
- `make`
- `pkg-config`
- GLFW 3
- OpenGL

Build and test:

```sh
make
make check
```

With Guix:

```sh
guix shell -m manifest.scm -- make check
guix build -f guix.scm
```

Run:

```sh
make run
```

Use a config or font explicitly:

```sh
./bin/ecex --config config/ecexrc.c
./bin/ecex --font /path/to/font.ttf
```

Install locally:

```sh
make install PREFIX=$HOME/.local
```

`ECEX_FONT` can also point at a TTF font. `ECEX_INCLUDE` can point at the Ecex
include directory when loading configs from another working directory.

## Useful Keys

- `M-x`: command prompt
- `C-x C-f`: find file
- `C-x C-s`: save buffer
- `C-x b`: switch buffer
- `C-x k`: kill buffer
- `C-x d`: file browser
- `M-x messages`: open the read-only `*Messages*` buffer
- `C-s` / `C-r`: incremental search
- `C-/`: undo
- `C-S-z`: redo
- `C-x C-r`: reload config
- `C-x C-c`: quit

The sample config in `config/ecexrc.c` enables demo plugins including Markdown,
which-key, C mode, API completion, render demo, and Tetris.

## Development

`make check` runs the core C tests. `make sanitize` builds the app and runs the
tests with AddressSanitizer/UBSan flags.

Plugin API conventions are documented in `docs/plugin-api.md`. Current CCDJIT
follow-up work is tracked in `docs/ccdjit-improvements.md`.

`guix.scm` defines a local package. It installs the binary, public headers,
sample configs, and docs, and wraps `ecex` with `ECEX_INCLUDE` and a DejaVu font
path.

Ecex is distributed under the BSD 2-Clause License. See `LICENSE`.