For me, I have too many different templates to want to pick one to always be used, so I wonder if instead a new note could display something like the “No file” view that appears when no file is open, followed by a list of clickable template actions.
(Ideally, this would be something plugins could hook into, so that you aren’t locked into one specific templating implementation. That is, supply an event for fetching template actions, so that plugins could respond to the event by passing a list of names and callbacks, or something of that sort.)
With so many plugins, is it possible to automaticaly add pre-defined YAML header when I create new (empy) file? I know I can set shortcut to paste the template, but the problem is many times I just forget to do it. Thank you for letting me know about some workarounds!
+1
currently, adding new notes with a template is possible through workarounds as long as you don’t create the note by clicking on a link to it while it still doesn’t exist.
e.g.
I am writing a recipe. One ingredient is [[pasta]]. There is no file called “pasta”. Currently, it’s not possible to have a template-filled file created, when I then click on [[pasta]].
@den
my workaround to not forget my template YAML header is the following:
I installed the Zettelkasten plugin
I created a template with my YAML header
I assigned that template as my Zettelkasten template
I reassigned the “new note” hotkey to “create new zettelkasten note”
Hence, I don’t create default new notes, but I am actually using the Zettelkasten plugin and just repurposed it. Hope that helps.
(EDIT: I accidentally wrote filet instead of file in my example. I am hungry, apparently.)
This plugin GitHub - Vinzent03/obsidian-hotkeys-for-templates can act as a pretty solid workaround; set a template per folder, and whenever you hit “new” (default location, or from the file explorer, or via the command palette). For the way I work (single level of folders for different types of notes, all incoming “thinking” notes start in a seedbox) it’s really solid. One bonus of the approach is that I can now open the command palette and type “new def” and I get a command to create a new Definition note in the definition folder with that template applied.
Note: one thing it doesn’t do is apply the template when creating the note from a link in another note. I’ve raised on issue on the Github repo noting this for the developer.
Old post, but just wanna add on to this: Set a default template for each note per selected folders.
Say, if I want to create a new note under the “School” folder, the template “Class Notes” would be automatically applied. Or if I create a new note under “Books” folder, the “books” template would be applied.
Like how the Daily Notes and Zettelkasten work, but per folder
Just want to let you know guys that community plugin “Hotkeys for templates” by Vinzent03 has the feature to set default templates for new notes, configurable per folder.