Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1a8dbb9
fix(editor): demo-safe key semantics per rework spec 2.2/2.3
Vadim1987 Jul 11, 2026
6cc1b12
fix(controller): bare Ctrl+S no longer closes the editor
Vadim1987 Jul 11, 2026
8c660fd
feat(editor): explicit navigation/editing submode with indicator
Vadim1987 Jul 12, 2026
6d834e4
fix(editor): address demo review — arrows, open position, indicator
Vadim1987 Jul 12, 2026
53b1bf2
feat(editor): remember cursor position per file within a session
Vadim1987 Jul 12, 2026
e86bf52
fix(editor): scroll the view to the selection on open
Vadim1987 Jul 12, 2026
9e6ca2c
fix(editor): typing in navigation inserts a new block, never replaces
Vadim1987 Jul 13, 2026
a83e828
refactor(editor): promote the editing flag to real nav/edit modes
Vadim1987 Jul 13, 2026
2365415
refactor(editor): cleanup, and green the spec suite on the new semantics
Vadim1987 Jul 14, 2026
e3c072f
feat(editor): active line in the buffer model
Vadim1987 Jul 14, 2026
e7c667c
feat(editor): draw the active line, follow it on scroll
Vadim1987 Jul 14, 2026
f017167
feat(editor): line-wise navigation keys, open lands on the line
Vadim1987 Jul 14, 2026
fe5d5d2
feat(editor): peek scrolling on Ctrl+Alt, page-wise line moves, chord…
Vadim1987 Jul 14, 2026
3539007
feat(editor): Alt+arrows move the block in navigation
Vadim1987 Jul 14, 2026
d2bb212
feat(editor): 14-line limit with a visible message, auto-format on open
Vadim1987 Jul 14, 2026
95e1b4b
feat(editor): the leave-block gate (spec 2.4)
Vadim1987 Jul 14, 2026
91cf87f
feat(editor): Ctrl+Alt+Left/Right double the page peek
Vadim1987 Jul 14, 2026
243c9cb
feat(editor): checkpoints on Ctrl+K, restore on Ctrl+Shift+K (2.6)
Vadim1987 Jul 14, 2026
2eed100
feat(editor): mouse selection, cursor-to-error, refusal frame
Vadim1987 Jul 14, 2026
798f33f
docs(keymap): correct README + EDITOR keymaps to 1b86c90 behavior
dsent Jul 15, 2026
6bade2c
docs(keymap): update editor keymap to editor-stage1 (2eed100)
dsent Jul 15, 2026
5a0cc94
feat(editor): follow require moves to Ctrl+J, Ctrl+O is freed
Vadim1987 Jul 15, 2026
0cb9326
feat(editor): knock on every refused action (spec 2.4.3)
Vadim1987 Jul 15, 2026
c8b12fa
fix(editor): knock on the refusals that were still silent
Vadim1987 Jul 15, 2026
5bf8976
fix(editor): Ctrl+Delete drops a block only in navigation
Vadim1987 Jul 15, 2026
f5de602
fix(editor): Ctrl+Up/Down follow the spec's block-jump rule
Vadim1987 Jul 15, 2026
c4cbde3
fix(editor): acceptance in place keeps the block (spec 2.4.4)
Vadim1987 Jul 15, 2026
94a20a9
refactor(editor): lift the acceptance pipeline out of the key handler
Vadim1987 Jul 15, 2026
e81cc6a
feat(editor): typing in navigation opens the block at the active line
Vadim1987 Jul 15, 2026
64a7c13
feat(editor): Ctrl+Enter opens a fresh block, accepts while editing
Vadim1987 Jul 15, 2026
156d4ea
fix(editor): bare Home/End reach the file edges in navigation
Vadim1987 Jul 15, 2026
d5bac5d
feat(editor): a double click opens the block (spec 2.9)
Vadim1987 Jul 15, 2026
db05cfe
fix(editor): the oversize message follows the spec's wording
Vadim1987 Jul 15, 2026
cbbc540
fix(editor): Ctrl+Enter no longer inserts a stray block
Vadim1987 Jul 15, 2026
2727ef2
feat(input): delete the previous word on Ctrl+Backspace / Ctrl+W
Vadim1987 Jul 16, 2026
e676e6b
feat(input): text-level undo of the open block (1.1)
Vadim1987 Jul 17, 2026
42f3eef
feat(editor): block-level undo of file operations (1.1)
Vadim1987 Jul 17, 2026
cc76ac8
feat(editor): the discard asks; a valid draft is undoable (1.1)
Vadim1987 Jul 17, 2026
f78de1d
feat(editor): bare Delete, Ctrl+Y freed, restore is a boundary (1.1)
Vadim1987 Jul 17, 2026
d2e0442
refactor(editor): drop the uncalled clear_history
Vadim1987 Jul 17, 2026
95186e5
feat(fs): durability API — FS.fsync(path) and FS.sync()
dsent Jul 21, 2026
1efd2cb
fix(app): flush pending writes on quit and on background
dsent Jul 21, 2026
cade8cf
fix(editor): make accepted edits durable with per-accept fsync
dsent Jul 21, 2026
bdf89d2
fix(input): make bare Home/End line-scoped while editing
dsent Jul 20, 2026
fee731f
fix(editor): anchor the input when typing into an empty block
dsent Jul 20, 2026
11c1038
fix(input): the editor's 1.1 extras no longer leak platform-wide
Vadim1987 Jul 19, 2026
9e64a19
fix(editor): drop the statusline mode tag
Vadim1987 Jul 22, 2026
18a006f
feat(editor): repeat-proof dialogs, error messages close on any exit key
Vadim1987 Jul 22, 2026
4dba8cd
feat(editor): Alt is scrolling — the peek moves to Alt-*, block moves…
Vadim1987 Jul 22, 2026
0a37373
fix(editor): returning from a require restores the view
Vadim1987 Jul 22, 2026
9853884
fix(editor): Delete leaves the clipboard alone, cutting is Ctrl+X
Vadim1987 Jul 22, 2026
16eb33d
fix(editor): dialog messages name their keys — Confirm [Enter] / Canc…
Vadim1987 Jul 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 32 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ a project must be selected first.
| Command | Combination |
| :---------------------------------------------------------------- | :-------------------------------------------- |
| Clear terminal | <kbd>Ctrl</kbd>+<kbd>L</kbd> |
| Stop project | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |
| Stop project | <kbd>Ctrl</kbd>+<kbd>S</kbd> |
| Quit project (stop and close) | <kbd>Ctrl</kbd>+<kbd>Q</kbd> |
| Reset application to initial state | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> |
| Reset project to initial state | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> |
| Restart project | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> |
| Exit application | <kbd>Ctrl</kbd>+<kbd>Esc</kbd> |
| Pause project | <kbd>Ctrl</kbd>+<kbd>Pause</kbd> |
| Toggle edit/run | <kbd>F8</kbd> |
| Toggle edit/run | <kbd>Ctrl</kbd>+<kbd>T</kbd> |
| **Input** | |
| Move cursor horizontally | <kbd>⇦</kbd>/<kbd>⇨</kbd> |
| Move cursor vertically | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
Expand All @@ -50,42 +50,52 @@ a project must be selected first.
| Insert newline | <kbd>Shift</kbd>+<kbd>Enter ⏎</kbd> |
| Delete current line | <kbd>Ctrl</kbd>+<kbd>Y</kbd> |
| Duplicate current line | <kbd>Ctrl</kbd>+<kbd>D</kbd> |
| Copy | <kbd>Ctrl</kbd>+<kbd>C</kbd> / <kbd>Ctrl</kbd>+<kbd>Insert</kbd> |
| Cut | <kbd>Ctrl</kbd>+<kbd>X</kbd> / <kbd>Shift</kbd>+<kbd>Delete</kbd> |
| Paste | <kbd>Ctrl</kbd>+<kbd>V</kbd> / <kbd>Shift</kbd>+<kbd>Insert</kbd> |
| Select text | <kbd>Shift</kbd>+<kbd>⇦</kbd>/<kbd>⇨</kbd>/<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Evaluate input | <kbd>Enter ⏎</kbd> |
| **Editor** | |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _same as Input, except for:_ | |
| Scroll up | <kbd>PageUp</kbd> |
| Scroll down | <kbd>PageDown</kbd> |
| Move selection (if in first/last line) | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Move selection | <kbd>Ctrl</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Move the active line by one line (nav) | <kbd></kbd>/<kbd>⇩</kbd> |
| Move the active line by a page (nav) | <kbd>PageUp</kbd>/<kbd>PageDown</kbd> |
| Move the cursor through the block (editing) | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Jump block-wise (nav) / accept and jump (editing) | <kbd>Ctrl</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Replace selection with input | <kbd>Enter ⏎</kbd> |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _additionally_ | |
| Open selected block for editing (nav, empty input) | <kbd>Enter ⏎</kbd> |
| Insert input contents before selection | <kbd>Ctrl</kbd>+<kbd>Enter ⏎</kbd> |
| Insert empty block before current (if input is empty) | <kbd>Shift</kbd>+<kbd>Enter ⏎</kbd> |
| Insert empty block (if input is empty) | <kbd>Shift</kbd>+<kbd>Enter ⏎</kbd> |
| Move the block (nav) | <kbd>Alt</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Peek-scroll one line, keep the selection (nav) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Peek-scroll one page (nav) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>PageUp</kbd>/<kbd>PageDown</kbd> or <kbd>⇦</kbd>/<kbd>⇨</kbd> |
| Copy block | <kbd>Ctrl</kbd>+<kbd>C</kbd> / <kbd>Ctrl</kbd>+<kbd>Insert</kbd> |
| Cut block | <kbd>Ctrl</kbd>+<kbd>X</kbd> / <kbd>Shift</kbd>+<kbd>Delete</kbd> |
| Paste | <kbd>Ctrl</kbd>+<kbd>V</kbd> / <kbd>Shift</kbd>+<kbd>Insert</kbd> |
| Delete selected block | <kbd>Ctrl</kbd>+<kbd>Delete</kbd> |
| Delete selected block (if input is empty) | <kbd>Ctrl</kbd>+<kbd>Y</kbd> |
| Wipe input | <kbd>Ctrl</kbd>+<kbd>W</kbd> |
| Load selected content to input (discards previous content) | <kbd>Esc</kbd> |
| Insert selected content into input | <kbd>Shift</kbd>+<kbd>Esc</kbd> |
| Checkpoint the file | <kbd>Ctrl</kbd>+<kbd>K</kbd> |
| Restore from checkpoint | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> |
| Drop the edit, return to navigation | <kbd>Ctrl</kbd>+<kbd>W</kbd> |
| Discard the edit (editing) / leave the editor (nav) | <kbd>Shift</kbd>+<kbd>Esc</kbd> |
| Follow the require under selection | <kbd>Ctrl</kbd>+<kbd>J</kbd> |
| Scroll to start | <kbd>Ctrl</kbd>+<kbd>PageUp</kbd> |
| Scroll to end | <kbd>Ctrl</kbd>+<kbd>PageDown</kbd> |
| Scroll up by one line | <kbd>Shift</kbd>+<kbd>PageUp</kbd> |
| Scroll down by one line | <kbd>Shift</kbd>+<kbd>PageDown</kbd> |
| Move selection to start | <kbd>Ctrl</kbd>+<kbd>Home</kbd> |
| Move selecion to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Close editor buffer | <kbd>Ctrl</kbd>+<kbd>S</kbd> |
| Stop editor (close all buffers) | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |
| Move selection to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Leave editor (close all buffers) | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _move mode_ | |
| Switch to moving ("pick up" selection) | <kbd>Ctrl</kbd>+<kbd>M</kbd> |
| Move selection | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Move selection to start | <kbd>Ctrl</kbd>+<kbd>Home</kbd> |
| Move selecion to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Move selection to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Cancel moving | <kbd>Esc</kbd> |
| Move line/block to selection and return to normal mode | <kbd>Enter ⏎</kbd> |
| Place block and return to normal mode | <kbd>Enter ⏎</kbd> |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _search mode_ | |
| Search definitions | <kbd>Ctrl</kbd>+<kbd>F</kbd> |
| Exit search | <kbd>Esc</kbd> |
| Jump to selected definition | <kbd>Enter ⏎</kbd> |
| Edit required file under highlight | <kbd>Ctrl</kbd>+<kbd>O</kbd> |

