mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:58:00 +01:00
use camel case for all indentifiers
This commit is contained in:
@@ -26,7 +26,7 @@ the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
}}} ***** END LICENSE BLOCK *****/
|
||||
|
||||
vimperator.Option = function (names, type, extra_info) //{{{
|
||||
vimperator.Option = function (names, type, extraInfo) //{{{
|
||||
{
|
||||
if (!names || !type)
|
||||
return null;
|
||||
@@ -38,29 +38,29 @@ vimperator.Option = function (names, type, extra_info) //{{{
|
||||
this.usage = this.names;
|
||||
this.type = type;
|
||||
|
||||
if (extra_info)
|
||||
if (extraInfo)
|
||||
{
|
||||
if (extra_info.usage)
|
||||
this.usage = extra_info.usage;
|
||||
if (extraInfo.usage)
|
||||
this.usage = extraInfo.usage;
|
||||
|
||||
this.help = extra_info.help || null;
|
||||
this.short_help = extra_info.short_help || null;
|
||||
this.help = extraInfo.help || null;
|
||||
this.shortHelp = extraInfo.shortHelp || null;
|
||||
|
||||
// "", 0 are valid default values
|
||||
if (extra_info.default_value !== undefined)
|
||||
this.default_value = extra_info.default_value;
|
||||
if (extraInfo.defaultValue !== undefined)
|
||||
this.defaultValue = extraInfo.defaultValue;
|
||||
else
|
||||
this.default_value = null;
|
||||
this.defaultValue = null;
|
||||
|
||||
value = this.default_value;
|
||||
value = this.defaultValue;
|
||||
|
||||
if (extra_info.setter)
|
||||
this.setter = extra_info.setter;
|
||||
if (extra_info.getter)
|
||||
this.getter = extra_info.getter;
|
||||
if (extraInfo.setter)
|
||||
this.setter = extraInfo.setter;
|
||||
if (extraInfo.getter)
|
||||
this.getter = extraInfo.getter;
|
||||
|
||||
this.completer = extra_info.completer || null;
|
||||
this.validator = extra_info.validator || null;
|
||||
this.completer = extraInfo.completer || null;
|
||||
this.validator = extraInfo.validator || null;
|
||||
}
|
||||
|
||||
// add noOPTION variant of boolean OPTION to this.names
|
||||
@@ -85,9 +85,9 @@ vimperator.Option = function (names, type, extra_info) //{{{
|
||||
}
|
||||
);
|
||||
this.__defineSetter__("value",
|
||||
function (new_value)
|
||||
function (newValue)
|
||||
{
|
||||
value = new_value;
|
||||
value = newValue;
|
||||
if (this.setter)
|
||||
this.setter.call(this, value);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ vimperator.Option = function (names, type, extra_info) //{{{
|
||||
|
||||
this.reset = function ()
|
||||
{
|
||||
this.value = this.default_value;
|
||||
this.value = this.defaultValue;
|
||||
};
|
||||
}; //}}}
|
||||
|
||||
@@ -126,13 +126,13 @@ vimperator.Options = function () //{{{
|
||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////{{{
|
||||
|
||||
var firefox_prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
var firefoxPrefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var vimperator_prefs = firefox_prefs.getBranch("extensions.vimperator.");
|
||||
var vimperatorPrefs = firefoxPrefs.getBranch("extensions.vimperator.");
|
||||
var options = [];
|
||||
|
||||
// save if we already changed a GUI related option, used for setInitialGUI
|
||||
var guioptions_done = false, showtabline_done = false, laststatus_done = false;
|
||||
var guioptionsDone = false, showtablineDone = false, laststatusDone = false;
|
||||
|
||||
function optionsIterator()
|
||||
{
|
||||
@@ -142,14 +142,14 @@ vimperator.Options = function () //{{{
|
||||
throw StopIteration;
|
||||
}
|
||||
|
||||
function storePreference(name, value, vimperator_branch)
|
||||
function storePreference(name, value, vimperatorBranch)
|
||||
{
|
||||
var branch;
|
||||
|
||||
if (vimperator_branch)
|
||||
branch = vimperator_prefs;
|
||||
if (vimperatorBranch)
|
||||
branch = vimperatorPrefs;
|
||||
else
|
||||
branch = firefox_prefs;
|
||||
branch = firefoxPrefs;
|
||||
|
||||
switch (typeof value)
|
||||
{
|
||||
@@ -167,23 +167,23 @@ vimperator.Options = function () //{{{
|
||||
}
|
||||
}
|
||||
|
||||
function loadPreference(name, forced_default, vimperator_branch)
|
||||
function loadPreference(name, forcedDefault, vimperatorBranch)
|
||||
{
|
||||
var default_value = null;
|
||||
if (forced_default != null) // this argument sets defaults for non-user settable options (like comp_history)
|
||||
default_value = forced_default;
|
||||
var defaultValue = null;
|
||||
if (forcedDefault != null) // this argument sets defaults for non-user settable options (like comp_history)
|
||||
defaultValue = forcedDefault;
|
||||
|
||||
if (vimperator_branch)
|
||||
if (vimperatorBranch)
|
||||
{
|
||||
branch = vimperator_prefs;
|
||||
branch = vimperatorPrefs;
|
||||
|
||||
if (!forced_default) // this argument sets defaults for non-user settable options (like comp_history)
|
||||
if (!forcedDefault) // this argument sets defaults for non-user settable options (like comp_history)
|
||||
{
|
||||
for (var i = 0; i < options.length; i++)
|
||||
{
|
||||
if (options[i].name == name) // only first name is searched
|
||||
{
|
||||
default_value = options[i].default_value;
|
||||
defaultValue = options[i].defaultValue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -191,12 +191,12 @@ vimperator.Options = function () //{{{
|
||||
}
|
||||
else
|
||||
{
|
||||
branch = firefox_prefs;
|
||||
branch = firefoxPrefs;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
switch (typeof default_value)
|
||||
switch (typeof defaultValue)
|
||||
{
|
||||
case "string":
|
||||
return branch.getCharPref(name);
|
||||
@@ -205,12 +205,12 @@ vimperator.Options = function () //{{{
|
||||
case "boolean":
|
||||
return branch.getBoolPref(name);
|
||||
default:
|
||||
return default_value;
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
return default_value;
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ vimperator.Options = function () //{{{
|
||||
document.getElementById("PersonalToolbar").collapsed = value.indexOf("b") > -1 ? false : true;
|
||||
document.getElementById("PersonalToolbar").hidden = value.indexOf("b") > -1 ? false : true;
|
||||
|
||||
guioptions_done = true;
|
||||
guioptionsDone = true;
|
||||
}
|
||||
|
||||
function setLastStatus(value)
|
||||
@@ -246,7 +246,7 @@ vimperator.Options = function () //{{{
|
||||
document.getElementById("status-bar").hidden = false;
|
||||
}
|
||||
|
||||
laststatus_done = true;
|
||||
laststatusDone = true;
|
||||
}
|
||||
|
||||
function setShowTabline(value)
|
||||
@@ -270,7 +270,7 @@ vimperator.Options = function () //{{{
|
||||
tabs.collapsed = false;
|
||||
}
|
||||
|
||||
showtabline_done = true;
|
||||
showtablineDone = true;
|
||||
}
|
||||
|
||||
function setTitleString(value)
|
||||
@@ -297,9 +297,9 @@ vimperator.Options = function () //{{{
|
||||
//
|
||||
|
||||
// work around firefox popup blocker
|
||||
var popup_allowed_events = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
|
||||
if (!/keypress/.test(popup_allowed_events))
|
||||
storePreference("dom.popup_allowed_events", popup_allowed_events + " keypress");
|
||||
var popupAllowedEvents = loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
|
||||
if (!/keypress/.test(popupAllowedEvents))
|
||||
storePreference("dom.popup_allowed_events", popupAllowedEvents + " keypress");
|
||||
|
||||
// TODO: shouldn't we be resetting these in destroy() as well?
|
||||
// we have our own typeahead find implementation
|
||||
@@ -341,11 +341,11 @@ vimperator.Options = function () //{{{
|
||||
{
|
||||
// reset some modified firefox prefs
|
||||
if (loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit")
|
||||
== popup_allowed_events + " keypress")
|
||||
storePreference("dom.popup_allowed_events", popup_allowed_events);
|
||||
== popupAllowedEvents + " keypress")
|
||||
storePreference("dom.popup_allowed_events", popupAllowedEvents);
|
||||
},
|
||||
|
||||
list: function (only_non_default)
|
||||
list: function (onlyNondefault)
|
||||
{
|
||||
// TODO: columns like Vim?
|
||||
var list = ":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + "<br/>" +
|
||||
@@ -356,9 +356,9 @@ vimperator.Options = function () //{{{
|
||||
{
|
||||
name = options[i].name;
|
||||
value = options[i].value;
|
||||
def = options[i].default_value;
|
||||
def = options[i].defaultValue;
|
||||
|
||||
if (only_non_default && value == def)
|
||||
if (onlyNondefault && value == def)
|
||||
continue;
|
||||
|
||||
if (options[i].type == "boolean")
|
||||
@@ -390,11 +390,11 @@ vimperator.Options = function () //{{{
|
||||
// this hack is only needed, because we need to do asynchronous loading of the .vimperatorrc
|
||||
setInitialGUI: function ()
|
||||
{
|
||||
if (!guioptions_done)
|
||||
if (!guioptionsDone)
|
||||
this.get("guioptions").reset();
|
||||
if (!laststatus_done)
|
||||
if (!laststatusDone)
|
||||
this.get("laststatus").reset();
|
||||
if (!showtabline_done)
|
||||
if (!showtablineDone)
|
||||
this.get("showtabline").reset();
|
||||
},
|
||||
|
||||
@@ -405,9 +405,9 @@ vimperator.Options = function () //{{{
|
||||
return storePreference(name, value, true);
|
||||
},
|
||||
|
||||
getPref: function (name, forced_default)
|
||||
getPref: function (name, forcedDefault)
|
||||
{
|
||||
return loadPreference(name, forced_default, true);
|
||||
return loadPreference(name, forcedDefault, true);
|
||||
},
|
||||
|
||||
setFirefoxPref: function (name, value)
|
||||
@@ -415,9 +415,9 @@ vimperator.Options = function () //{{{
|
||||
return storePreference(name, value);
|
||||
},
|
||||
|
||||
getFirefoxPref: function (name, forced_default)
|
||||
getFirefoxPref: function (name, forcedDefault)
|
||||
{
|
||||
return loadPreference(name, forced_default);
|
||||
return loadPreference(name, forcedDefault);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -433,7 +433,7 @@ vimperator.Options = function () //{{{
|
||||
|
||||
optionManager.add(new vimperator.Option(["activate", "act"], "stringlist",
|
||||
{
|
||||
short_help: "Define when tabs are automatically activated",
|
||||
shortHelp: "Define when tabs are automatically activated",
|
||||
help: "Available items:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>homepage</b>: <code class=\"mapping\">gH</code> mapping</li>" +
|
||||
@@ -441,7 +441,7 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>tabopen</b>: <code class=\"command\">:tabopen[!]</code> command</li>" +
|
||||
"<li><b>paste</b>: <code class=\"mapping\">P</code> and <code class=\"mapping\">gP</code> mappings</li>" +
|
||||
"</ul>",
|
||||
default_value: "homepage,quickmark,tabopen,paste",
|
||||
defaultValue: "homepage,quickmark,tabopen,paste",
|
||||
validator: function (value)
|
||||
{
|
||||
return value.split(",").every(function (item) { return /^(homepage|quickmark|tabopen|paste|)$/.test(item); });
|
||||
@@ -450,7 +450,7 @@ vimperator.Options = function () //{{{
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["complete", "cpt"], "charlist",
|
||||
{
|
||||
short_help: "Items which are completed at the :[tab]open prompt",
|
||||
shortHelp: "Items which are completed at the :[tab]open prompt",
|
||||
help: "Available items:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>s</b>: Search engines and keyword URLs</li>" +
|
||||
@@ -460,52 +460,52 @@ vimperator.Options = function () //{{{
|
||||
"</ul>" +
|
||||
"The order is important, so <code class=\"command\">:set complete=bs</code> would list bookmarks first, and then any available quick searches.<br/>" +
|
||||
"Add <code class=\"option\">'sort'</code> to the <code class=\"option\">'wildoptions'</code> option if you want all entries sorted.",
|
||||
default_value: "sfbh",
|
||||
defaultValue: "sfbh",
|
||||
validator: function (value) { return !/[^sfbh]/.test(value); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["defsearch", "ds"], "string",
|
||||
{
|
||||
short_help: "Set the default search engine",
|
||||
shortHelp: "Set the default search engine",
|
||||
help: "The default search engine is used in the <code class=\"command\">:[tab]open [arg]</code> command " +
|
||||
"if [arg] neither looks like a URL or like a specified search engine/keyword.",
|
||||
default_value: "google"
|
||||
defaultValue: "google"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["editor"], "string",
|
||||
{
|
||||
short_help: "Set the external text editor",
|
||||
shortHelp: "Set the external text editor",
|
||||
help: "Sets the editor to run when <code class=\"mapping\"><C-i></code> " +
|
||||
"is pressed in INSERT and TEXTAREA modes. Note that Vimperator will " +
|
||||
"not behave correctly if the editor forks its own process, such as with "+
|
||||
"gvim without the -f argument.",
|
||||
default_value: "gvim -f"
|
||||
defaultValue: "gvim -f"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["extendedhinttags", "eht"], "string",
|
||||
{
|
||||
short_help: "XPath string of hintable elements activated by ';'",
|
||||
default_value: DEFAULT_HINTTAGS
|
||||
shortHelp: "XPath string of hintable elements activated by ';'",
|
||||
defaultValue: DEFAULT_HINTTAGS
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["focusedhintstyle", "fhs"], "string",
|
||||
{
|
||||
short_help: "CSS specification of focused hints",
|
||||
default_value: "z-index:5000; font-family:monospace; font-size:12px; color:ButtonText; background-color:ButtonShadow; " +
|
||||
shortHelp: "CSS specification of focused hints",
|
||||
defaultValue: "z-index:5000; font-family:monospace; font-size:12px; color:ButtonText; background-color:ButtonShadow; " +
|
||||
"border-color:ButtonShadow; border-width:1px; border-style:solid; padding:0px 1px 0px 1px; position:absolute;"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["fullscreen", "fs"], "boolean",
|
||||
{
|
||||
short_help: "Show the current window fullscreen",
|
||||
shortHelp: "Show the current window fullscreen",
|
||||
setter: function (value) { window.fullScreen = value; },
|
||||
getter: function () { return window.fullScreen; },
|
||||
default_value: false
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["guioptions", "go"], "charlist",
|
||||
{
|
||||
short_help: "Show or hide the menu, toolbar and scrollbars",
|
||||
shortHelp: "Show or hide the menu, toolbar and scrollbars",
|
||||
help: "Supported characters:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>m</b>: menubar</li>" +
|
||||
@@ -513,68 +513,68 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>b</b>: bookmark bar</li>" +
|
||||
"</ul>",
|
||||
setter: function (value) { setGuiOptions(value); },
|
||||
default_value: "",
|
||||
defaultValue: "",
|
||||
validator: function (value) { return !/[^mTb]/.test(value); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["hinttimeout", "hto"], "number",
|
||||
{
|
||||
short_help: "Automatically follow non unique numerical hint after {arg} ms",
|
||||
shortHelp: "Automatically follow non unique numerical hint after {arg} ms",
|
||||
help: "Set to 0 (the default) to only follow numeric hints after pressing <Return> or when the hint is unique.",
|
||||
default_value: 0,
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return value >= 0; }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["hintstyle", "hs"], "string",
|
||||
{
|
||||
short_help: "CSS specification of unfocused hints",
|
||||
default_value: "z-index:5000; font-family:monospace; font-size:12px; color:white; background-color:red; " +
|
||||
shortHelp: "CSS specification of unfocused hints",
|
||||
defaultValue: "z-index:5000; font-family:monospace; font-size:12px; color:white; background-color:red; " +
|
||||
"border-color:ButtonShadow; border-width:0px; border-style:solid; padding:0px 1px 0px 1px; position:absolute;"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["hinttags", "ht"], "string",
|
||||
{
|
||||
short_help: "XPath string of hintable elements activated by <code class=\"mapping\">'f'</code> and <code class=\"mapping\">'F'</code>",
|
||||
default_value: DEFAULT_HINTTAGS
|
||||
shortHelp: "XPath string of hintable elements activated by <code class=\"mapping\">'f'</code> and <code class=\"mapping\">'F'</code>",
|
||||
defaultValue: DEFAULT_HINTTAGS
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["hlsearch", "hls"], "boolean",
|
||||
{
|
||||
short_help: "Highlight previous search pattern matches",
|
||||
shortHelp: "Highlight previous search pattern matches",
|
||||
setter: function (value) { if (value) vimperator.search.highlight(); else vimperator.search.clear(); },
|
||||
default_value: false
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["hlsearchstyle", "hlss"], "string",
|
||||
{
|
||||
short_help: "CSS specification of highlighted search items",
|
||||
default_value: "color: black; background-color: yellow; padding: 0; display: inline;"
|
||||
shortHelp: "CSS specification of highlighted search items",
|
||||
defaultValue: "color: black; background-color: yellow; padding: 0; display: inline;"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["ignorecase", "ic"], "boolean",
|
||||
{
|
||||
short_help: "Ignore case in search patterns",
|
||||
default_value: true
|
||||
shortHelp: "Ignore case in search patterns",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["incsearch", "is"], "boolean",
|
||||
{
|
||||
short_help: "Show where the search pattern matches as it is typed",
|
||||
shortHelp: "Show where the search pattern matches as it is typed",
|
||||
help: "NOTE: Incremental searching currently only works in the forward direction.",
|
||||
default_value: true
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["insertmode", "im"], "boolean",
|
||||
{
|
||||
short_help: "Use Insert mode as the default for text areas",
|
||||
shortHelp: "Use Insert mode as the default for text areas",
|
||||
help: "Makes Vimperator work in a way that Insert mode is the default mode for text areas. " +
|
||||
"Useful if you want to use Vimperator as a modeless editor, keeping the known Firefox interface for editing text areas.",
|
||||
default_value: true
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["laststatus", "ls"], "number",
|
||||
{
|
||||
short_help: "Show the status line",
|
||||
shortHelp: "Show the status line",
|
||||
help: "Determines when the last window will have a status line. " +
|
||||
"Possible values:<br/>" +
|
||||
"<ul>" +
|
||||
@@ -583,27 +583,27 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>2</b>: always</li>" +
|
||||
"</ul>" +
|
||||
"NOTE: laststatus=1 not implemented yet.",
|
||||
default_value: 2,
|
||||
defaultValue: 2,
|
||||
setter: function (value) { setLastStatus(value); },
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["linksearch", "lks"], "boolean",
|
||||
{
|
||||
short_help: "Limit the search to hyperlink text",
|
||||
shortHelp: "Limit the search to hyperlink text",
|
||||
help: "This includes (X)HTML elements with an \"href\" atrribute and XLink \"simple\" links.",
|
||||
default_value: false
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["more"], "boolean",
|
||||
{
|
||||
short_help: "Pause the message list window when more than one screen of listings is displayed",
|
||||
default_value: true
|
||||
shortHelp: "Pause the message list window when more than one screen of listings is displayed",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["pageinfo", "pa"], "charlist",
|
||||
{
|
||||
short_help: "Desired info on :pa[geinfo]",
|
||||
shortHelp: "Desired info on :pa[geinfo]",
|
||||
help: "Available items:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>g</b>: general info</li>" +
|
||||
@@ -611,13 +611,13 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>m</b>: meta tags</li>" +
|
||||
"</ul>" +
|
||||
"The order matters",
|
||||
default_value: "gfm",
|
||||
defaultValue: "gfm",
|
||||
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["popups", "pps"], "number",
|
||||
{
|
||||
short_help: "Where to show requested popup windows",
|
||||
shortHelp: "Where to show requested popup windows",
|
||||
help: "Define where to show requested popup windows. Does not apply to windows which are opened by middle clicking a link, they always open in a new tab. " +
|
||||
"Possible values:<br/>" +
|
||||
"<ul>" +
|
||||
@@ -627,48 +627,48 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>3</b>: Always open in a new window</li>" +
|
||||
"</ul>" +
|
||||
"NOTE: This option does not change the popup blocker of Firefox in any way.",
|
||||
default_value: 1,
|
||||
defaultValue: 1,
|
||||
setter: function (value) { setPopups(value); },
|
||||
validator: function (value) { return (value >= 0 && value <= 3); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["preload"], "boolean",
|
||||
{
|
||||
short_help: "Speed up first time history/bookmark completion",
|
||||
shortHelp: "Speed up first time history/bookmark completion",
|
||||
help: "History access can be quite slow for a large history. Vimperator maintains a cache to speed it up significantly on subsequent access.<br/>" +
|
||||
"In order to also speed up first time access, it is cached at startup, if this option is set (recommended).",
|
||||
default_value: true
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["previewheight", "pvh"], "number",
|
||||
{
|
||||
short_help: "Default height for preview window",
|
||||
shortHelp: "Default height for preview window",
|
||||
help: "Value must be between 1 and 50. If the value is too high, completions may cover the command-line. " +
|
||||
"Close the preview window with <code class=\"command\">:pclose</code>.<br/>" +
|
||||
"NOTE: Option currently disabled",
|
||||
default_value: 10,
|
||||
defaultValue: 10,
|
||||
validator: function (value) { return (value >= 1 && value <= 50); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["scroll", "scr"], "number",
|
||||
{
|
||||
short_help: "Number of lines to scroll with <code class=\"mapping\">C-u</code> and <code class=\"mapping\">C-d</code> commands",
|
||||
shortHelp: "Number of lines to scroll with <code class=\"mapping\">C-u</code> and <code class=\"mapping\">C-d</code> commands",
|
||||
help: "The number of lines scrolled defaults to half the window size. " +
|
||||
"When a <code class=\"argument\">{count}</code> is specified to the <code class=\"mapping\"><C-u></code> or <code class=\"mapping\"><C-d></code> commands this is used to set the value of <code class=\"option\">'scroll'</code> and also used for the current command. " +
|
||||
"The value can be reset to half the window height with <code class=\"command\">:set scroll=0</code>.",
|
||||
default_value: 0,
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return value >= 0; }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["showmode", "smd"], "boolean",
|
||||
{
|
||||
short_help: "Show the current mode in the command line",
|
||||
default_value: true
|
||||
shortHelp: "Show the current mode in the command line",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["showstatuslinks", "ssli"], "number",
|
||||
{
|
||||
short_help: "Show the destination of the link under the cursor in the status bar",
|
||||
shortHelp: "Show the destination of the link under the cursor in the status bar",
|
||||
help: "Also links which are focused by keyboard commands like <code class=\"mapping\"><Tab></code> are shown. " +
|
||||
"Possible values:<br/>" +
|
||||
"<ul>" +
|
||||
@@ -676,13 +676,13 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>1</b>: Show the link in the status line</li>" +
|
||||
"<li><b>2</b>: Show the link in the command line</li>" +
|
||||
"</ul>",
|
||||
default_value: 1,
|
||||
defaultValue: 1,
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["showtabline", "stal"], "number",
|
||||
{
|
||||
short_help: "Control when to show the tab bar of opened web pages",
|
||||
shortHelp: "Control when to show the tab bar of opened web pages",
|
||||
help: "Possible values:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>0</b>: Never show tab bar</li>" +
|
||||
@@ -690,55 +690,55 @@ vimperator.Options = function () //{{{
|
||||
"<li><b>2</b>: Always show tab bar</li>" +
|
||||
"</ul>",
|
||||
setter: function (value) { setShowTabline(value); },
|
||||
default_value: 2,
|
||||
defaultValue: 2,
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["smartcase", "scs"], "boolean",
|
||||
{
|
||||
short_help: "Override the 'ignorecase' option if the pattern contains uppercase characters",
|
||||
shortHelp: "Override the 'ignorecase' option if the pattern contains uppercase characters",
|
||||
help: "This is only used if the <code class=\"option\">'ignorecase'</code> option is set.",
|
||||
default_value: true
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["titlestring"], "string",
|
||||
{
|
||||
short_help: "Change the title of the browser window",
|
||||
shortHelp: "Change the title of the browser window",
|
||||
help: "Vimperator changes the browser title from \"Title of web page - Mozilla Firefox\" to " +
|
||||
"\"Title of web page - Vimperator\".<br/>If you don't like that, you can restore it with: " +
|
||||
"<code class=\"command\">:set titlestring=Mozilla Firefox</code>.",
|
||||
setter: function (value) { setTitleString(value); },
|
||||
default_value: "Vimperator"
|
||||
defaultValue: "Vimperator"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["usermode", "um"], "boolean",
|
||||
{
|
||||
short_help: "Show current website with a minimal style sheet to make it easily accessible",
|
||||
shortHelp: "Show current website with a minimal style sheet to make it easily accessible",
|
||||
help: "Note that this is a local option for now, later it may be split into a global and <code class=\"command\">:setlocal</code> part",
|
||||
setter: function (value) { getMarkupDocumentViewer().authorStyleDisabled = value; },
|
||||
getter: function () { return getMarkupDocumentViewer().authorStyleDisabled; },
|
||||
default_value: false
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["verbose", "vbs"], "number",
|
||||
{
|
||||
short_help: "Define which type of messages are logged",
|
||||
shortHelp: "Define which type of messages are logged",
|
||||
help: "When bigger than zero, Vimperator will give messages about what it is doing. They are printed to the error console which can be shown with <code class=\"command\">:javascript!</code>.<br/>" +
|
||||
"The highest value is 9, being the most verbose mode.",
|
||||
default_value: 0,
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return (value >= 0 && value <= 9); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["visualbell", "vb"], "boolean",
|
||||
{
|
||||
short_help: "Use visual bell instead of beeping on errors",
|
||||
shortHelp: "Use visual bell instead of beeping on errors",
|
||||
setter: function (value) { vimperator.options.setFirefoxPref("accessibility.typeaheadfind.enablesound", !value); },
|
||||
default_value: false
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["wildmode", "wim"], "stringlist",
|
||||
{
|
||||
short_help: "Define how command line completion works",
|
||||
shortHelp: "Define how command line completion works",
|
||||
help: "It is a comma-separated list of parts, where each part specifies " +
|
||||
"what to do for each consecutive use of the completion key. The first part " +
|
||||
"specifies the behavior for the first use of the completion key, the second part " +
|
||||
@@ -753,7 +753,7 @@ vimperator.Options = function () //{{{
|
||||
"<tr><td><b>'list:longest'</b></td><td>When more than one match, list all matches and complete till the longest common string.</td></tr>" +
|
||||
"</table>" +
|
||||
"When there is only a single match, it is fully completed regardless of the case.",
|
||||
default_value: "list:full",
|
||||
defaultValue: "list:full",
|
||||
validator: function (value)
|
||||
{
|
||||
return value.split(",").every(function (item) { return /^(full|longest|list|list:full|list:longest|)$/.test(item); });
|
||||
@@ -762,30 +762,30 @@ vimperator.Options = function () //{{{
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["wildoptions", "wop"], "stringlist",
|
||||
{
|
||||
short_help: "Change how command line completion is done",
|
||||
shortHelp: "Change how command line completion is done",
|
||||
help: "A list of words that change how command line completion is done.<br/>" +
|
||||
"Currently only one word is allowed:<br/>" +
|
||||
"<table>" +
|
||||
"<tr><td><b>sort</b></td><td>Always sorts completion list, overriding the <code class=\"option\">'complete'</code> option.</td></tr>" +
|
||||
"</table>",
|
||||
default_value: "",
|
||||
defaultValue: "",
|
||||
validator: function (value) { return /^(sort|)$/.test(value); }
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["nextpattern"], "stringlist",
|
||||
{
|
||||
short_help: "String to search when looking for 'next' page in document relation",
|
||||
shortHelp: "String to search when looking for 'next' page in document relation",
|
||||
help: "Change it to make it look for another string in links when pressing ]n<br/>" +
|
||||
"This value is case insensitive",
|
||||
default_value: "\\bnext,^>$"
|
||||
defaultValue: "\\bnext,^>$"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["previouspattern"], "stringlist",
|
||||
{
|
||||
short_help: "String to search when looking for 'prev' page in document relation",
|
||||
shortHelp: "String to search when looking for 'prev' page in document relation",
|
||||
help: "Change it to make it look for another string in links when pressing ]p<br/>" +
|
||||
"This value is case insensitive",
|
||||
default_value: "\\bprev,previous\\b,^<$"
|
||||
defaultValue: "\\bprev,previous\\b,^<$"
|
||||
}
|
||||
));
|
||||
//}}}
|
||||
@@ -795,7 +795,7 @@ vimperator.Options = function () //{{{
|
||||
setShowTabline(0);
|
||||
setGuiOptions("");
|
||||
setLastStatus(0);
|
||||
guioptions_done = showtabline_done = laststatus_done = false;
|
||||
guioptionsDone = showtablineDone = laststatusDone = false;
|
||||
|
||||
setTitleString(optionManager.titlestring);
|
||||
setPopups(optionManager.popups);
|
||||
|
||||
Reference in New Issue
Block a user