1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 00:14:11 +01:00

Automagically generate :help key indexes.

This commit is contained in:
Kris Maglione
2011-01-06 13:01:26 -05:00
parent 269a12a71a
commit 34ce63a150
5 changed files with 36 additions and 195 deletions

View File

@@ -587,7 +587,12 @@ var Mappings = Module("mappings", {
dactyl.addUsageCommand({
__proto__: args,
name: [mode.char + "listk[eys]", mode.char + "lk"],
iterateIndex: function (args)
let (self = this, prefix = mode.char == "n" ? "" : mode.char + "_")
({ helpTag: prefix + map.name, __proto__: map }
for (map in self.iterate(args))),
description: "List all " + mode.name + " mode mappings along with their short descriptions",
index: mode.char + "-maps",
getMode: function (args) mode,
options: []
});