diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js
index b5e1da91..4af470c6 100644
--- a/chrome/content/vimperator/commands.js
+++ b/chrome/content/vimperator/commands.js
@@ -414,7 +414,7 @@ function Commands()//{{{
"Make sure you use the full vim notation when jumping to {subject}. This means:
"+
"
"+
":help :help for commands (: prefix) "+
- ":help 'complete' for settings (surrounded by ' and ') "+
+ ":help 'complete' for options (surrounded by ' and ') "+
":help o for mappings (no pre- or postfix) "+
"
"+
"You can however use partial stings in the tab completion, so :help he<Tab> will complete :help :help.",
@@ -494,14 +494,14 @@ function Commands()//{{{
"Opened with the specified search engine if the token looks like a search string "+
"and the first word of the token is the name of a search engine (:open wikipedia linus torvalds "+
"will open the wikipedia entry for linux torvalds)."+
- " Opened with the default search engine or keyword (specified with the 'defsearch' setting) "+
+ " Opened with the default search engine or keyword (specified with the 'defsearch' option) "+
"if the first word is no search engine (:open linus torvalds will open a google search for linux torvalds)."+
" Passed directly to Firefox in all other cases (:open www.osnews.com | www.slashdot.org will "+
"open OSNews in the current, and Slashdot in a new background tab)."+
""+
"You WILL be able to use :open [-T \"linux\"] torvalds<Tab> to complete bookmarks "+
"with tag \"linux\" and which contain \"torvalds\". Note that -T support is only available for tab completion, not for the actual command.
"+
- "The items which are completed on <Tab> are specified in the 'complete' option.
"+
+ "The items which are completed on <Tab> are specified in the 'complete' option.
"+
"Without argument, reloads the current page.
"+
"Without argument but with !, reloads the current page skipping the cache.",
completer: function(filter) { return get_url_completions(filter); }
@@ -584,7 +584,7 @@ function Commands()//{{{
":set option? or :set option shows the current value of the option.
"+
":set option& resets 'option' to the default value.
"+
":set option+=foo and :set option-=foo WILL add/remove foo from list options.
",
- completer: function(filter) { return get_settings_completions(filter); }
+ completer: function(filter) { return get_options_completions(filter); }
}
));
addDefaultCommand(new Command(["so[urce]"],
@@ -652,7 +652,7 @@ function Commands()//{{{
usage: ["tabopen [url] [| url]"],
short_help: "Open one or more URLs in a new tab",
help: "Like :open but open URLs in a new tab.
"+
- "If used with !, the 'tabopen' value of the 'activate' setting is negated.",
+ "If used with !, the 'tabopen' value of the 'activate' option is negated.",
completer: function (filter) { return get_url_completions(filter); }
}
));
@@ -1517,15 +1517,15 @@ function set(args, special)
var no = true; if (matches[1] == undefined) no = false;
var opt = matches[2];
- var setting = get_setting(opt);
- if (!setting)
+ var option = get_option(opt);
+ if (!option)
{
vimperator.echoerr("E518: Unknown option: " + opt);
return;
}
var get = false; if (matches[3] == "?" ||
- (setting[TYPE] != 'boolean' && matches[4] == undefined)) get = true;
+ (option[TYPE] != 'boolean' && matches[4] == undefined)) get = true;
var reset = false; if (matches[3] == "&") reset = true;
var oper = matches[5];
var val = matches[6]; if (val == undefined) val = "";
@@ -1533,42 +1533,42 @@ function set(args, special)
// reset a variable to its default value.
if (reset)
{
- var def = setting[DEFAULT];
- setting[SETFUNC].call(this, def);
+ var def = option[DEFAULT];
+ option[SETFUNC].call(this, def);
}
// read access
else if (get)
{
- var cur_val = setting[GETFUNC].call(this);
- vimperator.echo(" " + setting[COMMANDS][0] + "=" + cur_val);
+ var cur_val = option[GETFUNC].call(this);
+ vimperator.echo(" " + option[COMMANDS][0] + "=" + cur_val);
}
// write access
else
{
- var type = setting[TYPE];
+ var type = option[TYPE];
if (type == "boolean")
{
- setting[SETFUNC].call(this, !no);
+ option[SETFUNC].call(this, !no);
}
else if (type == "number")
{
var num = parseInt(val, 10);
if (isNaN(num))
- vimperator.echoerr("Invalid argument type to option " + setting[COMMANDS][0] + ": Expects number");
+ vimperator.echoerr("Invalid argument type to option " + option[COMMANDS][0] + ": Expects number");
else
{
- var cur_val = setting[GETFUNC].call(this);
+ var cur_val = option[GETFUNC].call(this);
if (oper == '+') num = cur_val + num;
if (oper == '-') num = cur_val - num;
- if (setting[CHECKFUNC] != null && setting[CHECKFUNC].call(this, num) == false)
- vimperator.echoerr("Invalid argument to option " + setting[COMMANDS][0] + ": Check help for more details");
+ if (option[CHECKFUNC] != null && option[CHECKFUNC].call(this, num) == false)
+ vimperator.echoerr("Invalid argument to option " + option[COMMANDS][0] + ": Check help for more details");
else // all checks passed, execute option handler
- setting[SETFUNC].call(this, num);
+ option[SETFUNC].call(this, num);
}
}
else if (type == "charlist" || type == "stringlist" || type == "string")
{
- var cur_val = setting[GETFUNC].call(this);
+ var cur_val = option[GETFUNC].call(this);
if (type == "charlist" || type == "string")
{
if (oper == '+' && !cur_val.match(val))
@@ -1585,10 +1585,10 @@ function set(args, special)
val = val.replace(/^,?/, '');
}
}
- if (setting[CHECKFUNC] != null && setting[CHECKFUNC].call(this, val) == false)
- vimperator.echoerr("Invalid argument to option " + setting[COMMANDS][0] + ": Check help for more details");
+ if (option[CHECKFUNC] != null && option[CHECKFUNC].call(this, val) == false)
+ vimperator.echoerr("Invalid argument to option " + option[COMMANDS][0] + ": Check help for more details");
else // all checks passed, execute option handler
- setting[SETFUNC].call(this, val);
+ option[SETFUNC].call(this, val);
}
else
vimperator.echoerr("Internal error, option format `" + type + "' not supported");
diff --git a/chrome/content/vimperator/completion.js b/chrome/content/vimperator/completion.js
index 55c7ea5b..d36e9567 100644
--- a/chrome/content/vimperator/completion.js
+++ b/chrome/content/vimperator/completion.js
@@ -97,7 +97,7 @@ function build_longest_starting_substring(list, filter)/*{{{*/
return filtered;
}/*}}}*/
-/*
+/*
* filter a list of urls
*
* may consist of searchengines, filenames, bookmarks and history,
@@ -255,7 +255,7 @@ function get_help_completions(filter)/*{{{*/
{
var help_array = [[["mappings"], "Normal mode commands"],
[["commands"], "Ex commands"],
- [["settings"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages'
+ [["options"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages'
g_substrings = [];
for (var command in vimperator.commands)
{
@@ -264,8 +264,8 @@ function get_help_completions(filter)/*{{{*/
}),
command.short_help])
}
- settings = get_settings_completions(filter, true);
- help_array = help_array.concat(settings.map(function($_) {
+ options = get_options_completions(filter, true);
+ help_array = help_array.concat(options.map(function($_) {
return [
$_[COMMANDS].map(function($_) { return "'" + $_ + "'"; }),
$_[1]
@@ -298,23 +298,23 @@ function get_command_completions(filter)/*{{{*/
return build_longest_starting_substring(completions, filter);
}/*}}}*/
-function get_settings_completions(filter, unfiltered)/*{{{*/
+function get_options_completions(filter, unfiltered)/*{{{*/
{
g_substrings = [];
- var settings_completions = [];
+ var options_completions = [];
var no_mode = false;
if (filter.indexOf("no") == 0) // boolean option
{
no_mode = true;
filter = filter.substr(2);
}
- if (unfiltered) return g_settings.filter(function($_) {
+ if (unfiltered) return g_options.filter(function($_) {
if (no_mode && $_[TYPE] != "boolean") return false;
else return true;
}).map(function($_) {
return [$_[COMMANDS], $_[SHORTHELP]];
});
- if (!filter) return g_settings.filter(function($_) {
+ if (!filter) return g_options.filter(function($_) {
if (no_mode && $_[TYPE] != "boolean") return false;
else return true;
}).map(function($_) {
@@ -326,49 +326,49 @@ function get_settings_completions(filter, unfiltered)/*{{{*/
else if(filter.length > 0 && filter.lastIndexOf("=") == filter.length -1)
{
filter = filter.substr(0, filter.length-1);
- for(var i=0; i");
// color {count} and [url] arguments in the usage, not nice and error prone but the regexp work (for now)
usage = usage.replace(/(^|;|\n|\s|\]|\}|=|
)({.*?}|\[.*?\])/gm, "$1$2");
- // and the 'setting' in a different color
- usage = usage.replace(/^'(\w+)'/gm, "'$1'");
+ // and the 'option' in a different color
+ usage = usage.replace(/^'(\w+)'/gm, "'$1'");
ret += "" +beg+ usage +end+ '
';
}
ret += '';
@@ -76,7 +76,7 @@ function help(section, easter)
ret += '';
ret += commands[i][SHORTHELP]; // the help description
ret += " ";
- if(func) // for settings whe print default values here, e.g.
+ if(func) // for options we print default values here, e.g.
{
ret += func.call(this, commands[i]);
ret += " ";
@@ -110,7 +110,7 @@ function help(section, easter)
}
return ret;
}
- function makeSettingsHelpString(command)
+ function makeOptionsHelpString(command)
{
var ret = "";
ret = command[TYPE] + ' (default: ';
@@ -132,7 +132,7 @@ function help(section, easter)
ret += ") ";
return ret;
}
-
+
var header = 'Vimperator\n' +
'First there was a Navigator, then there was an Explorer. \n' +
'Later it was time for a Konqueror. Now it\'s time for an Imperator, the VIMperator :) \n';
@@ -186,10 +186,10 @@ function help(section, easter)
'now dead, unfortunately. So now you might wonder what the meaning of death ' +
'is...\n';
- var settings = 'Settings\n' +
- '\n';
- settings += makeHelpString(g_settings, "'", "'", makeSettingsHelpString);
- settings += ' ';
+ var options = 'Options\n' +
+ '\n';
+ options += makeHelpString(g_options, "'", "'", makeOptionsHelpString);
+ options += ' ';
var fulldoc = '\n' +
'\n' +
@@ -202,7 +202,7 @@ function help(section, easter)
introduction +
mappings +
commands +
- settings +
+ options +
'\n\n |