1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:18:00 +01:00

convert help page to XHTML Strict (excepting the id values) and add initial

implementations for the :viusage and :exusage commands
This commit is contained in:
Doug Kearns
2007-06-06 13:52:18 +00:00
parent e47ad6187e
commit bc717bdc24
7 changed files with 146 additions and 99 deletions

View File

@@ -381,6 +381,13 @@ function Commands()//{{{
help: "<code class=\"command\">:execute &#34;echo test&#34;</code> would show a message with the text &#34;test&#34;.<br/>"
}
));
addDefaultCommand(new Command(["exu[sage]"],
function () { help("commands"); },
{
usage: ["exu[sage]"],
short_help: "Show help for Ex commands"
}
));
addDefaultCommand(new Command(["fo[rward]", "fw"],
function(args, special, count) { if(special) historyGoToEnd(); else stepInHistory(count > 0 ? count : 1); },
{
@@ -608,6 +615,22 @@ function Commands()//{{{
"Example: <code class=\"command\">:tab help tab</code> opens the help in a new tab."
}
));
addDefaultCommand(new Command(["tabl[ast]"],
function(args, count) { vimperator.tabs.select("$", false); },
{
usage: ["tabl[ast]"],
short_help: "Switch to the last tab"
}
));
addDefaultCommand(new Command(["tabm[ove]"],
function(args, special) { vimperator.tabs.move(getBrowser().mCurrentTab, args, special); },
{
usage: ["tabm[ove] [N]", "tabm[ove][!] [+|-N]"],
short_help: "Move the current tab after tab N",
help: "When N is 0 the current tab is made the first one. Without N the current tab is made the last one. " +
"N can also be prefixed with '+' or '-' to indicate a relative movement. If ! is specified the movement wraps around the start or end of the tab list."
}
));
addDefaultCommand(new Command(["tabn[ext]", "tn[ext]"],
function(args, special, count) { vimperator.tabs.select("+1", true); },
{
@@ -616,6 +639,13 @@ function Commands()//{{{
help: "Cycles to the first tab, when the last is selected."
}
));
addDefaultCommand(new Command(["tabo[nly]"],
function() { vimperator.tabs.keepOnly(getBrowser().mCurrentTab); },
{
usage: ["tabo[nly]"],
short_help: "Close all other tabs"
}
));
addDefaultCommand(new Command(["tabopen", "t[open]", "tabnew", "tabe[dit]"],
function (args, special) { if (args.length > 0) openURLsInNewTab(args, !special); else openURLsInNewTab("about:blank", true); },
{
@@ -626,22 +656,6 @@ function Commands()//{{{
completer: function (filter) { return get_url_completions(filter); }
}
));
addDefaultCommand(new Command(["tabo[nly]"],
function() { vimperator.tabs.keepOnly(getBrowser().mCurrentTab); },
{
usage: ["tabo[nly]"],
short_help: "Close all other tabs"
}
));
addDefaultCommand(new Command(["tabm[ove]"],
function(args, special) { vimperator.tabs.move(getBrowser().mCurrentTab, args, special); },
{
usage: ["tabm[ove] [N]", "tabm[ove][!] [+|-N]"],
short_help: "Move the current tab after tab N",
help: "When N is 0 the current tab is made the first one. Without N the current tab is made the last one. " +
"N can also be prefixed with '+' or '-' to indicate a relative movement. If ! is specified the movement wraps around the start or end of the tab list."
}
));
addDefaultCommand(new Command(["tabp[revious]", "tp[revious]", "tabN[ext]", "tN[ext]"],
function(args, count) { vimperator.tabs.select("-1", true); },
{
@@ -657,13 +671,6 @@ function Commands()//{{{
short_help: "Switch to the first tab"
}
));
addDefaultCommand(new Command(["tabl[ast]"],
function(args, count) { vimperator.tabs.select("$", false); },
{
usage: ["tabl[ast]"],
short_help: "Switch to the last tab"
}
));
addDefaultCommand(new Command(["u[ndo]"],
function(args, special, count) { if(count < 1) count = 1; undoCloseTab(count-1); },
{
@@ -706,6 +713,13 @@ function Commands()//{{{
help: "You can show the Firefox version page with <code class=\"command\">:version!</code>."
}
));
addDefaultCommand(new Command(["viu[sage]"],
function () { help("mappings"); },
{
usage: ["viu[sage]"],
short_help: "Show help for normal mode commands"
}
));
addDefaultCommand(new Command(["wino[pen]", "w[open]", "wine[dit]"],
function () { vimperator.echo("winopen not yet implemented"); },
{