Skip to content

Demo vault

Every screenshot and code block on this page comes from the bundled demo vault.

Download the English demo vault

Commands and entry points ​

The plugin registers four commands and one file-menu item. Every write is one transaction, undone with a single Ctrl/Cmd+Z.

The four commands ​

CommandWhat it doesNote
Set image caption and layoutopens a dialog for caption, layout, side, width and gaponly those fields change, everything else is preserved
Clear image caption and layoutempties the caption and removes all layout parametersalso removes ag:isolate / ag:exclude / ag:rows / ag:group
Restore document default image styleresets the whole note after confirmation, then reports how many images changedone transaction, one undo step
Export PDF (AutoGallery)opens the export dialogdesktop only, and the active file must be Markdown
The four AutoGallery commands in the command palette

The command palette lists the four AutoGallery commands.

Entry points ​

Entry pointWhat you can do there
Command palette (Ctrl/Cmd+P)all four commands are searchable
File list context menuExport PDF (AutoGallery)
Hover actions on an image (Live Preview)crop, isolate, exclude, restore
Settings page, "Export current note"export the current note

There is no ribbon icon and no status-bar item — the plugin does not want to occupy the interface when you are not looking at an image.

What happens behind one write ​

  1. Read the current image line and parse its existing parameters.
  2. Change only the keys involved this time; write the rest back in their original order.
  3. Commit as a single editor transaction, so the undo stack gains exactly one step.

The write order is fixed:

isolate → exclude → group → layout → side → width → gap → rows → crop → top

So dragging a width never displaces a hand-written crop, and reordering never produces a pointless diff. That matters in vaults tracked with Git.

Undo granularity ​

ActionGranularity
Drag a dividerone step
Drag the corner gripone step
Save from the caption dialogone step
Restore the whole noteone step (the entire reset rolls back together)
Save from the crop dialogone step

Pressing Esc mid-drag cancels it and produces no undo step at all.

Which entry point for which job ​

GoalUse
caption + width + gapthe caption dialog
croppingthe crop dialog
column width / binding a rowgallery handles
clear manual tweaks on one imagethe clear command
clear manual tweaks in the notethe restore command
change the whole width systemtemplates plus routing

Next ​