deathau / command-uri-obsidian

Trigger any command palette command via an obsidian:// uri
The Unlicense
24 stars 0 forks source link

Multi-linguals: Use the Command ID, not the Command Name (as shown in the Command Palette) #2

Open Moonbase59 opened 3 years ago

Moonbase59 commented 3 years ago

Thanks for another useful plugin @deathau—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.

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

ngirard commented 2 years ago

I just ran into this problem as well...

Cheers