Add markdown formatting hotkeys to the editor

Ctrl/Cmd+B/I/E wrap the selection in bold / italic / inline-code markers,
Ctrl/Cmd+Shift+X in strikethrough, and Ctrl/Cmd+K as a link (with the url
placeholder selected). Pressing the same key on already-wrapped text
removes the markers. Applied to the live selection via the TextEdit
cursor range, with the caret/selection restored around the edit.

Documented in the built-in cheatsheet and the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
landon
2026-08-04 07:59:19 -05:00
parent a50fc5d521
commit ae8de32f04
3 changed files with 225 additions and 9 deletions
+10 -1
View File
@@ -75,7 +75,16 @@ Terminal=false
it), and the **Contrast** slider to brighten dim editor text (0% = theme
default; higher pushes the text toward white in dark mode / black in light
mode). Text always wraps to the pane width, so there is no horizontal
scrolling.
scrolling. Inline markdown has keyboard shortcuts, applied to the current
selection (press again on wrapped text to remove the markers):
| Shortcut | Effect |
| --- | --- |
| `Ctrl/Cmd + B` | **bold** (`**…**`) |
| `Ctrl/Cmd + I` | *italic* (`*…*`) |
| `Ctrl/Cmd + E` | `inline code` |
| `Ctrl/Cmd + Shift + X` | ~~strikethrough~~ (`~~…~~`) |
| `Ctrl/Cmd + K` | link — `[selection](url)`, with `url` selected to replace |
4. Set the **Chapter title** for the open file if you want to override the
auto-derived one (the field shows the automatic title as a hint). Leaving it
blank falls back to a `# Title:` line in the header, and if there is none, to