mii-key / obsidian-links

manipulate & manage obisidian links
MIT License
105 stars 5 forks source link

Create context-aware command(s) combining multiple of the existing ones #22

Open Cito opened 9 months ago

Cito commented 9 months ago

Thanks for Obsidian Links, it's very useful.

It is even more useful if you add hotkeys. Unfortunately, the number of available hotkeys and my memory are very limited. Therefore, I think it would be great to have an "intelligent" manipulation command that could execute multiple of the existing commands, depending on the context, so that only one hotkey is needed.

With "context" I mean things like: Is the cursor placed on a URL or is a URL currently selected? Is the context of the clipboard a URL?

For instance, "create link from clipboard" and "convert URL to markdown" could be merged into a single command. The logic could be like: If the cursor is on a URL, it would execute the latter, otherwise the former. This is only one example, maybe more commands could be merged into one (or more) intelligent "uber-command(s)" or the logic made even more intelligent. Just leaving it here as food for thought and future improvements.

mii-key commented 9 months ago

Thank you for using the plugin and for your valuable suggestion.

It's a very interesting idea! I appreciate your input and will definitely consider it.

Wish you all the best.

NomarCub commented 8 months ago

This would be great for me too. #13 works (thank you, by the way!), but would be way more convenient under the same hotkey as regular pasting. So the logic for this could be

Personally, I would put @Cito's request under a different hotkey, as there's no pasting, and that's how I saw it previously.