Writing with assistance
Create a slide
Type --- after a blank line. If the new slide is empty, a ghost-text suggestion offers:
<!-- _class: -->- Tab inserts it, places the cursor after
_class:and opens the layout picker. - Esc dismisses the suggestion.
The YAML frontmatter, code blocks and slides that already have content do not trigger this suggestion. It relies on VS Code inline suggestions (editor.inlineSuggest.enabled).
Choose classes, step by step
Inside <!-- _class: … -->, type a class or press Ctrl+Space. Completion is progressive:
- first a layout:
content,title,chapter,callout,cover,tocorclosing(coverinsertstitle); - once accepted, a space is added and the next menu opens: the compositions for
content; - then the options suited to the composition, the palettes and the sizes:
fit/bgonly for compositions with an image,cols-Nfor compatible columns, galleries and timelines.
Classes already present and incompatible combinations are filtered out. Each suggestion is documented: its expected structure and an example.
Hover: place the pointer over a class to read its explanation.
A prefilled structure
If the slide is empty, choosing the layout inserts the starter Markdown: title/subtitle/author for title, number and title for chapter, a list for toc, three groups for cols-3, etc.
- Existing text is never replaced.
contentalone waits for a composition orwith-titlebefore prefilling.- The suggested image paths are placeholders to fill in.
- The only comments inserted are Marp directives and the
<!-- -->separators required between groups.
Can be disabled with dwa.autoScaffold.
Diagnostics
The Problems panel reports, with the DWA source:
- unknown classes;
- ambiguous or incompatible combinations (two palettes, two compositions…);
- missing titles and captions when
with-titleorwith-legendexpects them; - wrong structure of images, groups, tables or lists for the composition.
Examples inside code blocks and ordinary comments are not interpreted as directives.
Quick fixes
On a diagnostic, the lightbulb (Ctrl+.) offers:
- apply a fix: content is only restructured after you pick it;
- DWA : copier le layout à remplir (copy the layout to fill in): copies the directive and the full slide template to the clipboard, even when no automatic fix is enough.
From the Command Palette, for the current slide:
- DWA : copier le layout à remplir: even without a diagnostic;
- DWA : insérer le layout à remplir (insert the layout to fill in): if the slide is empty. If it already contains text, prefer copying so you can choose where to paste.
Suggestions without noise
Marp's Property suggestions (wrench icon) get mixed in with DWA's, and VS Code does not let an extension hide another extension's suggestions individually. So when a DWA document is opened, the extension sets [markdown].editor.suggest.showProperties: false in the folder settings, keeping your other settings.
- Marp directives (
theme,paginate,header,backgroundColor…) are still suggested by DWA in the frontmatter. - The filter requires an open folder.
- To revert: disable
dwa.cleanSuggestions, then seteditor.suggest.showPropertiesback totruein[markdown].
Experimental option: layout transitions
experimental disabled by default.
"dwa.experimental.layoutTransitions": trueOn a content slide, removing with-title sets the main title aside in a dwa-reserve:title comment; adding it back restores it. Same principle for with-legend and the last paragraph. The comment stays in the file but is displayed neither in Marp nor in the PPTX.
The change is applied 900 ms after a valid _class directive, if the content has not changed in the meantime. Ambiguous cases (several titles, several reserves) leave the content untouched. This option does not convert compositions and never modifies a slide just by opening it.