I'm working on a Quarto document in RStudio/Posit where I frequently need to insert recurring formatting code. I've set up some custom code snippets in RStudio that work perfectly inside code chunks. For example, when I trigger the snippet inside a chunk (see screenshot 1), it expands as expected.
However, when I try to trigger the same snippet outside of a code chunk—in regular markdown text—it does not expand (see screenshot 2).
My question is: Is it possible to use predefined code snippets outside of code chunks in Quarto? In other words, can these snippets be triggered in plain markdown sections, or are they limited to code chunks only?
Any guidance or workarounds would be appreciated.
Screenshot 1:
Screenshot 2:
2 Answers 2
Try using shift + tab instead of only tab :)
Unfortunately this doesn't show a dropdown menu but it will work when the typed characters already defines a snippet uniquely.
For example ! + shift + tab will not do anything but  snippet.
1 Comment
shift + tab only worked in Source mode (i.e. not in Visual mode).Expanding on what has already been said. shift + tab should do the trick for you. The Code Snippets - Rstudio User Guide mentions that markdown snippets lack tab code completion. You'll need to type the entirety of the snippet name before shift + tab will insert the snippet. In this case my_quarto_columns