## Projects

Expand Down Expand Up @@ -212,9 +222,10 @@ Paths will be searched in the following order:

## Keys

| Command | Combination |
| :----------------------------- | :------------------------------------------ |
| Reset project to initial state | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> |
| Command | Combination |
| :--------------- | :------------------------------------------ |
| Restart project | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> |
| Exit application | <kbd>Ctrl</kbd>+<kbd>Esc</kbd> |

#

Expand Down
57 changes: 37 additions & 20 deletions doc/EDITOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
| Command | Keymap |
| :---------------------------------------------------------------- | :-------------------------------------------- |
| Clear terminal | <kbd>Ctrl</kbd>+<kbd>L</kbd> |
| Stop project | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |
| Quit project (stop and close) | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Q</kbd> |
| Stop project | <kbd>Ctrl</kbd>+<kbd>S</kbd> |
| Quit project (stop and close) | <kbd>Ctrl</kbd>+<kbd>Q</kbd> |
| Reset application to initial state | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> |
| Restart project | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> |
| Exit application | <kbd>Ctrl</kbd>+<kbd>Esc</kbd> |
| Pause project | <kbd>Ctrl</kbd>+<kbd>Pause</kbd> |
| Toggle edit/run | <kbd>F9</kbd> |
| Toggle edit/run | <kbd>Ctrl</kbd>+<kbd>T</kbd> |
| **Input** |
| Move cursor horizontally | <kbd>⇦</kbd>/<kbd>⇨</kbd> |
| Move cursor vertically | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
Expand All @@ -38,28 +39,44 @@
| Jump to line end | <kbd>Alt</kbd>+<kbd>End</kbd> |
| Insert newline | <kbd>Shift</kbd>+<kbd>Enter ⏎</kbd> |
| Delete current line | <kbd>Ctrl</kbd>+<kbd>Y</kbd> |
| Duplicate current line | <kbd>Ctrl</kbd>+<kbd>D</kbd> |
| Copy | <kbd>Ctrl</kbd>+<kbd>C</kbd> / <kbd>Ctrl</kbd>+<kbd>Insert</kbd> |
| Cut | <kbd>Ctrl</kbd>+<kbd>X</kbd> / <kbd>Shift</kbd>+<kbd>Delete</kbd> |
| Paste | <kbd>Ctrl</kbd>+<kbd>V</kbd> / <kbd>Shift</kbd>+<kbd>Insert</kbd> |
| Select text | <kbd>Shift</kbd>+<kbd>⇦</kbd>/<kbd>⇨</kbd>/<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Evaluate input | <kbd>Enter ⏎</kbd> |
| **Editor** |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _same as Input, except for:_ |
| Scroll up | <kbd>PageUp</kbd> |
| Scroll down | <kbd>PageDown</kbd> |
| Move selection (if in first/last line) | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Move selection | <kbd>Ctrl</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Move the active line by one line (nav) | <kbd></kbd>/<kbd>⇩</kbd> |
| Move the active line by a page (nav) | <kbd>PageUp</kbd>/<kbd>PageDown</kbd> |
| Move the cursor through the block (editing) | <kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Jump block-wise (nav) / accept and jump (editing) | <kbd>Ctrl</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Replace selection with input | <kbd>Enter ⏎</kbd> |
| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _additionally_ |
| Open selected block for editing (nav, empty input) | <kbd>Enter ⏎</kbd> |
| Insert input contents before selection | <kbd>Ctrl</kbd>+<kbd>Enter ⏎</kbd> |
| Insert empty block (if input is empty) | <kbd>Shift</kbd>+<kbd>Enter ⏎</kbd> |
| Move the block (nav) | <kbd>Alt</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Peek-scroll one line, keep the selection (nav) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>⇧</kbd>/<kbd>⇩</kbd> |
| Peek-scroll one page (nav) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>PageUp</kbd>/<kbd>PageDown</kbd> or <kbd>⇦</kbd>/<kbd>⇨</kbd> |
| Copy block | <kbd>Ctrl</kbd>+<kbd>C</kbd> / <kbd>Ctrl</kbd>+<kbd>Insert</kbd> |
| Cut block | <kbd>Ctrl</kbd>+<kbd>X</kbd> / <kbd>Shift</kbd>+<kbd>Delete</kbd> |
| Paste | <kbd>Ctrl</kbd>+<kbd>V</kbd> / <kbd>Shift</kbd>+<kbd>Insert</kbd> |
| Delete selected block | <kbd>Ctrl</kbd>+<kbd>Delete</kbd> |
| Delete selected block (if input is empty) | <kbd>Ctrl</kbd>+<kbd>Y</kbd> |
| Load selected content to input (discards previous content) | <kbd>Esc</kbd> |
| Insert selected content into input | <kbd>Shift</kbd>+<kbd>Esc</kbd> |
| Checkpoint the file | <kbd>Ctrl</kbd>+<kbd>K</kbd> |
| Restore from checkpoint | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> |
| Drop the edit, return to navigation | <kbd>Ctrl</kbd>+<kbd>W</kbd> |
| Discard the edit (editing) / leave the editor (nav) | <kbd>Shift</kbd>+<kbd>Esc</kbd> |
| Follow the require under selection | <kbd>Ctrl</kbd>+<kbd>J</kbd> |
| Block reorder mode | <kbd>Ctrl</kbd>+<kbd>M</kbd> |
| Search definitions | <kbd>Ctrl</kbd>+<kbd>F</kbd> |
| Scroll to start | <kbd>Ctrl</kbd>+<kbd>PageUp</kbd> |
| Scroll to end | <kbd>Ctrl</kbd>+<kbd>PageDown</kbd> |
| Scroll up by one line | <kbd>Shift</kbd>+<kbd>PageUp</kbd> |
| Scroll down by one line | <kbd>Shift</kbd>+<kbd>PageDown</kbd> |
| Move selection to start | <kbd>Ctrl</kbd>+<kbd>Home</kbd> |
| Move selecion to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Wipe input | <kbd>Ctrl</kbd>+<kbd>W</kbd> |
| Duplicate current line | <kbd>Ctrl</kbd>+<kbd>D</kbd> |
| Stop editor | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |
| Move selection to end | <kbd>Ctrl</kbd>+<kbd>End</kbd> |
| Leave editor (close all buffers) | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> |

### Usage

Expand All @@ -73,14 +90,14 @@ default, and entered input will be appended to the end.

![hello](./interface/hello.apng)

To modify an existing line, navigate there with
<kbd>⇧</kbd>/<kbd>⇩</kbd>. Then load the text by pressing
<kbd>Esc</kbd>, make the desired changes, then send it back with
<kbd>Enter ⏎</kbd>
To modify an existing block, navigate to it with
<kbd>⇧</kbd>/<kbd>⇩</kbd>. Open it for editing by pressing
<kbd>Enter ⏎</kbd>, make the desired changes, then send it back
with <kbd>Enter ⏎</kbd>

![capitalized](./interface/hello_cap.apng)

Happy with the modifications now, we can quit by pressing
<kbd>Ctrl-Shift-Q</kbd>
Happy with the modifications now, we can leave the editor by
pressing <kbd>Shift-Esc</kbd>

![quit](./interface/quit_editor.apng)
Loading
Loading