summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-11-24 22:30:27 -0700
committert <t@tjp.lol>2026-11-24 22:45:56 -0700
commit17e3a3589d8482f545bb5956a4f7ea01c646698f (patch)
treea828c6dd2138e7cb9e4b1bfa810e89f50ab5eed9 /README.md
parent3594d230f5368d4200e590654aad040432bee82e (diff)
Expand writing app interface and add Markdown support
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index f626388..4d40581 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,8 @@ zig build run -- piece.md # open a piece, or start one at that path
zig build test # the document model, then the app driven with no window
```
+A normal launch reopens the last file you had open, using its current contents on disk. On the first launch, after **File → New**, or if the file can’t be read, you get an empty **Untitled** draft instead. Opening a file explicitly takes precedence. Unsaved text is not restored.
+
## Using it
| Keys | What happens |
@@ -41,11 +43,15 @@ zig build test # the document model, then the app driven with no
| Ctrl+Shift+R, or click the word count | Put the tools away and read. |
| ⌘N ⌘O ⌘S ⇧⌘S ⌘Z ⇧⌘Z | New, Open, Save, Save As, Undo, Redo. |
-Right-click the page for alternatives, AI alternatives, ghost/revive, or Overflow. While the panel is open, the surrounding text dims. A word’s versions have a wavy violet underline; a sentence’s have a pink one. Paragraphs get a bar in the margin. Dots show the active version, and a lower tick marks a return to the version you started on. Flipping a word adjusts a preceding *a/an* where the pronunciation can be guessed. Heading hashes stay in the file, not on the screen.
+Right-click the page for alternatives, AI alternatives, ghost/revive, or Overflow. While the panel is open, the surrounding text dims. A word’s versions have a wavy violet underline; a sentence’s have a pink one. Paragraphs get a bar in the margin. Dots show the active version, and a lower tick marks a return to the version you started on. Flipping a word adjusts a preceding *a/an* where the pronunciation can be guessed. Heading hashes (`#` through `######`) appear while the caret is on that heading so you can edit its level. They hide again when the caret leaves.
+
+Matched `**strong**`, `_emphasis_`, `***both***`, `~~strikethrough~~`, and inline code spans render on the page. Move the caret inside a span to see and edit its delimiters. Saving keeps the Markdown source, not a rich-text conversion.
+
+Fenced code blocks (three or more backticks or tildes, with an optional language) sit on a darker panel, and nothing inside one is read as Markdown. The fence lines show while the caret is in the block. A block with no closing fence runs to the end of the piece.
## The Lab
-Choose **Lab** in the bottom bar. A pass can mark weak, long, or convoluted sentences, changes of tone, or filler. Punctuation and typo fixes are proposals until you apply them. **Next** visits the next passage; **Keep** leaves it alone.
+Choose **Lab** in the bottom bar or press **Ctrl+Shift+L** (also in the Write menu); the shortcut leaves read mode if needed. During a review, use **Ctrl+Shift+N** for Next, **Ctrl+Shift+K** for Keep, **Ctrl+Shift+P** for Apply rest, and **Ctrl+Shift+O** for Discard/Original. The in-window chooser has six editing passes and a row of trim strengths. Use the arrow keys to move, Return to choose, or Escape to go back to the draft. A pass can mark weak, long, or convoluted sentences, changes of tone, or filler. Punctuation and typo fixes are proposals until you apply them. **Next** visits the next passage; **Keep** leaves it alone.
The four trims aim for about 10%, 20%, 30%, or 50%. They ghost proposed cuts using the same ghosts you can make yourself. **Save** at that point to publish without the ghosted words and still recover them in Write_Away. **Original** revives the pass’s remaining proposals, not your manual ghosts. **Apply rest** removes the remaining cuts from the editor too; Undo brings them back. Editing the draft closes the review, leaving existing ghosts in place.
@@ -93,6 +99,7 @@ A separate Markdown view, source-stripped public export, sharing/posting, deleti
## The code
- `src/doc.zig` and `src/ghost_io.zig`: variants, recoverable ghosts, and the Markdown format.
+- `src/markdown.zig`: matches inline formatting delimiters in the editor’s UTF-16 text.
- `src/lab.zig` and `src/lab_ui.zig`: map model suggestions to draft passages and present them for review.
- `src/main.zig`: the app. The page is an `NSTextView`; two custom text attributes mark
groups and ghosts, and everything drawn is derived from them.