1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:27:58 +01:00

add :optionusage, :messages and :delstyle to index.txt

This commit is contained in:
Doug Kearns
2008-11-10 03:22:27 +00:00
parent 588c545f64
commit d71f37b4ff
4 changed files with 24 additions and 46 deletions

View File

@@ -287,19 +287,7 @@ const liberator = (function () //{{{
commands.add(["exu[sage]"],
"List all Ex commands with a short description",
function (args, special)
{
if (!special)
{
liberator.help("ex-cmd-index");
}
else
{
// TODO: clicking on these should open the help
var usage = template.usage(commands);
liberator.echo(usage, commandline.FORCE_MULTILINE);
}
},
function (args, special) { showHelpIndex("ex-cmd-index", commands, special); },
{
argCount: "0",
bang: true
@@ -364,19 +352,7 @@ const liberator = (function () //{{{
commands.add(["optionu[sage]"],
"List all options with a short description",
function (args, special)
{
if (!special)
{
liberator.help("option-index");
}
else
{
// TODO: clicking on these should open the help
var usage = template.usage(options);
liberator.echo(usage, commandline.FORCE_MULTILINE);
}
},
function (args, special) { showHelpIndex("option-index", options, special); },
{
argCount: "0",
bang: true
@@ -513,19 +489,7 @@ const liberator = (function () //{{{
commands.add(["viu[sage]"],
"List all mappings with a short description",
function (args, special)
{
if (!special)
{
liberator.help("normal-index");
}
else
{
// TODO: clicking on these should open the help
var usage = template.usage(mappings);
liberator.echo(usage, commandline.FORCE_MULTILINE);
}
},
function (args, special) { showHelpIndex("normal-index", mappings, special); },
{
argCount: "0",
bang: true
@@ -549,6 +513,7 @@ const liberator = (function () //{{{
}
}
// return the platform normalised to Vim values
function getPlatformFeature()
{
let platform = navigator.platform;
@@ -556,6 +521,15 @@ const liberator = (function () //{{{
return /^Mac/.test(platform) ? "MacUnix" : platform == "Win32" ? "Win32" : "Unix";
}
// show a usage index either in the MOW or as a full help page
function showHelpIndex(tag, items, inMow)
{
if (inMow)
liberator.echo(template.usage(items), commandline.FORCE_MULTILINE);
else
liberator.help(tag);
}
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{