mirror of
https://github.com/foambubble/foam-template.git
synced 2025-07-17 15:38:54 +00:00
Improve template copy
Co-authored-by: Riccardo <code@riccardoferretti.com>
This commit is contained in:
parent
40300d3b0c
commit
e119125381
1 changed files with 10 additions and 2 deletions
|
@ -1,7 +1,11 @@
|
||||||
# Foam Note Templates
|
# Foam Note Templates
|
||||||
|
|
||||||
Foam includes note templates! This allows you to create new notes from the given template.
|
Foam includes note templates!
|
||||||
Templates are treated just like snippets allowing you to use [VS Code's Snippet Syntax](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax).
|
This allows you to easily create notes that have similar structure without having to use copy/paste :)
|
||||||
|
|
||||||
|
Templates support the [VS Code's Snippet Syntax](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax), which means you can:
|
||||||
|
- add variables to the newly created note
|
||||||
|
- add tabstop to automatically navigate to the key parts of the note, just like a form
|
||||||
Below you can see an example showing a todo list and a timestamp.
|
Below you can see an example showing a todo list and a timestamp.
|
||||||
|
|
||||||
## Todo List
|
## Todo List
|
||||||
|
@ -15,3 +19,7 @@ Note Created: ${CURRENT_YEAR}${CURRENT_MONTH}${CURRENT_DATE}
|
||||||
---
|
---
|
||||||
|
|
||||||
Try out the above example by running the `Foam: Create New Note From Template` command and selecting the `your-first-template` template. Notice what happens when your new note is created!
|
Try out the above example by running the `Foam: Create New Note From Template` command and selecting the `your-first-template` template. Notice what happens when your new note is created!
|
||||||
|
|
||||||
|
To remove this template, simply delete the `.foam/templates/your-first-template.md` file.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
Loading…
Add table
Reference in a new issue