Quarto snippets cheat sheet

2026-05-03

Quarto documents (.qmd) are based on markdown. Unfortunately,

For markdown snippets within R Markdown or Quarto documents using the Shift+Tab sequence is always required as there is no standard tab completion available within the markdown editing mode.

so this means I have to type the keyword and then type Shift+Tab, which is really not an easy thing to type (for me at least).

Nonetheless, I have created some snippets:

snippet acn
    ::: {.acn}
        ${1:body}
    :::

snippet asi
    [${1:text}]{.aside}

snippet block
    :::{.${1:type}}
        ${2:body}
    :::

snippet code
    ```${1:type}
        ${2:body}
    ```

snippet puz
    ::: {.puzzle}
        ${1:body}
    :::

snippet span
    [${1:text}]{.${2:type}}

snippet spo
    [${1:text}]{.spoiler}

snippet swi
    ```swift
        ${1:body}
    ```

Why yes I did alphabetize them.

This has already been through a few iterations — I had longer keywords but I always mistype spoiler so I decided that 3 characters for specific results (e.g. spo for spoiler text) would work, and the full word for generics (e.g. block for what will become things like blockquotes or callouts).

Tip

Don’t use spaces at the beginning of the line — tabs only!

I’m not doing too much with at the moment because of the SwiftUI stuff, but this has been bugging me for a while now.

Next is to figure out a way to better automate uploading files…