mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 04:24:12 +01:00
Update :listkeys for :mapgroups.
This commit is contained in:
@@ -289,7 +289,7 @@ var Mappings = Module("mappings", {
|
||||
iterate: function (mode) {
|
||||
let seen = {};
|
||||
for (let hive in this.hives.iterValues())
|
||||
for (let map in values(hive.getStack(mode)))
|
||||
for (let map in hive.getStack(mode).iterValues())
|
||||
if (!set.add(seen, map.name))
|
||||
yield map;
|
||||
},
|
||||
@@ -732,9 +732,22 @@ var Mappings = Module("mappings", {
|
||||
let args = {
|
||||
getMode: function (args) findMode(args["-mode"]),
|
||||
iterate: function (args) {
|
||||
for (let map in mappings.iterate(this.getMode(args)))
|
||||
for (let name in values(map.names))
|
||||
yield { name: name, __proto__: map };
|
||||
let mainMode = this.getMode(args);
|
||||
let seen = {};
|
||||
for (let mode in values([mainMode].concat(mainMode.bases)))
|
||||
for (let hive in mappings.hives.iterValues())
|
||||
for (let map in array.iterValues(hive.getStack(mode)))
|
||||
for (let name in values(map.names))
|
||||
if (!set.add(seen, name)) {
|
||||
yield {
|
||||
name: name,
|
||||
columns: [
|
||||
mode == mainMode ? "" : <span highlight="Object" style="padding-right: 1em;">{mode.name}</span>,
|
||||
hive.name == "builtin" ? "" : <span highlight="Object" style="padding-right: 1em;">{hive.name}</span>,
|
||||
],
|
||||
__proto__: map
|
||||
};
|
||||
}
|
||||
},
|
||||
format: {
|
||||
description: function (map) (XML.ignoreWhitespace = false, XML.prettyPrinting = false, <>
|
||||
@@ -744,7 +757,8 @@ var Mappings = Module("mappings", {
|
||||
{template.linkifyHelp(map.description + (map.rhs ? ": " + map.rhs : ""))}
|
||||
</>),
|
||||
help: function (map) let (char = array.compact(map.modes.map(function (m) m.char))[0])
|
||||
char === "n" ? map.name : char ? char + "_" + map.name : ""
|
||||
char === "n" ? map.name : char ? char + "_" + map.name : "",
|
||||
headings: ["Command", "Mode", "Group", "Description"]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ var StatusLine = Module("statusline", {
|
||||
#addon-bar > #addonbar-closebutton { visibility: collapse; }
|
||||
#addon-bar > xul|toolbarspring { visibility: collapse; }
|
||||
]]></css>);
|
||||
highlight.loadCSS(String.replace(<![CDATA[
|
||||
highlight.loadCSS(util.compileMacro(<![CDATA[
|
||||
!AddonBar;#addon-bar {
|
||||
padding-left: 0 !important;
|
||||
min-height: 18px !important;
|
||||
@@ -36,7 +36,7 @@ var StatusLine = Module("statusline", {
|
||||
min-width: 0 !important;
|
||||
}
|
||||
AddonButton:not(:hover) background: transparent !important;
|
||||
]]>, "<padding>", util.OS.isMacOSX ? "padding-right: 10px !important;" : ""));
|
||||
]]>)({ padding: util.OS.isMacOSX ? "padding-right: 10px !important;" : "" }));
|
||||
}
|
||||
|
||||
let _commandline = "if (window.dactyl) return dactyl.modules.commandline";
|
||||
|
||||
@@ -622,7 +622,7 @@ var IO = Module("io", {
|
||||
file.append(config.name + ".vim");
|
||||
dactyl.assert(!file.exists() || args.bang, "File exists");
|
||||
|
||||
let template = util.compileMacro(String(<![CDATA[
|
||||
let template = util.compileMacro(<![CDATA[
|
||||
" Vim syntax file
|
||||
" Language: Pentadactyl configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
@@ -707,7 +707,7 @@ let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: tw=130 et ts=4 sw=4:
|
||||
]]>), true);
|
||||
]]>, true);
|
||||
|
||||
const WIDTH = 80;
|
||||
function wrap(prefix, items, sep) {
|
||||
|
||||
@@ -319,8 +319,9 @@ var Template = Module("Template", {
|
||||
|
||||
usage: function usage(iter, format) {
|
||||
XML.ignoreWhitespace = false; XML.prettyPrinting = false;
|
||||
let desc = format && format.description || function (item) template.linkifyHelp(item.description);
|
||||
let help = format && format.help || function (item) item.name;
|
||||
format = format || {};
|
||||
let desc = format.description || function (item) template.linkifyHelp(item.description);
|
||||
let help = format.help || function (item) item.name;
|
||||
function sourceLink(frame) {
|
||||
let source = template.sourceLink(frame);
|
||||
source.@NS::hint = source.text();
|
||||
@@ -328,6 +329,20 @@ var Template = Module("Template", {
|
||||
}
|
||||
// <e4x>
|
||||
return <table>
|
||||
{ format.headings ?
|
||||
<tr highlight="Title" align="left">
|
||||
{
|
||||
this.map(format.headings, function (h) <th>{h}</th>)
|
||||
}
|
||||
</tr> : ""
|
||||
}
|
||||
{ format.columns ?
|
||||
<colgroup>
|
||||
{
|
||||
this.map(format.columns, function (c) <col style={c}/>)
|
||||
}
|
||||
</colgroup> : ""
|
||||
}
|
||||
{
|
||||
this.map(iter, function (item)
|
||||
<tr>
|
||||
@@ -339,7 +354,7 @@ var Template = Module("Template", {
|
||||
<span highlight="LinkInfo" xmlns:dactyl={NS}>Defined at {sourceLink(frame)}</span>
|
||||
}</span>
|
||||
</td>
|
||||
{ template.map(item.columns, function (c) <td>{c}</td>) }
|
||||
{ item.columns ? template.map(item.columns, function (c) <td>{c}</td>) : "" }
|
||||
<td>{desc(item)}</td>
|
||||
</tr>)
|
||||
}
|
||||
|
||||
@@ -336,6 +336,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
(\}>) // 5
|
||||
)
|
||||
]]>, "giy");
|
||||
macro = String(macro);
|
||||
while (match = re.exec(macro)) {
|
||||
let [, prefix, open, full, macro, close] = match;
|
||||
end += match[0].length;
|
||||
|
||||
Reference in New Issue
Block a user