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

Fix some inline/help docs.

This commit is contained in:
Kris Maglione
2009-01-08 20:56:26 -05:00
parent 6534a0c665
commit c4f5d4f84d
9 changed files with 154 additions and 173 deletions

View File

@@ -156,7 +156,7 @@ function Buffer() //{{{
options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm", options.add(["pageinfo", "pa"], "Desired info on :pa[geinfo]", "charlist", "gfm",
{ {
completer: function (filter) [[k, v[1]] for ([k, v] in Iterator(pageInfo))], completer: function (context) [[k, v[1]] for ([k, v] in Iterator(pageInfo))],
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -169,7 +169,7 @@ function Buffer() //{{{
"Show the destination of the link under the cursor in the status bar", "Show the destination of the link under the cursor in the status bar",
"number", 1, "number", 1,
{ {
completer: function (filter) [ completer: function (context) [
["0", "Don't show link destination"], ["0", "Don't show link destination"],
["1", "Show the link in the status line"], ["1", "Show the link in the status line"],
["2", "Show the link in the command line"] ["2", "Show the link in the command line"]
@@ -355,8 +355,7 @@ function Buffer() //{{{
function () function ()
{ {
liberator.open(util.readFromClipboard(), liberator.open(util.readFromClipboard(),
/\bpaste\b/.test(options["activate"]) ? liberator[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]);
liberator.NEW_BACKGROUND_TAB : liberator.NEW_TAB);
}); });
mappings.add(myModes, ["p", "<MiddleMouse>"], mappings.add(myModes, ["p", "<MiddleMouse>"],

View File

@@ -73,10 +73,10 @@ function Hints() //{{{
t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, liberator.NEW_TAB)), t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, liberator.NEW_TAB)),
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)), b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended), w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended),
F: Mode("Follow hint sequence in tabs", hintSequenceElement), F: Mode("Open multiple hints in tabs", hintAction_F),
O: Mode("Preselect hint in an :open query", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)), O: Mode(":open URL based on hint location", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode("Preselect hint in a :tabopen query", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)), T: Mode(":tabopen URL based on hint location", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode("Preselect hint in a :winopen query", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)), W: Mode(":winopen URL based on hint location", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
v: Mode("View hint source", function (elem, loc) buffer.viewSource(loc, false), extended), v: Mode("View hint source", function (elem, loc) buffer.viewSource(loc, false), extended),
V: Mode("View hint source in external editor", function (elem, loc) buffer.viewSource(loc, true), extended), V: Mode("View hint source in external editor", function (elem, loc) buffer.viewSource(loc, true), extended),
y: Mode("Yank hint location", function (elem, loc) util.copyToClipboard(loc, true)), y: Mode("Yank hint location", function (elem, loc) util.copyToClipboard(loc, true)),
@@ -84,12 +84,11 @@ function Hints() //{{{
}; };
// Used to open multiple hints // Used to open multiple hints
function hintSequenceElement(elem) function hintAction_F(elem)
{ {
buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB); buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB);
// Move to next element in sequence // TODO: Maybe we find a *simple* way to keep the hints displayed rather than
// TODO: Maybe we find a *simple* way to keep the hints displayed rather than
// showing them again, or is this short flash actually needed as a "usability // showing them again, or is this short flash actually needed as a "usability
// feature"? --mst // feature"? --mst
hints.show("F"); hints.show("F");
@@ -574,10 +573,12 @@ function Hints() //{{{
"How links are matched", "How links are matched",
"string", "contains", "string", "contains",
{ {
completer: function (filter) completer: function (context) [
{ ["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."],
return [[m, ""] for each (m in ["contains", "wordstartswith", "firstletters", "custom"])]; ["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginings of words, in order."],
}, ["firstletters", "Behaves like wordstartswith, but all groups much match a sequence of words."],
["custom", "Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)"],
],
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -605,7 +606,7 @@ function Hints() //{{{
// does. --tpp // does. --tpp
mappings.add(myModes, ["F"], mappings.add(myModes, ["F"],
"Start QuickHint mode, but open link in a new tab", "Start QuickHint mode, but open link in a new tab",
function () { options.getPref("browser.tabs.loadInBackground") ? hints.show("b") : hints.show("t"); }); function () { hints.show(options.getPref("browser.tabs.loadInBackground") ? "b" : "t"); });
mappings.add(myModes, [";"], mappings.add(myModes, [";"],
"Start an extended hint mode", "Start an extended hint mode",

View File

@@ -153,7 +153,7 @@ const liberator = (function () //{{{
group.setter(value); group.setter(value);
return value; return value;
}, },
completer: function (filter) completer: function (context)
{ {
let opts = [v.opts for ([k, v] in Iterator(groups))]; let opts = [v.opts for ([k, v] in Iterator(groups))];
opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]); opts = opts.map(function (opt) [[k, v[0]] for ([k, v] in Iterator(opt))]);

View File

@@ -140,14 +140,11 @@ function Tabs() //{{{
return value; return value;
}, },
completer: function (filter) completer: function (context) [
{ ["0", "Never show tab bar"],
return [ ["1", "Show tab bar only if more than one tab is open"],
["0", "Never show tab bar"], ["2", "Always show tab bar"]
["1", "Show tab bar only if more than one tab is open"], ],
["2", "Always show tab bar"]
];
},
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -157,15 +154,12 @@ function Tabs() //{{{
"Define when tabs are automatically activated", "Define when tabs are automatically activated",
"stringlist", "homepage,quickmark,tabopen,paste", "stringlist", "homepage,quickmark,tabopen,paste",
{ {
completer: function (filter) completer: function (context) [
{ ["homepage", "gH mapping"],
return [ ["quickmark", "go and gn mappings"],
["homepage", "gH mapping"], ["tabopen", ":tabopen[!] command"],
["quickmark", "go and gn mappings"], ["paste", "P and gP mappings"]
["tabopen", ":tabopen[!] command"], ],
["paste", "P and gP mappings"]
];
},
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -173,17 +167,14 @@ function Tabs() //{{{
"Define which commands should output in a new tab by default", "Define which commands should output in a new tab by default",
"stringlist", "", "stringlist", "",
{ {
completer: function (filter) completer: function (context) [
{ ["all", "All commands"],
return [ ["addons", ":addo[ns] command"],
["all", "All commands"], ["downloads", ":downl[oads] command"],
["addons", ":addo[ns] command"], ["help", ":h[elp] command"],
["downloads", ":downl[oads] command"], ["javascript", ":javascript! or :js! command"],
["help", ":h[elp] command"], ["prefs", ":pref[erences]! or :prefs! command"]
["javascript", ":javascript! or :js! command"], ],
["prefs", ":pref[erences]! or :prefs! command"]
];
},
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -204,16 +195,13 @@ function Tabs() //{{{
return value; return value;
}, },
completer: function (filter) completer: function (context) [
{ ["0", "Force to open in the current tab"],
return [ ["1", "Always open in a new tab"],
["0", "Force to open in the current tab"], ["2", "Open in a new window if it has a specific requested size (default in Firefox)"],
["1", "Always open in a new tab"], ["3", "Always open in a new window"],
["2", "Open in a new window if it has a specific requested size (default in Firefox)"], ["4", "Open in the same tab unless it has a specific requested size"]
["3", "Always open in a new window"], ],
["4", "Open in the same tab unless it has a specific requested size"]
];
},
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab"; let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab";

View File

@@ -122,10 +122,11 @@ function CommandLine() //{{{
}, },
/** /**
* move up or (if backward) down in the history * Move forward or backward in history.
* *
* @param {boolean} backward * @param {boolean} backward Direction to move.
* @param {boolean} matchCurrent XXX: what? * @param {boolean} matchCurrent Search for matches starting
* with the current input value.
*/ */
select: function (backward, matchCurrent) select: function (backward, matchCurrent)
{ {
@@ -590,7 +591,7 @@ function CommandLine() //{{{
var multilineCallback = null; var multilineCallback = null;
/** /**
* @private - highlight the messageBox according to group * Highlight the messageBox according to group.
*/ */
function setHighlightGroup(group) function setHighlightGroup(group)
{ {
@@ -598,7 +599,7 @@ function CommandLine() //{{{
} }
/** /**
* @private - Determines whether the command line should be visible. * Determines whether the command line should be visible.
* *
* @return {boolean} * @return {boolean}
*/ */
@@ -606,7 +607,7 @@ function CommandLine() //{{{
!(modes.extended & (modes.INPUT_MULTILINE | modes.OUTPUT_MULTILINE)); !(modes.extended & (modes.INPUT_MULTILINE | modes.OUTPUT_MULTILINE));
/** /**
* @private - set the prompt to val styled with highlightGroup * Set the command-line prompt.
* *
* @param {string} val * @param {string} val
* @param {string} highlightGroup * @param {string} highlightGroup
@@ -620,7 +621,8 @@ function CommandLine() //{{{
} }
/** /**
* @private - set the command to cmd and move the user's cursor to the end. * Set the command-line input value. The caret is reset to the
* end of the line.
* *
* @param {string} cmd * @param {string} cmd
*/ */
@@ -632,12 +634,12 @@ function CommandLine() //{{{
} }
/** /**
* @private - display a message styled with highlightGroup * Display a message in the command-line area.
* and, if forceSingle is true, ensure it takes only one line.
* *
* @param {string} str * @param {string} str
* @param {string} highlightGroup * @param {string} highlightGroup
* @param {boolean} forceSingle * @param {boolean} forceSingle If provided, don't let over-long
* messages move to the MOW.
*/ */
function echoLine(str, highlightGroup, forceSingle) function echoLine(str, highlightGroup, forceSingle)
{ {
@@ -655,13 +657,12 @@ function CommandLine() //{{{
} }
/** /**
* Display a multiline message, possible through a "more" like interface * Display a multiline message.
*
* TODO: resize upon a window resize
* *
* @param {string} str * @param {string} str
* @param {string} highlightGroup * @param {string} highlightGroup
*/ */
// TODO: resize upon a window resize
function echoMultiline(str, highlightGroup) function echoMultiline(str, highlightGroup)
{ {
let doc = multilineOutputWidget.contentDocument; let doc = multilineOutputWidget.contentDocument;
@@ -707,7 +708,7 @@ function CommandLine() //{{{
} }
/** /**
* @private - ensure that the Multiline input widget is the * Ensure that the Multiline input widget is the
* correct size. * correct size.
*/ */
function autosizeMultilineInputWidget() function autosizeMultilineInputWidget()
@@ -718,14 +719,12 @@ function CommandLine() //{{{
} }
/** /**
* @private - eval()s a javascript expression * eval() a JavaScript expression and return a string suitable
* and returns a string suitable to be echo'd. * to be echoed.
*
* If useColor is true, util.objectToString will
* colorize object output.
* *
* @param {string} arg * @param {string} arg
* @param {boolean} useColor * @param {boolean} useColor When true, the result is a
* highlighted XML object.
*/ */
function echoArgumentToString(arg, useColor) function echoArgumentToString(arg, useColor)
{ {
@@ -793,7 +792,7 @@ function CommandLine() //{{{
"Items which are completed at the :[tab]open prompt", "Items which are completed at the :[tab]open prompt",
"charlist", "sfl", "charlist", "sfl",
{ {
completer: function completer(filter) [k for each (k in completion.urlCompleters)], completer: function (context) [k for each (k in completion.urlCompleters)],
validator: Option.validateCompleter validator: Option.validateCompleter
}); });
@@ -832,18 +831,15 @@ function CommandLine() //{{{
"Define how command line completion works", "Define how command line completion works",
"stringlist", "list:full", "stringlist", "list:full",
{ {
completer: function completer(filter) completer: function (context) [
{ // Why do we need ""?
return [ ["", "Complete only the first match"],
// Why do we need ""? ["full", "Complete the next full match"],
["", "Complete only the first match"], ["longest", "Complete to longest common string"],
["full", "Complete the next full match"], ["list", "If more than one match, list all matches"],
["longest", "Complete to longest common string"], ["list:full", "List all and complete first match"],
["list", "If more than one match, list all matches"], ["list:longest", "List all and complete common string"]
["list:full", "List all and complete first match"], ],
["list:longest", "List all and complete common string"]
];
},
validator: Option.validateCompleter, validator: Option.validateCompleter,
checkHas: function (value, val) checkHas: function (value, val)
{ {
@@ -995,9 +991,6 @@ function CommandLine() //{{{
storage.styles.removeSheet(true, "silent-mode"); storage.styles.removeSheet(true, "silent-mode");
}, },
/**
* XXX: This function is not used!
*/
runSilently: function (fn, self) runSilently: function (fn, self)
{ {
let wasSilent = this.silent; let wasSilent = this.silent;
@@ -1026,14 +1019,14 @@ function CommandLine() //{{{
get message() messageBox.value, get message() messageBox.value,
/** /**
* Changes the command line to display the following prompt (usually ":") * Open the command line. The main mode is set to
* followed by the command, in the given mode. Valid modes are * COMMAND_LINE, the extended mode to <b>extendedMode</b>.
* attributes of the "modes" variable, and modes.EX is probably * Further, callbacks defined for <b>extendedMode</b> are
* a good choice. * triggered as appropriate (see {@link Liberator#registerCallback}).
* *
* @param {string} prompt * @param {string} prompt
* @param {string} cmd * @param {string} cmd
* @param {number} mode * @param {number} extendedMode
*/ */
open: function open(prompt, cmd, extendedMode) open: function open(prompt, cmd, extendedMode)
{ {
@@ -1060,9 +1053,10 @@ function CommandLine() //{{{
}, },
/** /**
* Removes any input from the command line, without executing its * Closes the command line. This is ordinarilly triggered
* contents. Removes any "More" windows or other such output. * automatically by a mode change. Will not hide the command
* Pressing <ESC> in EX mode normally has this effect. * line immediately if called directly after a successful
* command, otherwise it will.
*/ */
close: function close() close: function close()
{ {
@@ -1099,7 +1093,8 @@ function CommandLine() //{{{
/** /**
* Hide any auto-completion/More-ing that is happening. * Hides the command line, and shows any status messages that
* are under it.
*/ */
hide: function hide() hide: function hide()
{ {
@@ -1107,19 +1102,24 @@ function CommandLine() //{{{
}, },
/** /**
* Output the given string onto the command line coloured * Output the given string onto the command line. With no
* using the rules according to highlightGroup. If not * flags, the message will be shown in the status line if it's
* given higlightGroup defaults to commandline.HL_NORMAL * short enough to fit, and contains no new lines, and isn't
* and other possibe values are at commandline.HL_[A-Z]*. * XML. Otherwise, it will be shown in the MOW.
*
* Flags can be any of:
* commandline.APPEND_TO_MESSAGES (causes message to be added to the messagesHistory)
* commandline.FORCE_SINGLELINE | commandline.DISALLOW_MULTILINE
* commandline.FORCE_MULTILINE
* *
* @param {string} str * @param {string} str
* @param {string} highlightGroup * @param {string} highlightGroup The Highlight group for the
* @param {number} flags * message. @default "Normal"
* @param {number} flags Changes the bahavior as follows:
* commandline.APPEND_TO_MESSAGES - Causes message to be added to the messages
* history, and shown by :messages.
* commandline.FORCE_SINGLELINE - Forbids the command from
* being pushed to the MOW if it's too long or of
* there are already status messages being shown.
* commandline.DISALLOW_MULTILINE - Cancels the operation if
* the MOW is already visible.
* commandline.FORCE_MULTILINE - Forces the message to
* appear in the MOW.
*/ */
echo: function echo(str, highlightGroup, flags) echo: function echo(str, highlightGroup, flags)
{ {
@@ -1169,21 +1169,15 @@ function CommandLine() //{{{
}, },
/** /**
* Prompt the user for a string and execute the given * Prompt the user. Sets modes.main to COMMAND_LINE, which the
* callback with that as the only argument on <CR> * user may pop at any time to close the prompt.
* extra can have any of the following attributes:
* *
* onChange: A function to be called with the current input every time it changes * @param {string} prompt The input prompt to use.
* completer: A function called with a ?context? when the user tries to tabcomplete
* promptHighlight: The HighlightGroup to use (default commandline.HL_QUESTION, others
* can be found at commandline.HL_[A-Z]*)
*
* This function sets the mode to modes.COMMAND_LINE, and thus popping the mode will
* stop further input from being waited for (useful for stopping onChange)
*
* @param {string} prompt
* @param {function(string)} callback * @param {function(string)} callback
* @param {Object} extra * @param {object} extra
* @... {function} onChange - A function to be called with the current input every time it changes
* @... {function(CompletionContext)} completer - A completion function for the user's input.
* @... {string} promptHighlight - The HighlightGroup used for the prompt. @default "Question"
*/ */
input: function input(prompt, callback, extra) input: function input(prompt, callback, extra)
{ {
@@ -1212,6 +1206,7 @@ function CommandLine() //{{{
* @param {RegExp} untilRegexp * @param {RegExp} untilRegexp
* @param {function(string)} callbackFunc * @param {function(string)} callbackFunc
*/ */
// FIXME: Buggy, especially when pasting. Shouldn't use a RegExp.
inputMultiline: function inputMultiline(untilRegexp, callbackFunc) inputMultiline: function inputMultiline(untilRegexp, callbackFunc)
{ {
// Kludge. // Kludge.
@@ -1232,11 +1227,13 @@ function CommandLine() //{{{
}, },
/** /**
* Handle events, the come from liberator when liberator.mode = modes.COMMAND_LINE * Handles all command line events. All key events are passed
* but also takes blur/focus/input events raw from #liberator-commandline-command * here when COMMAND_LINE mode is active, as well as all
* in the XUL * input, keyup, focus, and blur events sent to the
* command-line XUL element.
* *
* @param {Event} event * @param {Event} event
* @private
*/ */
onEvent: function onEvent(event) onEvent: function onEvent(event)
{ {
@@ -1970,14 +1967,11 @@ function StatusLine() //{{{
return value; return value;
}, },
completer: function completer(filter) completer: function completer(context) [
{ ["0", "Never display status line"],
return [ ["1", "Display status line only if there are multiple windows"],
["0", "Never display status line"], ["2", "Always display status line"]
["1", "Display status line only if there are multiple windows"], ],
["2", "Always display status line"]
];
},
validator: Option.validateCompleter validator: Option.validateCompleter
}); });

View File

@@ -792,9 +792,9 @@ function History() //{{{
function (args) { history.list(args.join(" "), args.bang, args["-max"] || 1000); }, function (args) { history.list(args.join(" "), args.bang, args["-max"] || 1000); },
{ {
bang: true, bang: true,
completer: function (context) { context.quote = null, completion.history(context); }, completer: function (context) { context.quote = null; completion.history(context); },
options: [[["-max", "-m"], options.OPTION_INT]]
// completer: function (filter) completion.history(filter) // completer: function (filter) completion.history(filter)
options: [[["-max", "-m"], options.OPTION_INT]]
}); });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}

View File

@@ -40,21 +40,21 @@ The first URL is opened in the current tab, and all other URLs are
opened in new tabs. opened in new tabs.
Each token is analyzed and in this order: Each token is analyzed and in this order:
. Opened as a local file if it is an existing relative or absolute filename. 1. Opened as a local file if it is an existing relative or absolute filename.
* [c]:open /etc/fstab[c] shows the file system table. - [c]:open /etc/fstab[c] shows the file system table.
* [c]:open ../other/foo.html[c] in your home directory opens - [c]:open ../other/foo.html[c] in your home directory opens
[a]/home/other/foo.html[a] [a]/home/other/foo.html[a]
. Opened with the specified search engine if the token looks like a search 2. Opened with the specified search engine if the token looks like a search
string and the first word is the name of a search engine ([c]:open wikipedia string and the first word is the name of a search engine ([c]:open wikipedia
linus torvalds[c] opens the Wikipedia entry for linus torvalds). The short linus torvalds[c] opens the Wikipedia entry for linus torvalds). The short
name of a search engine is automatically guessed from its name. If you want name of a search engine is automatically guessed from its name. If you want
to set a custom name, you can change it with [c]:dialog searchengines[c]. to set a custom name, you can change it with [c]:dialog searchengines[c].
. Opened with the default search engine or keyword (specified with the 3. Opened with the default search engine or keyword (specified with the
'defsearch' option) if the first word is no search engine ([c]:open linus 'defsearch' option) if the first word is no search engine ([c]:open linus
torvalds[c] opens a Google search for linux torvalds). torvalds[c] opens a Google search for linux torvalds).
. Passed directly to Firefox in all other cases ([c]:open www.osnews.com, 4. Passed directly to Firefox in all other cases ([c]:open www.osnews.com,
www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new www.slashdot.org[c] opens OSNews in the current, and Slashdot in a new
background tab). background tab).
You can use [c]:open -tags linux torvalds<Tab>[c] to complete bookmarks with You can use [c]:open -tags linux torvalds<Tab>[c] to complete bookmarks with
tag "linux" and which contain "torvalds". Note that -tags support is only tag "linux" and which contain "torvalds". Note that -tags support is only

View File

@@ -51,9 +51,9 @@ this hint mode. Then press [a]24[a] to copy the hint location.
* |;b| [m]b[m] to open its location in a new background tab * |;b| [m]b[m] to open its location in a new background tab
* |;w| [m]w[m] to open its destination in a new window * |;w| [m]w[m] to open its destination in a new window
* |;F| [m]F[m] to follow a sequence of [m]<CR>[m]-delimited hints in background tabs * |;F| [m]F[m] to follow a sequence of [m]<CR>[m]-delimited hints in background tabs
* |;O| [m]O[m] to preselect its location in an [c]:open[c] query * |;O| [m]O[m] to [c]:open[c] a URL based on hint location
* |;T| [m]T[m] to preselect its location in a [c]:tabopen[c] query * |;T| [m]T[m] to [c]:tabopen[c] a URL based on its location
* |;W| [m]W[m] to preselect its location in a [c]:winopen[c] query * |;W| [m]W[m] to [c]:winopen[c] a URL based on its location
* |;v| [m]v[m] to view its destination source * |;v| [m]v[m] to view its destination source
* |;V| [m]V[m] to view its destination source in the external editor * |;V| [m]V[m] to view its destination source in the external editor
* |;y| [m]y[m] to yank its destination location * |;y| [m]y[m] to yank its destination location

View File

@@ -7,27 +7,26 @@ section:Initialization[initialization,startup]
At startup, Vimperator completes the following tasks in order. At startup, Vimperator completes the following tasks in order.
. Vimperator can perform user initialization commands. When 1. Vimperator can perform user initialization commands. When
one of the following is successfully located, it is executed, and no one of the following is successfully located, it is executed, and no
further locations are tried. further locations are tried.
|$VIMPERATOR_INIT|
.. |$VIMPERATOR_INIT| _$VIMPERATOR_INIT_ -- May contain a single ex a. _$VIMPERATOR_INIT_ -- May contain a single ex command (e.g.,
command (e.g., "[c]:source {file}[c]").
"[c]:source {file}[c]"). b. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its contents
.. [a]\~/_vimperatorrc[a] -- Windows only. If this file exists, its are executed.
contents are executed. c. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are executed.
.. [a]\~/.vimperatorrc[a] -- If this file exists, its contents are
executed.
. If 'exrc' is set, then any RC file in the current directory is also sourced. 2. If 'exrc' is set, then any RC file in the current directory is also sourced.
. All directories in 'runtimepath' are searched for a "plugin" 3. All directories in 'runtimepath' are searched for a "plugin"
subdirectory and all yet unloaded plugins are loaded. For each subdirectory and all yet unloaded plugins are loaded. For each plugin
plugin directory, all *.\{js,vimp} files (including those in further directory, all *.\{js,vimp} files (including those in further
subdirectories) are sourced alphabetically. No plugins will be sourced subdirectories) are sourced alphabetically. No plugins will be sourced
if 'noloadplugins' is set. Any particular plugin will not be loaded if 'noloadplugins' is set. Any particular plugin will not be loaded if
if it has already been loaded (e.g., by an earlier [c]:loadplugins[c] it has already been loaded (e.g., by an earlier [c]:loadplugins[c]
command). command).
The user's ~ (i.e., "home") directory is determined as follows: The user's ~ (i.e., "home") directory is determined as follows: