obsidian-advanced-uri icon indicating copy to clipboard operation
obsidian-advanced-uri copied to clipboard

Preferably use the Command ID, not the Command Name. Why and how to find the ID?

Open Moonbase59 opened this issue 4 years ago • 1 comments

Thanks for another useful plugin @Vinzent03 —and even more thanks that you didn’t forget us multi-lingual people who switch the Obsidian language often, by allowing us to use the Command ID instead of its name!

I’ve missed that a lot in the Buttons and Obsidian Leaflet plugins: Whenever one switches Obsidian’s language, the command names used aren’t the same anymore and all logic breaks. Not so when using the Command IDs instead.

Since there is unfortunately no official list of command ids (and plugins can add to the commands anyway), you can use my Obsidian Command and Hotkey List (new version) to show command ids and their currently assigned hotkeys within Obsidian. This requires the Dataview plugin to be installed and operational.

Here’s the link to the code, in the Obsidian Forums: https://forum.obsidian.md/t/dataviewjs-snippet-showcase/17847/37

Moonbase59 avatar Jul 21 '21 07:07 Moonbase59

That's a cool tool, but you can make it yourself even easier by using the copy URI for command command from the command palette. It lists all commands and creates the URI itself with id.

Vinzent03 avatar Jul 21 '21 10:07 Vinzent03