Files
foam/docs/features/note-templates.md
Michael Overmeyer b1bdf766b1 [Templates v2] Add FOAM_TITLE snippet variable (#549)
* Remove unused variables to appease the linter

* Remove unecessary escape character

To appease the linter

* Add FOAM_TITLE snippet variable
2021-04-10 22:02:46 +02:00

1.4 KiB

Note Templates

Foam supports note templates.

Note templates live in .foam/templates. Run the Foam: Create New Template command from the command palette or create a regular .md file there to add a template.

Create new template GIF

Theme: Ayu Light

To create a note from a template, execute the Foam: Create New Note From Template command and follow the instructions. Don't worry if you've not created a template yet! You'll be prompted to create a new template if none exist.

Create new note from template GIF

Theme: Ayu Light

Variables

Templates can use all the variables available in VS Code Snippets.

In addition, you can also use variables provided by Foam:

Name Description
FOAM_TITLE The title of the note. If used, Foam will prompt you to enter a title for the note.

Note: neither the defaulting feature (eg. ${variable:default}) nor the format feature (eg. ${variable/(.*)/${1:/upcase}/}) (available to other variables) are available for these Foam-provided variables.