obsidian-frontmatter-tag-suggest icon indicating copy to clipboard operation
obsidian-frontmatter-tag-suggest copied to clipboard

Autocomplete for all metadata

Open 23tux opened this issue 2 years ago • 2 comments

Hi,

first of all: Really great plugin, it's a huge time saver for me! Thank you for that!

I was wondering, if the plugin could be extended, to also provide a dropdown for every metadata inside the frontmatter section? To me, this would be immensely useful, as I always have to look up how to name a certain field in my meta data (e.g. publishedAt or published_at; I'm constantly switching between JS and Ruby, so I get the naming conventions confused all the time).

It would be also useful, to have this for inline fields: Some shortcut that triggers the dropdown with a list of used metadata fields.

Maybe it's out of scope of the plugin, but I still think it would be worth it!

For the time being, I've created a dataview for myself to list all the used metadata fields with clickable search links:

```dataviewjs
let fields = dv.pages().map(p => { return Object.keys(p.file.frontmatter); }).values.flat().sort(Intl.Collator().compare);
fields = fields.map(f => { return "[" + f + "](obsidian://search?query=%2f^" + f + ":%2f)"; })
let unique = [...new Set(fields)];
dv.el("span", unique.join(", "))
```

23tux avatar Sep 20 '22 09:09 23tux

This would be a great feature if it was implemented, although it is looking like this plugin is no longer being developed. Did want to thank you for the nifty snippet you provided. Very handy! You could try the plugin Completr which seems to support all frontmatter completions, that is if you are still looking.

willasm avatar Oct 17 '22 03:10 willasm

thanks for the hint to Completr, looks very promising!

23tux avatar Oct 17 '22 06:10 23tux