blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
6.9k stars 407 forks source link

Hotkey open Dataview query #1478

Open M1KUS3Q opened 1 year ago

M1KUS3Q commented 1 year ago

Is your feature request related to a problem? Please describe. More of a QoL feature than a problem

Describe the solution you'd like The ability to assign a hotkey to a query, that would open the files it matched with. Eg. My hotkey assigned to a command:

LIST
FROM "School/Maths"
WHERE contains(text, "algebra")
SORT file.ctime DESC
LIMIT 2

Would open the 2 latest files from /School/Maths folder, containing the word "algebra". It would also be nice to add templater-like prompts and dropdowns for some fields, maybe:

LIST
FROM "School/Maths"
WHERE contains(text, await system.suggester(["Option 1", "Option 2"],["1","2"],"What should the text contain?"))
SORT file.ctime DESC
LIMIT 2

The suggester syntax here is taken directly from Templater, but anything like it would do.

Describe alternatives you've considered The only alternative I can think of is using a file with lots of tables that you have to go through. The fact of no real alternative made me make this an issue in the first place.

AB1908 commented 1 year ago

So my opinion on this is we shouldn't get into it since it takes away from the core focus of the plugin: querying metadata. This is kinda why we have the DVJS API, to enable DV to power other workflows and I think templater or any other helper plugin would be a good fit here.