Editor Basics
Layout modes
The editor supports three layouts: split (editor + preview side by side), editor-only, and preview-only. Toggle between them with the toolbar or keyboard shortcuts.
Command palette
Press Cmd+P (or Ctrl+P) to open the command palette. Search for any command, switch between documents, or jump to a file in your workspace.
Scroll sync
The editor and preview panes stay synchronized as you scroll. This works even in long documents with embedded diagrams — the sync algorithm accounts for rendered block heights.
Diagrams
Wrap your diagram code in fenced code blocks:
```mermaid
graph TD
A[Edit locally] --> B[Preview in browser]
B --> C[Export PDF]
``` Mermaid diagrams render client-side for instant feedback. D2 diagrams render server-side with caching for fast repeat views.
Immersive mode
Enter immersive mode for distraction-free writing. Fullscreen layout, typewriter scrolling (cursor stays centered), and paragraph focus (dims everything except the current paragraph).
Toolbar
The toolbar provides quick access to formatting (bold, italic, headings, links, code blocks), layout toggles, export, and sharing. All toolbar actions have keyboard equivalents.