KevinBatdorf / obsidian-raycast

Raycast extension with commands for the note taking app Obsidian.
MIT License
105 stars 19 forks source link

Add support for dynamic placeholders #89

Open kenandotfyi opened 1 month ago

kenandotfyi commented 1 month ago

Hey,

I'm not sure if it is easy to do or even possible, but Raycast has many dynamic placeholders already which are quite useful for AI stuff as well as snippets.

Create Note command is already quite good and I've been using it for such a long time with some {date} and {clipboard} placeholders, but it would even more useful if there were also placeholders such as {selection} for example.

That would remove another step of copying a text block first and then using the Create Note with {clipboard}.

Very useful plugin by the way. I've been using it for a long time. Thanks!

KevinBatdorf commented 1 month ago

If I understand it correctly, I think it would require a new command per placeholder, right?

If you have a custom command you want to use, it might be easier to just use some quicklinks you define using the Advanced Uri extension directly (the extension uses this under the hood).

https://vinzent03.github.io/obsidian-advanced-uri/

kenandotfyi commented 3 weeks ago

No no, let's say I have selected a text already and call the Create Note, which has the {selection} as its Default Note Content already set. It would then directly create the note with the selected text. I mean it is already doing it with the {clipboard} for example. I thought it might be quick to implement, since Raycast is already supporting {selection} now.

But I guess Advanced URI Extension could also do the same thing. Thanks anyway.

KevinBatdorf commented 3 weeks ago

Oh alright. I understand now. The issue with that is in Raycast I couldn't highlight the text, and so users who didn't want the selected text auto inserted (imagine u copied something 2 hours ago) wouldn't be able to easily delete it.

And users who do want it auto inserted actually don't want it auto inserted unless it was a recent copy. So they end up also wanting to quickly delete the text most the time.