Skip to content

Instantly share code, notes, and snippets.

@emisjerry
Created February 28, 2024 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emisjerry/0a1d859d5ea961f21b68ad6025e1b6a3 to your computer and use it in GitHub Desktop.
Save emisjerry/0a1d859d5ea961f21b68ad6025e1b6a3 to your computer and use it in GitHub Desktop.
Cmd-open-settings.md using Open Plugin Settings to open specified setting window for plugin

<%* // Hotkey: Alt+S // Open settings plugin必須先設定 let oSettings = { "BRAT": "open-plugin-settings:obsidian42-brat", //"obsidian42-brat:BRAT-AddBetaPlugin", "QuickAdd": "open-plugin-settings:quickadd", "Open-plugin": "open-plugin-settings:open-plugin-settings", "Other settings":"open-plugin-settings:open-other-plugin-settings", "Commander": "cmdr:open-commander-settings", //"open-plugin-settings:cmdr" "Keyshots": "keyshots:open-keyshots-settings-tab", "Soundscapes": "open-plugin-settings:soundscapes", "Style settings": "obsidian-style-settings:show-style-settings-leaf", "Settings": "app:open-settings" };

let aKeys = Object.keys(oSettings); let aValues = Object.values(oSettings);

let sValue = await tp.system.suggester(aKeys, aValues, false, "選擇要設定的外掛"); // (displays, values,...) if (!sValue) return; console.log(sValue); await app.commands.executeCommandById(sValue); -%>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment