Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt for template field values when creating a note from a template #654

Closed
vcavallo opened this issue Jul 17, 2024 · 2 comments · Fixed by #666
Closed

Prompt for template field values when creating a note from a template #654

vcavallo opened this issue Jul 17, 2024 · 2 comments · Fixed by #666
Labels

Comments

@vcavallo
Copy link

vcavallo commented Jul 17, 2024

🚀 The feature, motivation and pitch

As requested!

There are a few powerful Obsidian plugins for templates, with Templater and QuickAdd++ being among the best. One of their greatest features is getting a prompt for entering values for template fields.

Given a template like:

I went to ...
{{ place }}
with ...
{{ people }}
for 
{{ reason }}

A powerful template plugin would, upon creating a new note with this template, prompt sequentially for values for place, people and reason and then fill those values in.

Alternatives

No response

Additional context

I know we can define custom template values based on functions, but these are limited to being somewhat "predefined" (even if dynamic, like a date function) and don't allow live entry of arbitrary values.

I'm not suggesting that obsidian.vim recognize the dynamic values of a template and prompt for them - that seems way outside scope. But is it possible with LUA and vimscript to define "prompty" functions in the obsidian.vim template configs?


Examples of how I use a similar system in Obsidian:

  1. Meeting/call notes. Prompts for:
  • who was present
  • when the meeting took place
  • the context
  • the template drops me into the notes heading
  1. Reference / source / podcast, etc. to take notes on. Prompts for:
  • title
  • who (author, podcaster, etc)
  • link to original material
  • type of media

These get added to a literature-notes directory which are used as citations in other permanent-notes.

  1. Read later:
  • link to the thing
  • where I found it
  • when I found it
  • brief description

These go into a capture directory to function as a personal "read later" list. The brief description is used in other plugins (like Dataview, where the "read these things sometime" table surfaces up the description in a column).

@epwalsh
Copy link
Owner

epwalsh commented Jul 26, 2024

Hey @vcavallo I've opened #666 for this. Can you try that out and let me know if I'm missing anything?

@vcavallo
Copy link
Author

Wow you're fast! Can't wait to try this out. I'm not able to do so until end of next week but I'll report back. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants