From eab69a487ffb72a513864ac7b69375454396b630 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 15 Nov 2023 21:52:28 +0100 Subject: [PATCH] change command palette prefix and suffix --- main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index 1bda711..73bf64a 100644 --- a/main.js +++ b/main.js @@ -1768,7 +1768,7 @@ function commandpalette() .concat(snippets.map(s => { return { - prefix: "snippet: ", + prefix: "snippet ", text: s.hint, suffix: [s.command] }; @@ -1776,7 +1776,7 @@ function commandpalette() .concat(localdata.map(n => { return { - prefix: "note: ", + prefix: "note ", text: n.title, suffix: gettags(n).map(t => tagmark + t) }; @@ -1784,24 +1784,24 @@ function commandpalette() .concat(Object.keys(settings).map(s => { return { - prefix: "setting: ", + prefix: "setting ", text: s, suffix: s == "password" ? null : [settings[s]] }; }))) .then(selected => { - if (selected.prefix == "snippet: ") + if (selected.prefix == "snippet ") { var snippet = snippets.find(s => s.hint == selected.text); insert(snippet.insert, snippet.cursor); md.focus(); } - else if (selected.prefix == "note: ") + else if (selected.prefix == "note ") { loadnote(selected.text); } - else if (selected.prefix == "setting: ") + else if (selected.prefix == "setting ") { editsetting(selected.text); }