1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 06:07:59 +01:00

Typo and general idiocy fixes. Kill 'linksearch'.

This commit is contained in:
Kris Maglione
2010-12-17 12:30:51 -05:00
parent 714870525e
commit 9fb3febe95
16 changed files with 50 additions and 74 deletions

View File

@@ -564,7 +564,7 @@ const Bookmarks = Module("bookmarks", {
}, },
options: function () { options: function () {
options.add(["defsearch", "ds"], options.add(["defsearch", "ds"],
"Set the default search engine", "The default search engine",
"string", "google", "string", "google",
{ {
completer: function completer(context) { completer: function completer(context) {
@@ -574,7 +574,7 @@ const Bookmarks = Module("bookmarks", {
}); });
options.add(["suggestengines"], options.add(["suggestengines"],
"Engine alias which provide search suggestions", "Search engines used for search suggestions",
"stringlist", "google", "stringlist", "google",
{ completer: function completer(context) completion.searchEngine(context, true), }); { completer: function completer(context) completion.searchEngine(context, true), });
}, },

View File

@@ -41,7 +41,7 @@ const Browser = Module("browser", {
}, { }, {
options: function () { options: function () {
options.add(["encoding", "enc"], options.add(["encoding", "enc"],
"Sets the current buffer's character encoding", "The current buffer's character encoding",
"string", "UTF-8", "string", "UTF-8",
{ {
scope: Option.SCOPE_LOCAL, scope: Option.SCOPE_LOCAL,

View File

@@ -1764,21 +1764,19 @@ const Buffer = Module("buffer", {
}, },
options: function () { options: function () {
options.add(["nextpattern"], options.add(["nextpattern"],
"Patterns to use when guessing the 'next' page in a document sequence", "Patterns to use when guessing the next page in a document sequence",
"regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"), "regexplist", UTF8("'\\bnext\\b',^>$,^(>>|»)$,^(>|»),(>|»)$,'\\bmore\\b'"),
{ regexpFlags: "i" }); { regexpFlags: "i" });
options.add(["previouspattern"], options.add(["previouspattern"],
"Patterns to use when guessing the 'previous' page in a document sequence", "Patterns to use when guessing the previous page in a document sequence",
"regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"), "regexplist", UTF8("'\\bprev|previous\\b',^<$,^(<<|«)$,^(<|«),(<|«)$"),
{ regexpFlags: "i" }); { regexpFlags: "i" });
options.add(["pageinfo", "pa"], options.add(["pageinfo", "pa"],
"Desired info in the :pageinfo output", "Define which sections are shown by the :pageinfo command",
"charlist", "gfm", "charlist", "gfm",
{ { completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))] });
completer: function (context) [[k, v[1]] for ([k, v] in Iterator(buffer.pageInfo))]
});
options.add(["scroll", "scr"], options.add(["scroll", "scr"],
"Number of lines to scroll with <C-u> and <C-d> commands", "Number of lines to scroll with <C-u> and <C-d> commands",
@@ -1786,18 +1784,18 @@ const Buffer = Module("buffer", {
{ validator: function (value) value >= 0 }); { validator: function (value) value >= 0 });
options.add(["showstatuslinks", "ssli"], options.add(["showstatuslinks", "ssli"],
"Show the destination of the link under the cursor in the status bar", "Where to show the destination of the link under the cursor",
"string", "status", "string", "status",
{ {
completer: function (context) [ completer: function (context) [
["", "Don't show link destination"], ["", "Don't show link destinations"],
["status", "Show the link in the status line"], ["status", "Show link destinations in the status line"],
["command", "Show the link in the command line"] ["command", "Show link destinations in the command line"]
] ]
}); });
options.add(["usermode", "um"], options.add(["usermode", "um"],
"Show current website with a minimal style sheet to make it easily accessible", "Show current website without styling defined by the author",
"boolean", false, "boolean", false,
{ {
setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value, setter: function (value) config.browser.markupDocumentViewer.authorStyleDisabled = value,

View File

@@ -1703,17 +1703,17 @@ const CommandLine = Module("commandline", {
{ validator: function (value) value >= 0 }); { validator: function (value) value >= 0 });
options.add(["maxitems"], options.add(["maxitems"],
"Maximum number of items to display at once", "Maximum number of completion items to display at once",
"number", 20, "number", 20,
{ validator: function (value) value >= 1 }); { validator: function (value) value >= 1 });
options.add(["messages", "msgs"], options.add(["messages", "msgs"],
"Number of messages to store in the message history", "Number of messages to store in the :message history",
"number", 100, "number", 100,
{ validator: function (value) value >= 0 }); { validator: function (value) value >= 0 });
options.add(["more"], options.add(["more"],
"Pause the message list window when more than one screen of listings is displayed", "Pause the message list window when the full output will not fit on one page",
"boolean", true); "boolean", true);
options.add(["showmode", "smd"], options.add(["showmode", "smd"],

View File

@@ -961,10 +961,10 @@ const Completion = Module("completion", {
// Because its description is useful during completion. --Kris // Because its description is useful during completion. --Kris
["", "Complete only the first match"], ["", "Complete only the first match"],
["full", "Complete the next full match"], ["full", "Complete the next full match"],
["longest", "Complete to longest common string"], ["longest", "Complete the longest common string"],
["list", "If more than one match, list all matches"], ["list", "If more than one match, list all matches"],
["list:full", "List all and complete first match"], ["list:full", "List all and complete first match"],
["list:longest", "List all and complete common string"] ["list:longest", "List all and complete the longest common string"]
], ],
checkHas: function (value, val) { checkHas: function (value, val) {
let [first, second] = value.split(":", 2); let [first, second] = value.split(":", 2);
@@ -977,7 +977,7 @@ const Completion = Module("completion", {
}; };
options.add(["altwildmode", "awim"], options.add(["altwildmode", "awim"],
"Define how command-line completion works when the Alt key is pressed", "Define the behavior of the <A-Tab> key in command-line completion",
"stringlist", "list:full", "stringlist", "list:full",
wildmode); wildmode);
@@ -988,12 +988,10 @@ const Completion = Module("completion", {
options.add(["complete", "cpt"], options.add(["complete", "cpt"],
"Items which are completed at the :open prompts", "Items which are completed at the :open prompts",
"charlist", config.defaults.complete == null ? "slf" : config.defaults.complete, "charlist", config.defaults.complete == null ? "slf" : config.defaults.complete,
{ { completer: function (context) values(completion.urlCompleters) });
completer: function (context) values(completion.urlCompleters)
});
options.add(["wildanchor", "wia"], options.add(["wildanchor", "wia"],
"Regexp list defining which contexts require matches anchored to the beginning of the result", "Define which completion groups only match at the beginning of their text",
"regexplist", "!/ex/(back|buffer|ext|forward|help|undo)"); "regexplist", "!/ex/(back|buffer|ext|forward|help|undo)");
options.add(["wildcase", "wic"], options.add(["wildcase", "wic"],
@@ -1008,12 +1006,12 @@ const Completion = Module("completion", {
}); });
options.add(["wildmode", "wim"], options.add(["wildmode", "wim"],
"Define how command-line completion works", "Define the behavior of the <Tab> key in command-line completion",
"stringlist", "list:full", "stringlist", "list:full",
wildmode); wildmode);
options.add(["wildsort", "wis"], options.add(["wildsort", "wis"],
"Regexp list of which contexts to sort", "Define which completion groups are sorted",
"regexplist", ".*"); "regexplist", ".*");
} }
}); });

View File

@@ -1168,7 +1168,7 @@ const Dactyl = Module("dactyl", {
"boolean", false); "boolean", false);
options.add(["exrc", "ex"], options.add(["exrc", "ex"],
"Allow reading of an RC file in the current directory", "Enable automatic sourcing of an RC file in the current directory at startup",
"boolean", false); "boolean", false);
options.add(["fullscreen", "fs"], options.add(["fullscreen", "fs"],
@@ -1265,7 +1265,7 @@ const Dactyl = Module("dactyl", {
"regexplist", "'\\.(js|" + config.fileExtension + ")$'"); "regexplist", "'\\.(js|" + config.fileExtension + ")$'");
options.add(["titlestring"], options.add(["titlestring"],
"Change the title of the window", "The string shown at the end of the window title",
"string", config.defaults.titlestring || config.host, "string", config.defaults.titlestring || config.host,
{ {
setter: function (value) { setter: function (value) {
@@ -1297,8 +1297,9 @@ const Dactyl = Module("dactyl", {
}); });
options.add(["urlseparator", "urlsep", "us"], options.add(["urlseparator", "urlsep", "us"],
"Set the separator regexp used to separate multiple URL args", "The regular expression used to separate multiple URLs in :open and friends",
"string", "\\|"); "string", "\\|",
{ validator: function (value) RegExp(value) });
options.add(["verbose", "vbs"], options.add(["verbose", "vbs"],
"Define which info messages are displayed", "Define which info messages are displayed",

View File

@@ -771,7 +771,7 @@ const Editor = Module("editor", {
options: function () { options: function () {
options.add(["editor"], options.add(["editor"],
"Set the external text editor", "The external text editor",
"string", "gvim -f +%l %f", { "string", "gvim -f +%l %f", {
format: function (obj, value) { format: function (obj, value) {
let args = commands.parseArgs(value || this.value, { argCount: "*", allowUnknownOptions: true }) let args = commands.parseArgs(value || this.value, { argCount: "*", allowUnknownOptions: true })
@@ -789,7 +789,7 @@ const Editor = Module("editor", {
}); });
options.add(["insertmode", "im"], options.add(["insertmode", "im"],
"Use Insert mode as the default for text areas", "Enter Insert mode rather than Text Edit mode when focusing text areas",
"boolean", true); "boolean", true);
} }
}); });

View File

@@ -27,10 +27,10 @@ const RangeFinder = Module("rangefinder", {
let highlighted = this.rangeFind && this.rangeFind.highlighted; let highlighted = this.rangeFind && this.rangeFind.highlighted;
let selections = this.rangeFind && this.rangeFind.selections; let selections = this.rangeFind && this.rangeFind.selections;
let linksOnly = false;
let regexp = false; let regexp = false;
let matchCase = options["searchcase"] === "smart" ? /[A-Z]/.test(str) : let matchCase = options["searchcase"] === "smart" ? /[A-Z]/.test(str) :
options["searchcase"] === "ignore" ? false : true; options["searchcase"] === "ignore" ? false : true;
let linksOnly = options["linksearch"];
str = str.replace(/\\(.|$)/g, function (m, n1) { str = str.replace(/\\(.|$)/g, function (m, n1) {
if (n1 == "c") if (n1 == "c")
@@ -204,7 +204,7 @@ const RangeFinder = Module("rangefinder", {
prefs.safeSet("accessibility.typeaheadfind", false); prefs.safeSet("accessibility.typeaheadfind", false);
options.add(["hlsearch", "hls"], options.add(["hlsearch", "hls"],
"Highlight previous search pattern matches", "Highlight all /search pattern matches on the current page after a search",
"boolean", false, { "boolean", false, {
setter: function (value) { setter: function (value) {
try { try {
@@ -231,13 +231,8 @@ const RangeFinder = Module("rangefinder", {
}); });
options.add(["incsearch", "is"], options.add(["incsearch", "is"],
"Show where the search pattern matches as it is typed", "Search for a pattern incrementally as it is typed rather than awaiting <Return>",
"boolean", true); "boolean", true);
options.add(["linksearch", "lks"],
"Limit the search to hyperlink text",
"boolean", false);
} }
}); });

View File

@@ -1115,7 +1115,7 @@ const Hints = Module("hints", {
function xpath(arg) Option.quote(util.makeXPath(arg)); function xpath(arg) Option.quote(util.makeXPath(arg));
options.add(["extendedhinttags", "eht"], options.add(["extendedhinttags", "eht"],
"XPath string of hintable elements activated by ';'", "XPath strings of hintable elements for extended hint modes",
"regexpmap", "[iI]:" + xpath(["img"]) + "regexpmap", "[iI]:" + xpath(["img"]) +
",[OTivVWy]:" + xpath(["{a,area}[@href]", "{img,iframe}[@src]"]) + ",[OTivVWy]:" + xpath(["{a,area}[@href]", "{img,iframe}[@src]"]) +
",[F]:" + xpath(["div", "span", "p", "body", "html"]) + ",[F]:" + xpath(["div", "span", "p", "body", "html"]) +
@@ -1160,7 +1160,7 @@ const Hints = Module("hints", {
}); });
options.add(["hintmatching", "hm"], options.add(["hintmatching", "hm"],
"How links are matched", "How hints are filtered",
"stringlist", "contains", "stringlist", "contains",
{ {
completer: function (context) [ completer: function (context) [
@@ -1175,17 +1175,18 @@ const Hints = Module("hints", {
}); });
options.add(["wordseparators", "wsp"], options.add(["wordseparators", "wsp"],
"How words are split for hintmatching", "Regular expression defining which characters separate words when matching hints",
"string", '[.,!?:;/"^$%&?()[\\]{}<>#*+|=~ _-]'); "string", '[.,!?:;/"^$%&?()[\\]{}<>#*+|=~ _-]',
{ validator: function (value) RegExp(value) });
options.add(["hintinputs", "hin"], options.add(["hintinputs", "hin"],
"How text input fields are hinted", "Which text is used to filter hints for input elements",
"stringlist", "label,value", "stringlist", "label,value",
{ {
completer: function (context) [ completer: function (context) [
["value", "Match against the value contained by the input field"], ["value", "Match against the value of the input field"],
["label", "Match against the value of a label for the input field, if one can be found"], ["label", "Match against the text of a label for the input field, if one can be found"],
["name", "Match against the name of an input field, only if neither a name or value could be found."] ["name", "Match against the name of the input field"]
] ]
}); });
} }

View File

@@ -808,7 +808,7 @@ lookup:
"boolean", true); "boolean", true);
options.add(["fileencoding", "fenc"], options.add(["fileencoding", "fenc"],
"Sets the character encoding of read and written files", "The character encoding used when reading and writing files",
"string", "UTF-8", { "string", "UTF-8", {
completer: function (context) completion.charset(context), completer: function (context) completion.charset(context),
getter: function () File.defaultEncoding, getter: function () File.defaultEncoding,
@@ -824,11 +824,11 @@ lookup:
"stringlist", IO.runtimePath); "stringlist", IO.runtimePath);
options.add(["shell", "sh"], options.add(["shell", "sh"],
"Shell to use for executing :! and :run commands", "Shell to use for executing external commands with :! and :run",
"string", shell); "string", shell);
options.add(["shellcmdflag", "shcf"], options.add(["shellcmdflag", "shcf"],
"Flag passed to shell when executing :! and :run commands", "Flag passed to shell when executing external commands with :! and :run",
"string", shellcmdflag, "string", shellcmdflag,
{ {
getter: function (value) { getter: function (value) {
@@ -839,7 +839,7 @@ lookup:
}); });
options.add(["wildignore", "wig"], options.add(["wildignore", "wig"],
"List of file patterns to ignore when completing files", "List of file patterns to ignore when completing file names",
"regexplist", ""); "regexplist", "");
} }
}); });

View File

@@ -664,7 +664,7 @@ const JavaScript = Module("javascript", {
}, },
options: function () { options: function () {
options.add(["jsdebugger", "jsd"], options.add(["jsdebugger", "jsd"],
"Use the JavaScript debugger service for JavaScript completion", "Enable the JavaScript debugger service for use in JavaScript completion",
"boolean", false, { "boolean", false, {
setter: function (value) { setter: function (value) {
if (services.debugger.isOn != value) if (services.debugger.isOn != value)

View File

@@ -547,7 +547,7 @@ const Mappings = Module("mappings", {
}, },
options: function () { options: function () {
options.add(["mapleader", "ml"], options.add(["mapleader", "ml"],
"Defines the replacement keys for the <Leader> pseudo-key", "Define the replacement keys for the <Leader> pseudo-key",
"string", "\\"); "string", "\\");
} }
}); });

View File

@@ -943,7 +943,7 @@ const Tabs = Module("tabs", {
}, },
options: function () { options: function () {
options.add(["showtabline", "stal"], options.add(["showtabline", "stal"],
"Control when to show the tab bar of opened web pages", "Define when the tab bar is visible",
"number", config.defaults["showtabline"], "number", config.defaults["showtabline"],
{ {
setter: function (value) { setter: function (value) {
@@ -983,7 +983,7 @@ const Tabs = Module("tabs", {
["paste", "P and gP mappings"] ["paste", "P and gP mappings"]
]; ];
options.add(["activate", "act"], options.add(["activate", "act"],
"Define when tabs are automatically activated", "Define when newly created tabs are automatically activated",
"stringlist", [g[0] for (g in values(activateGroups.slice(1))) if (!g[2] || !prefs.get("browser.tabs." + g[2]))].join(","), "stringlist", [g[0] for (g in values(activateGroups.slice(1))) if (!g[2] || !prefs.get("browser.tabs." + g[2]))].join(","),
{ {
completer: function (context) activateGroups, completer: function (context) activateGroups,

View File

@@ -396,7 +396,6 @@ This file contains a list of all available commands, mappings and options.
<dt><o>insertmode</o></dt> <dd>Use Insert mode as the default for text areas</dd> <dt><o>insertmode</o></dt> <dd>Use Insert mode as the default for text areas</dd>
<dt><o>jsdebugger</o></dt> <dd>Use the JavaScript debugger service for JavaScript completion</dd> <dt><o>jsdebugger</o></dt> <dd>Use the JavaScript debugger service for JavaScript completion</dd>
<dt><o>laststatus</o></dt> <dd>Show the status line</dd> <dt><o>laststatus</o></dt> <dd>Show the status line</dd>
<dt><o>linksearch</o></dt> <dd>Limit the search to hyperlink text</dd>
<dt><o>loadplugins</o></dt> <dd>Load plugin scripts when starting up</dd> <dt><o>loadplugins</o></dt> <dd>Load plugin scripts when starting up</dd>
<dt><o>mapleader</o></dt> <dd>Defines the replacement keys for the <k name="Leader"/> pseudo-key</dd> <dt><o>mapleader</o></dt> <dd>Defines the replacement keys for the <k name="Leader"/> pseudo-key</dd>
<dt><o>maxitems</o></dt> <dd>Maximum number of items to display at once in a listing</dd> <dt><o>maxitems</o></dt> <dd>Maximum number of items to display at once in a listing</dd>

View File

@@ -944,22 +944,6 @@
</description> </description>
</item> </item>
<item>
<tags>'nolks' 'nolinksearch'</tags>
<tags>'lks' 'linksearch'</tags>
<spec>'linksearch' 'lks'</spec>
<type>boolean</type>
<default>off</default>
<description>
<p>
Limit searches to hyperlink text. This includes all elements
matched by the <o>hinttags</o> XPath. This behavior can also be
enabled by including <em>\l</em> in the search pattern, and
disabled by including <em>\L</em>.
</p>
</description>
</item>
<item> <item>
<tags>'nolpl' 'lpl'</tags> <tags>'nolpl' 'lpl'</tags>
<tags>'noloadplugins' 'loadplugins'</tags> <tags>'noloadplugins' 'loadplugins'</tags>

View File

@@ -59,7 +59,7 @@
<dl dt="width: 6em;"> <dl dt="width: 6em;">
<dt>\c</dt> <dd>Perform case insensitive search (default if <o>searchcase</o>=<str>ignore</str>).</dd> <dt>\c</dt> <dd>Perform case insensitive search (default if <o>searchcase</o>=<str>ignore</str>).</dd>
<dt>\C</dt> <dd>Perform case sensitive search (default if <o>searchcase</o>=<str>match</str>).</dd> <dt>\C</dt> <dd>Perform case sensitive search (default if <o>searchcase</o>=<str>match</str>).</dd>
<dt>\l</dt> <dd>Search only in links, as defined by <o>hinttags</o>. (default if <o>linksearch</o> is set).</dd> <dt>\l</dt> <dd>Search only in links, as defined by <o>hinttags</o>.</dd>
<dt>\L</dt> <dd>Search the entire page.</dd> <dt>\L</dt> <dd>Search the entire page.</dd>
</dl> </dl>