epwalsh / epwalsh/obsidian.nvim
Text insertion template (current buffer, not new note)
- Dominant language
- Lua
- Stars
- 6.2k
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
### 🚀 The feature, motivation and pitch
Strongly related to https://github.com/epwalsh/obsidian.nvim/issues/654#issue-2414260477 (as a nice followup) - once a generalized "get input from prompts to hydrate a template" is available, how about using template "fragments" to insert structured text into the current note/buffer rather than only using templates to create new notes?
Again, this is a workflow I've come to really appreciate in Obsidian, powered by QuickAdd.
The most powerful unlock of this feature is that you can pop open a command and enter some text, knowing the correct update will end up in the correct note without having to change bufffers, open a split, etc. otherwise lose context on your current work.
### Alternatives
_No response_
### Additional context
Examples of how I use the above feature in Obsidian today:
1. New Note. Prompt for:
- title of note
I (optionally) use this prompt to create notes because: a template fragment inserts a:
```
- New note created ():
```
In my daily note for that day. This way new notes automatically end up with a backlink to the day they were authored.
2. Capture "thing I did". Prompt for:
- what did you do?
This action inserts a similar bullet as above with ` thing I did: ` into that day's daily note. This is nice for quickly logging little journal-like items without opening up your daily note and writing out a timestamp.
There are some others but I think the point is made.
If you look back to the linked issue at the top, each of those multi-step templates are actually triggered by the style of command I'm describing here and each is logged to my current daily note as mentioned above.
This is a daily-note-centric approach to how I happen to use these features. But with prompting templates + the ability to insert structured text fragments into other notes, arbitrary powerful custom workflows can be created fairly easily.
Contributor guide
Research direction
Start by reading the related issue #654 and the issue's examples of prompting templates and daily-note workflows. Identify the existing template and prompt entry points, then define how a prompted fragment targets the current note or buffer without switching context. Done means structured text can be inserted into the current buffer through the described command-driven workflow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100