Replace Monaco with one CodeMirror editor and nest list items with Tab
Phase 4b. DocumentEditor.svelte replaces LiveWriter.svelte and the Monaco EditorHost.svelte. Each open document has one CodeMirror state. Write and Source are two compartment configurations of it, so they share the undo history. editorStates.ts keeps the state while the tab stays open. The Monaco model, the diff bridge, its timers, and sessions.ts are gone. - Source: syntax colors from the theme tokens, lazy language packages, line numbers, folding, and the current line in IDE, wrapped lines in Writing, several carets, and bracket matching and closing. - Lists (card 088e778b): Tab nests a list item and Shift+Tab moves it up, in Write and Source. Both renumber the list. The source keeps "1.". Write and Read show numbers, letters, then Roman numerals. - Indent (card 696c30ce): a fixed 4 spaces in Write and Source. - The code menu uses CodeMirror commands. The command palette item and the Monaco styles, search, theme, and workers are removed. - @codemirror/legacy-modes is pinned to 6.5.4. Version 6.5.5 uses parser types that do not match @codemirror/language 6.12. - 26 smoke tests use CodeMirror instead of Monaco. New tests: editor/listNesting and the markdownLists unit tests. - Docs: development, UI design, plugin host, user guide, and UI-040. pnpm check, pnpm test (341 of 341), and pnpm build pass. The full smoke suite passes, except one template test that passed on retry.
This commit is contained in:
@@ -79,6 +79,9 @@ Each document pane has two controls:
|
||||
Hover over a control, or focus it with the keyboard, to see its name.
|
||||
Writer keeps your Markdown source, frontmatter, and Windows line endings. Read shows frontmatter in a collapsed **Properties** section.
|
||||
Select a checkbox to complete a task. Copy code blocks without their Markdown fences with the **Copy code** button.
|
||||
In a list item, press Tab to make a nested item. Press Shift+Tab to move it one level up. RuneStone renumbers the list.
|
||||
Nested ordered lists show letters, then Roman numerals. The Markdown source keeps the numbers, for example `1.`.
|
||||
Tab in other text indents by 4 spaces.
|
||||
|
||||
To rename a note, select its title in Writer and type a new name. Press Enter or leave the field to save the name. Press Escape to cancel.
|
||||
The file keeps its folder, extension, contents, and edit history.
|
||||
@@ -209,6 +212,7 @@ This table lists the Windows and Linux keys.
|
||||
| Save | Ctrl+S |
|
||||
| Find in document / Search workspace | Ctrl+F / Ctrl+Shift+F |
|
||||
| Switch Writer and IDE | Ctrl+E |
|
||||
| Nest a list item / Move it up | Tab / Shift+Tab |
|
||||
| Show or hide the sidebar | Ctrl+B |
|
||||
| Rename | F2 |
|
||||
| Delete to the trash / Delete permanently | Delete / Shift+Delete |
|
||||
|
||||
Reference in New Issue
Block a user