diff --git a/src/components/BufferSelector.vue b/src/components/BufferSelector.vue index 246c1d7..1a9b24a 100644 --- a/src/components/BufferSelector.vue +++ b/src/components/BufferSelector.vue @@ -52,9 +52,20 @@ ]), commands() { - return Object.keys(HEYNOTE_COMMANDS).map(cmd => ({ - name: cmd, - cmd: cmd, + const commands = Object.entries(HEYNOTE_COMMANDS) + // sort array first by category, then by description + commands.sort((a, b) => { + const aCategory = a[1].category || "" + const bCategory = b[1].category || "" + if (aCategory === bCategory) { + return a[1].description.localeCompare(b[1].description) + } else { + return aCategory.localeCompare(bCategory) + } + }) + return commands.map(([cmdKey, cmd]) => ({ + name: `${cmd.category}: ${cmd.description}`, + cmd: cmdKey, isCommand: true, })) }, diff --git a/src/components/settings/KeyBindRow.vue b/src/components/settings/KeyBindRow.vue index f4e304d..c436e43 100644 --- a/src/components/settings/KeyBindRow.vue +++ b/src/components/settings/KeyBindRow.vue @@ -1,4 +1,6 @@ @@ -29,8 +39,7 @@ - Unbound - {{ command }} + {{ commandLabel }}