mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:58:00 +01:00
biggest commit ever: cvs diff -u |wc -l -> 2491 lines; Removed all inline help
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -287,36 +287,13 @@ vimperator.Completion = function () //{{{
|
||||
},
|
||||
|
||||
help: function (filter)
|
||||
{
|
||||
var helpArray = [[["introduction"], "Introductory text"],
|
||||
[["initialization"], "Initialization and startup"],
|
||||
[["mappings"], "Normal mode commands"],
|
||||
[["commands"], "Ex commands"],
|
||||
[["options"], "Configuration options"]]; // TODO: hardcoded until we have proper 'pages'
|
||||
substrings = [];
|
||||
for (var command in vimperator.commands)
|
||||
helpArray.push([command.longNames.map(function ($_) { return ":" + $_; }), command.shortHelp]);
|
||||
options = this.option(filter, false, true);
|
||||
helpArray = helpArray.concat(options.map(function ($_) {
|
||||
return [
|
||||
$_[0].map(function ($_) { return "'" + $_ + "'"; }),
|
||||
$_[1]
|
||||
];
|
||||
}));
|
||||
for (var map in vimperator.mappings)
|
||||
helpArray.push([map.names, map.shortHelp]);
|
||||
|
||||
// unfiltered, use the first command
|
||||
if (!filter)
|
||||
return [0, helpArray.map(function ($_) { return [$_[0][0], $_[1]]; })];
|
||||
|
||||
return [0, buildLongestCommonSubstring(helpArray, filter)];
|
||||
},
|
||||
|
||||
Help: function (filter)
|
||||
{
|
||||
var res = [];
|
||||
var files = ["intro.html", "options.html", "motion.html", "starting.html", "browsing.html", "various.html", "developer.html"];
|
||||
// they are sorted by relevance, not alphabetically
|
||||
var files = ["intro.html", "starting.html", "browsing.html", "motion.html",
|
||||
"options.html", "tabs.html", "marks.html", "repeat.html",
|
||||
"autocommands.html", "developer.html", "various.html"];
|
||||
|
||||
for (var file in files)
|
||||
{
|
||||
try
|
||||
|
||||
280
content/help.js
280
content/help.js
@@ -1,280 +0,0 @@
|
||||
/***** BEGIN LICENSE BLOCK ***** {{{
|
||||
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
|
||||
The contents of this file are subject to the Mozilla Public License Version
|
||||
1.1 (the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
for the specific language governing rights and limitations under the
|
||||
License.
|
||||
|
||||
(c) 2006-2008: Martin Stubenschrott <stubenschrott@gmx.net>
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms of
|
||||
either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
of those above. If you wish to allow use of your version of this file only
|
||||
under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
use your version of this file under the terms of the MPL, indicate your
|
||||
decision by deleting the provisions above and replace them with the notice
|
||||
and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
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.help = function (section, easter) //{{{
|
||||
{
|
||||
if (easter)
|
||||
{
|
||||
vimperator.echoerr("E478: Don't panic!");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((arguments[3] && arguments[3].inTab))// || !window.content.document.open)
|
||||
vimperator.open("about:blank", vimperator.NEW_TAB);
|
||||
else
|
||||
vimperator.open("about:blank");
|
||||
|
||||
/* commands = array where help information is located
|
||||
* beg = string which is printed before the commmand/option/mapping name
|
||||
* end = string which is printed after the commmand/option/mapping name
|
||||
* func = called with 'command', result is a string is prepended to the help text
|
||||
*/
|
||||
function makeHelpString(commands, beg, end, func)
|
||||
{
|
||||
var ret = "";
|
||||
for (var command in commands)
|
||||
ret += vimperator.util.generateHelp(command);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function makeOptionsHelpString(command)
|
||||
{
|
||||
var ret = "";
|
||||
ret = command.type + ' (default: ';
|
||||
if (command.type == "boolean")
|
||||
{
|
||||
if (command.defaultValue == true)
|
||||
ret += "on";
|
||||
else
|
||||
ret += "off";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (typeof command.defaultValue == "string" && command.defaultValue.length == 0)
|
||||
ret += "''";
|
||||
else
|
||||
ret += command.defaultValue;
|
||||
}
|
||||
|
||||
ret += ")<br/>";
|
||||
return ret;
|
||||
}
|
||||
|
||||
var header = '<h1><img src="chrome://vimperator/content/logo_white.png" alt="Vimperator"/></h1>' +
|
||||
'<p class="tagline">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 :)</p>';
|
||||
|
||||
var introduction = '<span style="float: right"><code class="tag">introduction</code></span><h2 id="introduction">Introduction</h2>' +
|
||||
'<p><a href="http://vimperator.mozdev.org">Vimperator</a> is a free browser add-on for Firefox, which makes it look and behave like the <a href="http://www.vim.org">Vim</a> text editor. ' +
|
||||
'It has similar key bindings, and you could call it a modal web browser, as key bindings differ according to which mode you are in.</p>' +
|
||||
|
||||
'<p><span class="warning">Warning:</span> To provide the most authentic Vim experience, the Firefox menubar and toolbar were hidden.<br/>' +
|
||||
'If you really need them, type: <code class="command">:set guioptions+=mT</code> to get them back.\n' +
|
||||
'If you don\'t like Vimperator at all, you can uninstall it by typing <code class="command">:addons</code> and remove/disable it.\n' +
|
||||
'If you like it, but can\'t remember the shortcuts, press <code class="mapping">F1</code> or <code class="command">:help</code> to get this help window back.</p>' +
|
||||
|
||||
'<p>Vimperator was written by <a href="mailto:stubenschrott@gmx.net">Martin Stubenschrott</a>. ' +
|
||||
'If you appreciate my work on Vimperator and want to encourage me working on it more, you can either send me greetings, patches or make a donation: </p>' +
|
||||
|
||||
'<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><fieldset class="paypal">' +
|
||||
'<input type="hidden" name="cmd" value="_s-xclick"/>' +
|
||||
'<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it\'s fast, free and secure!"/>' +
|
||||
|
||||
'<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>' +
|
||||
'<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDDJfc+lXLBSAM9XSWv/ebzG/L7PTqYiIXaWVg8pfinDsfYaAcifcgCTuApg4v/VaZIQ/hLODzQu2EvmjGXP0twErA/Q8G5gx0l197PJSyVXb1sLwd1mgOdLF4t0HmDCdEI9z3H6CMhsb3xVwlfpzllSfCIqzlSpx4QtdzEZGzLDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI8ZOwn5QkHgaAgZjjtPQxB7Vw2rS7Voap9y+xdVLoczUQ97hw+bOdZLcGykBtfoVjdn76MS51QKjGp1fEmxkqTuQ+Fxv8+OVtHu0QF/qlrhmC3fJBRJ0IFWxKdXS+Wod4615BDaG2X1hzvCL443ffka8XlLSiFTuW43BumQs/O+6Jqsk2hcReP3FIQOvtWMSgGTALnZx7x5c60u/3NSKW5qvyWKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDMyMTIyMzI1OFowIwYJKoZIhvcNAQkEMRYEFCirrvlwYVHQiNEEbM6ikfx9+Dm5MA0GCSqGSIb3DQEBAQUABIGAtbsR8GdCdURLziozXLSdtY+zJZUPPeQFXXy2V1S/3ldiN+pRvd4HI7xz8mOY1UaKJZpwZnOosy9MflL1/hbiEtEyQ2Dm/s4jnTcJng/NjLIZu+0NYxXRJhB+zMJubnMMMjzNrGlqI4F2HAB/bCA1eOJ5B83Of3dA4rk/T/8GoSQ=-----END PKCS7-----"/>' +
|
||||
'</fieldset></form>' +
|
||||
|
||||
'<p>Of course as a believer in free open source software, only make a donation if you really like Vimperator and the money doesn\'t hurt - otherwise just use it, recommend it and like it :)</p>';
|
||||
|
||||
var initialization = '<span style="float: right"><code class="tag">initialization</code></span><h2 id="initialization">Initialization</h2>' +
|
||||
'<p>At startup Vimperator sources a user RC file, containing Ex commands, and any JavaScript files found in the plugin directory.</p>' +
|
||||
'<p>The RC file may be named .vimperatorrc or _vimperatorrc. The search order is:</p>' +
|
||||
'<ul>' +
|
||||
'<li>Unix and Mac - ~/.vimperatorrc then ~/_vimperatorrc</li>' +
|
||||
'<li>Windows - ~/_vimperatorrc then ~/.vimperatorrc</li>' +
|
||||
'</ul>' +
|
||||
'<p>The plugin directory is named:</p>' +
|
||||
'<ul>' +
|
||||
'<li>Unix and Mac - ~/.vimperator/plugin</li>' +
|
||||
'<li>Windows - ~/vimperator/plugin</li>' +
|
||||
'</ul>' +
|
||||
'<p>The user\'s <var>$HOME</var>(~) directory is determined as follows:</p>' +
|
||||
'<ul>' +
|
||||
'<li>Unix and Mac - <var>$HOME</var> is used.</li>' +
|
||||
'<li>Windows - if <var>$HOME</var> is set then this is used, otherwise <var>$USERPROFILE</var> or finally <var>$HOMEDRIVE</var><var>$HOMEPATH</var>.</li>' +
|
||||
'</ul>' +
|
||||
'<var>$VIMPERATOR_HOME</var> can be used to override the calculated <var>$HOME</var> directory.';
|
||||
|
||||
var mappings = '<span style="float: right"><code class="tag">mappings</code></span><h2 id="mappings">Mappings</h2>' +
|
||||
'<p>The denotion of modifier keys is like in Vim, so C- means the Control key, M- the Meta key, A- the Alt key and S- the Shift key.</p>' +
|
||||
'<table class="vimperator mappings">';
|
||||
mappings = makeHelpString(vimperator.mappings, "", "", null);
|
||||
//mappings += '</table>';
|
||||
if (section && section == "holy-grail")
|
||||
mappings += '<div><p id="holy-grail">You found it, Arthur!</p></div>\n';
|
||||
|
||||
var commands = '<span style="float: right"><code class="tag">commands</code></span><h2 id="commands">Commands</h2>' +
|
||||
'<table class="vimperator commands">\n';
|
||||
commands = makeHelpString(vimperator.commands, ":", "", null);
|
||||
//commands += '</table>';
|
||||
if (section && section == "42")
|
||||
commands += '<div><p id="42">What is the meaning of life, the universe and everything?<br/>' +
|
||||
'Douglas Adams, the only person who knew what this question really was about is<br/>' +
|
||||
'now dead, unfortunately. So now you might wonder what the meaning of death<br/>' +
|
||||
'is...</p></div>\n';
|
||||
|
||||
var options = '<span style="float: right"><code class="tag">options</code></span><h2 id="options">Options</h2>' +
|
||||
'<table class="vimperator options">\n';
|
||||
options += makeHelpString(vimperator.options, "'", "'", makeOptionsHelpString);
|
||||
options += '</table>';
|
||||
|
||||
var fulldoc = '<?xml version="1.0"?>\n' +
|
||||
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n' +
|
||||
'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n<title>Vimperator Help</title>\n' +
|
||||
// XXX: stylesheet broken here? Have to add it in the vimperator.xul file
|
||||
'<link rel="stylesheet" href="chrome://vimperator/content/help.css" type="text/css"/>\n' +
|
||||
'</head>\n<body>\n<div class="main">\n' +
|
||||
'<span class="version">version ' + vimperator.version + '</span>\n' +
|
||||
header +
|
||||
introduction +
|
||||
initialization +
|
||||
mappings +
|
||||
commands +
|
||||
options +
|
||||
'\n</div>\n</body>\n</html>';
|
||||
|
||||
dump(mappings + commands + "\n\n\n");
|
||||
|
||||
var doc = window.content.document;
|
||||
dump("before open\n");
|
||||
|
||||
try
|
||||
{
|
||||
doc.open();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
dump("catched open\n");
|
||||
// FIXME: what's this all about then, eh? Works the same for if it's removed. -- djk
|
||||
// when the url is "about:" or any other xhtml page the doc is not open
|
||||
// then retry again in 250ms but just once
|
||||
if (arguments[3] && arguments[3].recursive)
|
||||
return false;
|
||||
|
||||
vimperator.open("about:blank");
|
||||
setTimeout(function () { vimperator.help(section, false, null, { recursive: true }); }, 250);
|
||||
return;
|
||||
}
|
||||
dump("before write\n");
|
||||
doc.write(fulldoc);
|
||||
dump("after write\n");
|
||||
doc.close();
|
||||
dump("closed doc\n");
|
||||
|
||||
|
||||
// TODO: change to getBoundingClientRect() for FF 3.0
|
||||
function cumulativeOffset(element)
|
||||
{
|
||||
var valueT = 0, valueL = 0;
|
||||
if (!element)
|
||||
return [0, 0];
|
||||
|
||||
do
|
||||
{
|
||||
valueT += element.offsetTop || 0;
|
||||
valueL += element.offsetLeft || 0;
|
||||
element = element.offsetParent;
|
||||
}
|
||||
while (element);
|
||||
|
||||
return [valueL, valueT];
|
||||
}
|
||||
|
||||
// FIXME
|
||||
setTimeout(function () {
|
||||
if (section)
|
||||
{
|
||||
function findSectionElement(section)
|
||||
{
|
||||
return vimperator.buffer.evaluateXPath('//code[@class="tag" and text()="' + section + '"] | id("' + section + '")')
|
||||
.snapshotItem(0);
|
||||
}
|
||||
|
||||
var element = findSectionElement(section);
|
||||
if (!element)
|
||||
{
|
||||
var firstChar = section.charAt(0);
|
||||
if (firstChar != ":" && firstChar != "'")
|
||||
{
|
||||
element = findSectionElement(":" + section);
|
||||
if (!element)
|
||||
element = findSectionElement("'" + section + "'");
|
||||
}
|
||||
}
|
||||
if (!element)
|
||||
{
|
||||
vimperator.echoerr("E149: Sorry, no help for " + section);
|
||||
return;
|
||||
}
|
||||
// FIXME: H2 elements are currently wrapped in DIVs so this works
|
||||
var pos = cumulativeOffset(element.parentNode);
|
||||
// horizontal offset is annoying, set it to 0 (use pos[0] if you want horizontal offset)
|
||||
window.content.scrollTo(0, pos[1]);
|
||||
}
|
||||
}, 0);
|
||||
}; //}}}
|
||||
|
||||
|
||||
// New style help
|
||||
vimperator.Help = function(section)
|
||||
{
|
||||
function jumpToTag(file, tag)
|
||||
{
|
||||
vimperator.open("chrome://vimperator/locale/" + file);
|
||||
setTimeout(function() {
|
||||
var elem = vimperator.buffer.getElement('@class="tag" and text()="' + tag + '"');
|
||||
if (elem)
|
||||
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
||||
else
|
||||
dump('no element: ' + '@class="tag" and text()="' + tag + '"\n' );
|
||||
}, 200);
|
||||
}
|
||||
|
||||
var [, items] = vimperator.completion.Help();
|
||||
var partialMatch = -1;
|
||||
for (var i = 0; i < items.length; i++)
|
||||
{
|
||||
if (items[i][0] == section)
|
||||
{
|
||||
jumpToTag(items[i][1], items[i][0]);
|
||||
return;
|
||||
}
|
||||
else if (partialMatch == -1 && items[i][0].indexOf(section) > -1)
|
||||
{
|
||||
partialMatch = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (partialMatch > -1)
|
||||
jumpToTag(items[partialMatch][1], items[partialMatch][0]);
|
||||
else
|
||||
vimperator.echoerr("E149: Sorry, no help for " + section);
|
||||
};
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
@@ -35,36 +35,14 @@ vimperator.Map = function (modes, cmds, action, extraInfo) //{{{
|
||||
this.names = cmds;
|
||||
this.action = action;
|
||||
|
||||
this.usage = [this.names[0]];
|
||||
|
||||
if (extraInfo)
|
||||
{
|
||||
this.flags = extraInfo.flags || 0;
|
||||
|
||||
if (extraInfo.usage)
|
||||
{
|
||||
this.usage = extraInfo.usage;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.usage = this.names[0]; // only the first command name
|
||||
if (this.flags & vimperator.Mappings.flags.COUNT)
|
||||
this.usage = "[count]" + this.usage;
|
||||
if (this.flags & vimperator.Mappings.flags.ARGUMENT)
|
||||
this.usage += " {arg}";
|
||||
this.usage = [this.usage]; // FIXME: usage an array - needed for the help
|
||||
}
|
||||
|
||||
this.help = extraInfo.help || null;
|
||||
this.shortHelp = extraInfo.shortHelp || null;
|
||||
this.shortHelp = extraInfo.shortHelp || "";
|
||||
|
||||
this.rhs = extraInfo.rhs || null;
|
||||
this.noremap = extraInfo.noremap || false;
|
||||
|
||||
// TODO: are these limited to HINTS mode?
|
||||
// Only set for hints maps
|
||||
this.cancelMode = extraInfo.cancelMode || false;
|
||||
this.alwaysActive = extraInfo.alwaysActive || false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -276,7 +254,6 @@ vimperator.Mappings = function () //{{{
|
||||
|
||||
list: function (modes, filter)
|
||||
{
|
||||
|
||||
// modes means, a map must exist in both modes in order to get listed
|
||||
var maps = user[modes[0]]; // duplicate (reference) (first mode where it must match)
|
||||
var output = [];
|
||||
@@ -384,32 +361,25 @@ vimperator.Mappings = function () //{{{
|
||||
addDefaultMap(new vimperator.Map(allModes, ["<F1>"],
|
||||
function () { vimperator.help(null); },
|
||||
{
|
||||
shortHelp: "Open help window",
|
||||
help: "The default section is shown, if you need help for a specific topic, try <code class=\"command\">:help <F1></code>."
|
||||
shortHelp: "Open help window"
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map(allModes, ["<Esc>", "<C-[>"],
|
||||
vimperator.events.onEscape,
|
||||
{
|
||||
shortHelp: "Focus content",
|
||||
help: "Exits any command line or hint mode and returns to browser mode.<br/>" +
|
||||
"Also focuses the web page, in case a form field has focus and eats our key presses."
|
||||
shortHelp: "Focus content"
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map(noninsertModes, [":"],
|
||||
function () { vimperator.commandline.open(":", "", vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Start command line mode",
|
||||
help: "In command line mode, you can perform extended commands, which may require arguments."
|
||||
}
|
||||
{ shortHelp: "Start command line mode" }
|
||||
));
|
||||
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL, vimperator.modes.VISUAL, vimperator.modes.CARET], ["<Tab>"],
|
||||
function () { document.commandDispatcher.advanceFocus(); },
|
||||
{ shortHelp: "Advance keyboard focus" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL, vimperator.modes.VISUAL, vimperator.modes.CARET, vimperator.modes.INSERT, vimperator.modes.TEXTAREA],
|
||||
["<S-Tab>"],
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL, vimperator.modes.VISUAL, vimperator.modes.CARET, vimperator.modes.INSERT, vimperator.modes.TEXTAREA], ["<S-Tab>"],
|
||||
function () { document.commandDispatcher.rewindFocus(); },
|
||||
{ shortHelp: "Rewind keyboard focus" }
|
||||
));
|
||||
@@ -421,52 +391,29 @@ vimperator.Mappings = function () //{{{
|
||||
// which takes care of the mode setting
|
||||
vimperator.options.setFirefoxPref("accessibility.browsewithcaret", true);
|
||||
},
|
||||
{
|
||||
shortHelp: "Start caret mode",
|
||||
help: "This mode resembles the Vim normal mode where you see a text cursor and can move around. " +
|
||||
"If you want to select text in this mode, press <code class=\"mapping\">v</code> to start its Visual mode."
|
||||
}
|
||||
{ shortHelp: "Start caret mode" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map(allModes, ["<C-q>"],
|
||||
function () { vimperator.modes.passAllKeys = true; },
|
||||
{
|
||||
shortHelp: "Temporarily quit Vimperator mode",
|
||||
help: "Disable all Vimperator keys except <code class=\"mapping\"><Esc></code> and pass them to the next event handler.<br/>" +
|
||||
"This is especially useful, if JavaScript controlled forms like the RichEdit form fields of GMail don't work anymore.<br/>" +
|
||||
"To exit this mode, press <code class=\"mapping\"><Esc></code>. If you also need to pass <code class=\"mapping\"><Esc></code>" +
|
||||
"in this mode to the web page, prepend it with <code class=\"mapping\"><C-v></code>."
|
||||
}
|
||||
{ shortHelp: "Temporarily quit Vimperator mode" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map(allModes, ["<C-v>"],
|
||||
function () { vimperator.modes.passNextKey = true; },
|
||||
{
|
||||
shortHelp: "Pass through next key",
|
||||
help: "If you need to pass a certain key to a JavaScript form field or another extension prefix the key with <code class=\"mapping\"><C-v></code>.<br/>" +
|
||||
"Also works to unshadow Firefox shortcuts like <code class=\"mapping\"><C-o></code> which are otherwise hidden in Vimperator.<br/>" +
|
||||
"When Vimperator mode is temporarily disabled with <code class=\"mapping\"><C-q></code>, <code class=\"mapping\"><C-v></code> will pass the next key to Vimperator instead of the web page."
|
||||
}
|
||||
{ shortHelp: "Pass through next key" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["<C-c>"],
|
||||
BrowserStop,
|
||||
{
|
||||
shortHelp: "Stop loading",
|
||||
help: "Stops loading the current web page."
|
||||
}
|
||||
{ shortHelp: "Stop loading" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map(allModes, ["<Nop>"],
|
||||
function () { return; },
|
||||
{
|
||||
shortHelp: "Do nothing",
|
||||
help: "This command is useful for disabling a specific mapping. " +
|
||||
"<code class=\"command\">:map <C-n> <Nop></code> will prevent <code class=\"mapping\"><C-n></code> from doing anything."
|
||||
}
|
||||
{ shortHelp: "Do nothing" }
|
||||
));
|
||||
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]f"],
|
||||
function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, true); },
|
||||
{
|
||||
shortHelp: "Focus next frame",
|
||||
help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th next frame in order. The newly focused frame is briefly colored red. Does not wrap.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -474,23 +421,20 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.shiftFrameFocus(count > 1 ? count : 1, false); },
|
||||
{
|
||||
shortHelp: "Focus previous frame",
|
||||
help: "Transfers keyboard focus to the <code class=\"argument\">[count]</code>th previous frame in order. The newly focused frame is briefly colored red. Does not wrap.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["]]"],
|
||||
function (count) { vimperator.buffer.followDocumentRelationship("next"); },
|
||||
{
|
||||
shortHelp: "go to 'next' or '>' if it exists. Beep otherwise.",
|
||||
help: "Opens link labeled with next or >. Useful when browsing forums or documentation. Change nextpattern to modify its behaviour. It follows relations between files too.",
|
||||
shortHelp: "Follow a link labeled to 'next' or '>' if it exists",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["[["],
|
||||
function (count) { vimperator.buffer.followDocumentRelationship("previous"); },
|
||||
{
|
||||
shortHelp: "go to 'prev', 'previous' or '<' if it exists. Beep otherwise.",
|
||||
help: "Opens link labeled with prev, previous or <. Useful when browsing forums or documentation. Change nextpattern to modify its behaviour. It follows relations between files too.",
|
||||
shortHelp: "Follow a link labeled to 'prev', 'previous' or '<' if it exists",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -502,40 +446,24 @@ vimperator.Mappings = function () //{{{
|
||||
title = " -title=\"" + vimperator.buffer.title + "\"";
|
||||
vimperator.commandline.open(":", "bmark " + vimperator.buffer.URL + title, vimperator.modes.EX);
|
||||
},
|
||||
{
|
||||
shortHelp: "Open a prompt to bookmark the current URL",
|
||||
help: "Look at <code class='command'>:bmark</code> for more information."
|
||||
}
|
||||
{ shortHelp: "Open a prompt to bookmark the current URL" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["A"],
|
||||
function () { vimperator.bookmarks.toggle(vimperator.buffer.URL); },
|
||||
{
|
||||
shortHelp: "Toggle bookmarked state of current URL",
|
||||
help: "Add/remove a bookmark for the current location, depending if it already is bookmarked or not. " +
|
||||
"In contrast to the <code class='command'>:bmark</code> command, the bookmark is just 'starred' " +
|
||||
"which means it is placed in the 'Unfiled Bookmarks Folder' instead of the bookmarks menu."
|
||||
}
|
||||
{ shortHelp: "Toggle bookmarked state of current URL" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["b"],
|
||||
function () { vimperator.commandline.open(":", "buffer! ", vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Open a prompt to switch buffers",
|
||||
help: "Typing the corresponding number switches to this buffer."
|
||||
}
|
||||
{ shortHelp: "Open a prompt to switch buffers" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["B"],
|
||||
function () { vimperator.buffer.list(true); },
|
||||
{
|
||||
shortHelp: "Toggle buffer list",
|
||||
help: "Toggles the display of the buffer list which shows all opened tabs.<br/>" +
|
||||
"WARNING: This mapping may be removed/changed in future."
|
||||
}
|
||||
{ shortHelp: "Toggle buffer list" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gb"],
|
||||
function (count) { vimperator.buffer.switchTo(null, null, count, false); },
|
||||
{
|
||||
shortHelp: "Repeat last :buffer[!] command",
|
||||
help: "This is useful to quickly jump between buffers which have a similar URL or title.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -543,7 +471,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.switchTo(null, null, count, true); },
|
||||
{
|
||||
shortHelp: "Repeat last :buffer[!] command in reverse direction",
|
||||
help: "Just like <code class=\"mapping\">gb</code> but in the other direction.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -551,8 +478,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.tabs.remove(getBrowser().mCurrentTab, count, false, 0); },
|
||||
{
|
||||
shortHelp: "Delete current buffer (=tab)",
|
||||
help: "Count is supported, <code class=\"mapping\">2d</code> removes the current and next tab and the one to the right is selected. " +
|
||||
"Does not wrap if <code class=\"argument\">[count]</code> is larger than available tabs to the right.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -560,40 +485,24 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.tabs.remove(getBrowser().mCurrentTab, count, true, 0); },
|
||||
{
|
||||
shortHelp: "Delete current buffer (=tab)",
|
||||
help: "Count is supported, <code class=\"mapping\">2D</code> removes the current and previous tab and the one to the left is selected. " +
|
||||
"Does not wrap if <code class=\"argument\">[count]</code> is larger than available tabs to the left.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["~"],
|
||||
function () { vimperator.open("~"); },
|
||||
{
|
||||
shortHelp: "Open home directory",
|
||||
help: "You can also use the hints to create the probably fastest file browser on earth."
|
||||
}
|
||||
{ shortHelp: "Open home directory" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gf"],
|
||||
function () { vimperator.commands.viewsource(); },
|
||||
{
|
||||
shortHelp: "View source",
|
||||
help: "Opens the source code of the current website with the internal editor in the current tab."
|
||||
}
|
||||
{ shortHelp: "View source" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gF"],
|
||||
function () { vimperator.commands.viewsource(null, true); },
|
||||
{
|
||||
shortHelp: "View source with an external editor",
|
||||
help: "Opens the source code of the current website with the external editor specified " +
|
||||
"by the <code class='option'>'editor'</code> option. For now the external editor " +
|
||||
"must be able to download and open files from a remote URL."
|
||||
}
|
||||
{ shortHelp: "View source with an external editor" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gh"],
|
||||
BrowserHome,
|
||||
{
|
||||
shortHelp: "Go home",
|
||||
help: "Opens the homepage in the current tab."
|
||||
}
|
||||
{ shortHelp: "Go home" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gH"],
|
||||
function ()
|
||||
@@ -602,11 +511,7 @@ vimperator.Mappings = function () //{{{
|
||||
vimperator.open(homepages, /\bhomepage\b/.test(vimperator.options["activate"]) ?
|
||||
vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB);
|
||||
},
|
||||
{
|
||||
shortHelp: "Go home in a new tab",
|
||||
help: "Opens the homepage in a new tab. " +
|
||||
"Whether the new tab is activated or not depends on the <code class=\"option\">'activate'</code> option.<br/>"
|
||||
}
|
||||
{ shortHelp: "Go home in a new tab" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gi"],
|
||||
function ()
|
||||
@@ -624,17 +529,12 @@ vimperator.Mappings = function () //{{{
|
||||
vimperator.beep();
|
||||
}
|
||||
},
|
||||
{
|
||||
shortHelp: "Focus last used input field"
|
||||
}
|
||||
{ shortHelp: "Focus last used input field" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["go"],
|
||||
function (arg) { vimperator.quickmarks.jumpTo(arg, vimperator.CURRENT_TAB); },
|
||||
{
|
||||
shortHelp: "Jump to a QuickMark in the current tab",
|
||||
usage: ["go{a-zA-Z0-9}"],
|
||||
help: "Open any QuickMark in the current tab. You can mark any URLs with <code class=\"mapping\">M{a-zA-Z0-9}</code>. " +
|
||||
"These QuickMarks are persistent across browser sessions.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -647,10 +547,6 @@ vimperator.Mappings = function () //{{{
|
||||
},
|
||||
{
|
||||
shortHelp: "Jump to a QuickMark in a new tab",
|
||||
usage: ["gn{a-zA-Z0-9}"],
|
||||
help: "Works like <code class=\"mapping\">go{a-zA-Z0-9}</code> but opens the QuickMark in a new tab. " +
|
||||
"Whether the new tab is activated or not depends on the <code class=\"option\">'activate'</code> option.<br/>" +
|
||||
"Mnemonic: Go in a new tab. <code class=\"mapping\">gt</code> would make more sense but is already taken.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -661,10 +557,7 @@ vimperator.Mappings = function () //{{{
|
||||
/\bpaste\b/.test(vimperator.options["activate"]) ?
|
||||
vimperator.NEW_BACKGROUND_TAB : vimperator.NEW_TAB);
|
||||
},
|
||||
{
|
||||
shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer",
|
||||
help: "Works like <code class=\"mapping\">P</code>, but inverts the <code class=\"option\">'activate'</code> option."
|
||||
}
|
||||
{ shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["g0", "g^"],
|
||||
function (count) { vimperator.tabs.select(0); },
|
||||
@@ -678,7 +571,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.tabs.select(count > 0 ? count - 1: "+1", count > 0 ? false : true); },
|
||||
{
|
||||
shortHelp: "Go to the next tab",
|
||||
help: "Cycles to the first tab, when the last is selected.<br/>Count is supported: <code class=\"mapping\">3gt</code> goes to the third tab.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -686,7 +578,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.tabs.select("-" + (count < 1 ? 1 : count), true); },
|
||||
{
|
||||
shortHelp: "Go {count} pages back",
|
||||
help: "Wraps around from the first tab to the last tab.<br/>Count is supported: <code class=\"mapping\">3gT</code> goes three tabs back.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -711,11 +602,7 @@ vimperator.Mappings = function () //{{{
|
||||
else
|
||||
vimperator.tabs.select(index);
|
||||
},
|
||||
{
|
||||
shortHelp: "Select the alternate tab",
|
||||
usage: ["<C-^>"],
|
||||
help: "The alternate tab is the last selected tab. This provides a quick method of toggling between two tabs."
|
||||
}
|
||||
{ shortHelp: "Select the alternate tab" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["m"],
|
||||
function (arg)
|
||||
@@ -730,8 +617,6 @@ vimperator.Mappings = function () //{{{
|
||||
},
|
||||
{
|
||||
shortHelp: "Set mark at the cursor position",
|
||||
usage: ["m{a-zA-Z}"],
|
||||
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -739,8 +624,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (arg) { vimperator.marks.jumpTo(arg); },
|
||||
{
|
||||
shortHelp: "Jump to the mark in the current buffer",
|
||||
usage: ["'{a-zA-Z}"],
|
||||
help: "Marks a-z are local to the buffer, whereas A-Z are valid between buffers.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -757,32 +640,20 @@ vimperator.Mappings = function () //{{{
|
||||
},
|
||||
{
|
||||
shortHelp: "Add new QuickMark for current URL",
|
||||
usage: ["M{a-zA-Z0-9}"],
|
||||
help: "You can go to a marked URL in the current tab with <code class=\"mapping\">go{a-zA-Z0-9}</code> or in a new tab with <code class=\"mapping\">gn{a-zA-Z0-9}</code>. " +
|
||||
"These QuickMarks are persistent across browser sessions.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["o"],
|
||||
function () { vimperator.commandline.open(":", "open ", vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Open one or more URLs in the current tab",
|
||||
help: "See <code class=\"command\">:open</code> for more details."
|
||||
}
|
||||
{ shortHelp: "Open one or more URLs in the current tab" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["O"],
|
||||
function () { vimperator.commandline.open(":", "open " + vimperator.buffer.URL, vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Open one or more URLs in the current tab, based on current location",
|
||||
help: "Works like <code class=\"mapping\">o</code>, but preselects current URL in the <code class=\"command\">:open</code> query."
|
||||
}
|
||||
{ shortHelp: "Open one or more URLs in the current tab, based on current location" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["p", "<MiddleMouse>"],
|
||||
function () { vimperator.open(readFromClipboard()); },
|
||||
{
|
||||
shortHelp: "Open (put) a URL based on the current clipboard contents in the current buffer",
|
||||
help: "You can also just select (for non-X11 users: copy) some non-URL text, and search for it with the default search engine or keyword (specified by the <code class=\"option\">'defsearch'</code> option) with <code class=\"mapping\">p</code>."
|
||||
}
|
||||
{ shortHelp: "Open (put) a URL based on the current clipboard contents in the current buffer" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["P"],
|
||||
function ()
|
||||
@@ -791,63 +662,41 @@ vimperator.Mappings = function () //{{{
|
||||
/\bpaste\b/.test(vimperator.options["activate"]) ?
|
||||
vimperator.NEW_TAB : vimperator.NEW_BACKGROUND_TAB);
|
||||
},
|
||||
{
|
||||
shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer",
|
||||
help: "Works like <code class=\"mapping\">p</code>, but opens a new tab.<br/>" +
|
||||
"Whether the new buffer is activated, depends on the <code class=\"option\">'activate'</code> option."
|
||||
}
|
||||
{ shortHelp: "Open (put) a URL based on the current clipboard contents in a new buffer" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["<C-l>"],
|
||||
function (count) { vimperator.commands.redraw(); },
|
||||
{
|
||||
shortHelp: "Redraw the screen",
|
||||
help: "Works like <code class=\"command\">:redraw</code>.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["r"],
|
||||
function () { vimperator.tabs.reload(getBrowser().mCurrentTab, false); },
|
||||
{
|
||||
shortHelp: "Reload",
|
||||
help: "Forces reloading of the current page."
|
||||
}
|
||||
{ shortHelp: "Reload current page" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["R"],
|
||||
function () { vimperator.tabs.reload(getBrowser().mCurrentTab, true); },
|
||||
{
|
||||
shortHelp: "Reload while skipping the cache",
|
||||
help: "Forces reloading of the current page skipping the cache."
|
||||
}
|
||||
{ shortHelp: "Reload while skipping the cache" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["t"],
|
||||
function () { vimperator.commandline.open(":", "tabopen ", vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Open one or more URLs in a new tab",
|
||||
help: "Like <code class=\"mapping\">o</code> but open URLs in a new tab.<br/>" +
|
||||
"See <code class=\"command\">:tabopen</code> for more details."
|
||||
}
|
||||
{ shortHelp: "Open one or more URLs in a new tab" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["T"],
|
||||
function () { vimperator.commandline.open(":", "tabopen " + vimperator.buffer.URL, vimperator.modes.EX); },
|
||||
{
|
||||
shortHelp: "Open one or more URLs in a new tab, based on current location",
|
||||
help: "Works like <code class=\"mapping\">t</code>, but preselects current URL in the <code class=\"command\">:tabopen</code> query."
|
||||
}
|
||||
{ shortHelp: "Open one or more URLs in a new tab, based on current location" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["u"],
|
||||
function (count) { vimperator.commands.undo("", false, count); },
|
||||
{
|
||||
shortHelp: "Undo closing of a tab",
|
||||
help: "If a count is given, don't close the last but the <code class=\"argument\">[count]</code>th last tab.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["y"],
|
||||
function () { vimperator.copyToClipboard(vimperator.buffer.URL, true); },
|
||||
{
|
||||
shortHelp: "Yank current location to the clipboard",
|
||||
help: "When running in X11 the location is also put into the selection, which can be pasted with the middle mouse button."
|
||||
}
|
||||
{ shortHelp: "Yank current location to the clipboard" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL, vimperator.modes.VISUAL], ["Y"],
|
||||
function ()
|
||||
@@ -858,17 +707,13 @@ vimperator.Mappings = function () //{{{
|
||||
else
|
||||
vimperator.beep();
|
||||
},
|
||||
{
|
||||
shortHelp: "Copy selected text",
|
||||
help: "The currently selected text is copied to the system clipboard."
|
||||
}
|
||||
{ shortHelp: "Copy selected text" }
|
||||
));
|
||||
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["zi", "+"],
|
||||
function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, false); },
|
||||
{
|
||||
shortHelp: "Enlarge text zoom of current web page",
|
||||
help: "Mnemonic: zoom in",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -876,7 +721,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, false); },
|
||||
{
|
||||
shortHelp: "Enlarge text zoom of current web page by a larger amount",
|
||||
help: "Mnemonic: zoom more",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -884,7 +728,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, false); },
|
||||
{
|
||||
shortHelp: "Reduce text zoom of current web page",
|
||||
help: "Mnemonic: zoom out",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -892,7 +735,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, false); },
|
||||
{
|
||||
shortHelp: "Reduce text zoom of current web page by a larger amount",
|
||||
help: "Mnemonic: zoom reduce",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -900,7 +742,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.textZoom = count > 1 ? count : 100; },
|
||||
{
|
||||
shortHelp: "Set text zoom value of current web page",
|
||||
help: "Zoom value can be between 1 and 2000%. If it is omitted, text zoom is reset to 100%.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -908,7 +749,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomIn(count > 1 ? count : 1, true); },
|
||||
{
|
||||
shortHelp: "Enlarge full zoom of current web page",
|
||||
help: "Mnemonic: zoom in",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -916,7 +756,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomIn((count > 1 ? count : 1) * 3, true); },
|
||||
{
|
||||
shortHelp: "Enlarge full zoom of current web page by a larger amount",
|
||||
help: "Mnemonic: zoom more",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -924,7 +763,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomOut(count > 1 ? count : 1, true); },
|
||||
{
|
||||
shortHelp: "Reduce full zoom of current web page",
|
||||
help: "Mnemonic: zoom out",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -932,7 +770,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.zoomOut((count > 1 ? count : 1) * 3, true); },
|
||||
{
|
||||
shortHelp: "Reduce full zoom of current web page by a larger amount",
|
||||
help: "Mnemonic: zoom reduce",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -940,25 +777,17 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.fullZoom = count > 1 ? count : 100; },
|
||||
{
|
||||
shortHelp: "Set full zoom value of current web page",
|
||||
help: "Zoom value can be between 1 and 2000%. If it is omitted, full zoom is reset to 100%.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["ZQ"],
|
||||
function () { vimperator.quit(false); },
|
||||
{
|
||||
shortHelp: "Quit and don't save the session",
|
||||
help: "Works like <code class=\"command\">:qall</code>."
|
||||
}
|
||||
{ shortHelp: "Quit and don't save the session" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["ZZ"],
|
||||
function () { vimperator.quit(true); },
|
||||
{
|
||||
shortHelp: "Quit and save the session",
|
||||
help: "Quit Vimperator, no matter how many tabs/windows are open. The session is stored.<br/>" +
|
||||
"Works like <code class=\"command\">:xall</code>."
|
||||
}
|
||||
{ shortHelp: "Quit and save the session" }
|
||||
));
|
||||
function incrementURL(count)
|
||||
{
|
||||
@@ -986,7 +815,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { incrementURL(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Decrement last number in URL",
|
||||
help: "Decrements the last number in URL by 1, or by <code class=\"argument\">count</code> if given.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -994,7 +822,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { incrementURL(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Increment last number in URL",
|
||||
help: "Increments the last number in URL by 1, or by <code class=\"argument\">count</code> if given.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1002,22 +829,16 @@ vimperator.Mappings = function () //{{{
|
||||
// scrolling commands
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["0", "^"],
|
||||
function () { vimperator.buffer.scrollStart(); },
|
||||
{
|
||||
shortHelp: "Scroll to the absolute left of the document",
|
||||
help: "Unlike in Vim, <code class=\"mapping\">0</code> and <code class=\"mapping\">^</code> work exactly the same way."
|
||||
}
|
||||
{ shortHelp: "Scroll to the absolute left of the document" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["$"],
|
||||
function () { vimperator.buffer.scrollEnd(); },
|
||||
{
|
||||
shortHelp: "Scroll to the absolute right of the document"
|
||||
}
|
||||
{ shortHelp: "Scroll to the absolute right of the document" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["gg", "<Home>"],
|
||||
function (count) { vimperator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
||||
{
|
||||
shortHelp: "Goto the top of the document",
|
||||
help: "When used with <code class=\"argument\">[count]</code> like in <code class=\"mapping\">35gg</code>, it scrolls to 35% of the document.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1025,7 +846,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollToPercentile(count >= 0 ? count : 100); },
|
||||
{
|
||||
shortHelp: "Goto the end of the document",
|
||||
help: "When used with <code class=\"argument\">[count]</code> like in <code class=\"mapping\">35G</code>, it scrolls to 35% of the document.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1033,8 +853,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollColumns(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Scroll document to the left",
|
||||
help: "Count is supported: <code class=\"mapping\">10h</code> will move 10 times as much to the left.<br/>" +
|
||||
"If the document cannot scroll more, a beep is emitted (unless <code class=\"option\">'visualbell'</code> is set).",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1042,8 +860,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollLines(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Scroll document down",
|
||||
help: "Count is supported: <code class=\"mapping\">10j</code> will move 10 times as much down.<br/>" +
|
||||
"If the document cannot scroll more, a beep is emitted (unless <code class=\"option\">'visualbell'</code> is set).",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1051,8 +867,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollLines(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Scroll document up",
|
||||
help: "Count is supported: <code class=\"mapping\">10k</code> will move 10 times as much up.<br/>" +
|
||||
"If the document cannot scroll more, a beep is emitted (unless <code class=\"option\">'visualbell'</code> is set).",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1060,8 +874,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollByScrollSize(count, 1); },
|
||||
{
|
||||
shortHelp: "Scroll window downwards in the buffer",
|
||||
help: "The number of lines is set by the <code class=\"option\">'scroll'</code> option which defaults to half a page. " +
|
||||
"If <code class=\"argument\">[count]</code> is given <code class=\"option\">'scroll'</code> is first set to this value.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1069,8 +881,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollByScrollSize(count, -1); },
|
||||
{
|
||||
shortHelp: "Scroll window upwards in the buffer",
|
||||
help: "The number of lines is set by the <code class=\"option\">'scroll'</code> option which defaults to half a page. " +
|
||||
"If <code class=\"argument\">[count]</code> is given <code class=\"option\">'scroll'</code> is first set to this value.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1078,8 +888,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollColumns(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Scroll document to the right",
|
||||
help: "Count is supported: <code class=\"mapping\">10l</code> will move 10 times as much to the right.<br/>" +
|
||||
"If the document cannot scroll more, a beep is emitted (unless <code class=\"option\">'visualbell'</code> is set).",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1087,7 +895,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollPages(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Scroll up a full page",
|
||||
help: "Scroll window <code class=\"argument\">[count]</code> pages Backwards (upwards) in the buffer.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1095,7 +902,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.scrollPages(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Scroll down a full page",
|
||||
help: "Scroll window <code class=\"argument\">[count]</code> pages Forwards (downwards) in the buffer.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1105,17 +911,12 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.buffer.showPageInfo(false); },
|
||||
{
|
||||
shortHelp: "Print the current file name",
|
||||
help: "Also shows some additional file information like file size or the last modified date. " +
|
||||
"If <code class='argument'>{count}</code> is given print the current file name with full path.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["g<C-g>"],
|
||||
function (count) { vimperator.buffer.showPageInfo(true); },
|
||||
{
|
||||
shortHelp: "Print file information",
|
||||
help: "Same as <code class='command'>:pa[geinfo]</code>."
|
||||
}
|
||||
{ shortHelp: "Print file information" }
|
||||
));
|
||||
|
||||
|
||||
@@ -1124,7 +925,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.history.stepTo(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Go to an older position in the jump list",
|
||||
help: "The jump list is just the browser history for now.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1132,7 +932,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.history.stepTo(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Go to a newer position in the jump list",
|
||||
help: "The jump list is just the browser history for now.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1140,7 +939,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.history.stepTo(-(count > 1 ? count : 1)); },
|
||||
{
|
||||
shortHelp: "Go back in the browser history",
|
||||
help: "Count is supported: <code class=\"mapping\">3H</code> goes back 3 steps.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1148,7 +946,6 @@ vimperator.Mappings = function () //{{{
|
||||
function (count) { vimperator.history.stepTo(count > 1 ? count : 1); },
|
||||
{
|
||||
shortHelp: "Go forward in the browser history",
|
||||
help: "Count is supported: <code class=\"mapping\">3L</code> goes forward 3 steps.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1193,7 +990,6 @@ vimperator.Mappings = function () //{{{
|
||||
},
|
||||
{
|
||||
shortHelp: "Go to parent directory",
|
||||
help: "Count is supported: <code class=\"mapping\">2gu</code> on <code>http://www.example.com/dir1/dir2/file.htm</code> would open <code>http://www.example.com/dir1/</code>.",
|
||||
flags: vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1208,44 +1004,18 @@ vimperator.Mappings = function () //{{{
|
||||
}
|
||||
vimperator.open(uri.protocol + "//" + (uri.host || "") + "/");
|
||||
},
|
||||
{
|
||||
shortHelp: "Go to the root of the website",
|
||||
help: "<code class=\"mapping\">gU</code> on <code>http://www.example.com/dir1/dir2/file.htm</code> opens <code>http://www.example.com/</code>.<br/>" +
|
||||
"When browsing a local directory, it goes to the root directory."
|
||||
}
|
||||
{ shortHelp: "Go to the root of the website" }
|
||||
));
|
||||
|
||||
// hint managment
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["f"],
|
||||
function () { vimperator.hints.show(vimperator.modes.QUICK_HINT); },
|
||||
{
|
||||
shortHelp: "Start QuickHint mode",
|
||||
usage: ["f{hint}"],
|
||||
help: "In QuickHint mode, every hintable item (according to the <code class=\"option\">'hinttags'</code> XPath query) is assigned a unique number.<br/>" +
|
||||
"You can now either type this number or type any part of the URL which you want to follow, and it is followed as soon as it can be uniquely identified. " +
|
||||
"Often it is can be useful to combine these techniques to narrow down results with some letters, and then typing a single digit to make the match unique.<br/>" +
|
||||
"Pressing <leader> (defaults to :let mapleader = \"\\\") toggles 'escape-mode', where numbers are treated as normal text.<br/>" +
|
||||
"<code class=\"mapping\"><Esc></code> stops this mode at any time."
|
||||
}
|
||||
{ shortHelp: "Start QuickHint mode" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"],
|
||||
function () { vimperator.hints.show(vimperator.modes.QUICK_HINT, "t"); },
|
||||
{
|
||||
shortHelp: "Start QuickHint mode, but open link in a new tab",
|
||||
usage: ["F{hint}"],
|
||||
help: "Like normal QuickHint mode (activated with <code class='mapping'>f</code>) but opens the link in a new tab."
|
||||
}
|
||||
{ shortHelp: "Start QuickHint mode, but open link in a new tab" }
|
||||
));
|
||||
// addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["F"],
|
||||
// function () { vimperator.echo("Always HINT mode not available anymore"); },
|
||||
// {
|
||||
// shortHelp: "Start AlwaysHint mode (CURRENTLY DISABLED)",
|
||||
// help: "In AlwaysHint mode, every hintable item (according to the <code class=\"option\">'hinttags'</code> XPath query) is assigned a label.<br/>" +
|
||||
// "If you then press the keys for a label, it is followed as soon as it can be uniquely identified. Labels stay active after following a hint in this mode, press <code class=\"mapping\"><Esc></code> to stop this mode.<br/>" +
|
||||
// "This hint mode is especially useful for browsing large sites like Forums as hints are automatically regenerated when switching to a new document.<br/>" +
|
||||
// "Also, most <code class=\"mapping\">Ctrl</code>-prefixed shortcut keys are available in this mode for navigation."
|
||||
// }
|
||||
// ));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], [";"],
|
||||
function (arg)
|
||||
{
|
||||
@@ -1258,33 +1028,6 @@ vimperator.Mappings = function () //{{{
|
||||
},
|
||||
{
|
||||
shortHelp: "Start an extended hint mode",
|
||||
usage: [";{mode}{hint}"],
|
||||
help: "ExtendedHint mode is useful, since in this mode you can yank link locations, open them in a new window or save images.<br/>" +
|
||||
"If you want to yank the location of hint <code>24</code>, press <code class=\"mapping\">;y</code> to start this hint mode. " +
|
||||
"Then press <code>24</code> to copy the hint location.<br/><br/>" +
|
||||
"<code class='argument'>{mode}</code> can be either one of:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><code class=\"mapping\">;</code> to focus a link and hover it with the mouse</li>" +
|
||||
"<li><code class=\"mapping\">a</code> to save its destination (prompting for save location)</li>" +
|
||||
"<li><code class=\"mapping\">s</code> to save its destination</li>" +
|
||||
"<li><code class=\"mapping\">o</code> to open its location in the current tab</li>" +
|
||||
"<li><code class=\"mapping\">t</code> to open its location in a new tab</li>" +
|
||||
"<li><code class=\"mapping\">O</code> to open its location in an <code class=\"command\">:open</code> query</li>" +
|
||||
"<li><code class=\"mapping\">T</code> to open its location in a <code class=\"command\">:tabopen</code> query</li>" +
|
||||
"<li><code class=\"mapping\">v</code> to view its destination source</li>" +
|
||||
"<li><code class=\"mapping\">w</code> to open its destination in a new window</li>" +
|
||||
"<li><code class=\"mapping\">W</code> to open its location in a <code class=\"command\">:winopen</code> query</li>" +
|
||||
"<li><code class=\"mapping\">y</code> to yank its destination location</li>" +
|
||||
"<li><code class=\"mapping\">Y</code> to yank its text description</li>" +
|
||||
"</ul>" +
|
||||
"Additionally there are two <code class='argument'>{mode}</code>s, which will start an AlwaysHint mode:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><code class=\"mapping\">f</code> to open its location in the current tab</li>" +
|
||||
"<li><code class=\"mapping\">F</code> to open its location in a new tab</li>" +
|
||||
"</ul>" +
|
||||
"These work like the <code class='mapping'>f</code> or <code class='mapping'>F</code> mappings but will keep you in AlwaysHint mode. " +
|
||||
"This is useful if you want to open many links of one page without pressing <code class='mapping'>f</code> or <code class='mapping'>F</code> each time.<br/>" +
|
||||
"Hintable elements for all extended hint modes can be set in the <code class=\"option\">'extendedhinttags'</code> XPath string.",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -1292,50 +1035,24 @@ vimperator.Mappings = function () //{{{
|
||||
// search management
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["/"],
|
||||
function () { vimperator.search.openSearchDialog(vimperator.modes.SEARCH_FORWARD); },
|
||||
{
|
||||
shortHelp: "Search forward for a pattern",
|
||||
usage: ["/{pattern}[/]<CR>"],
|
||||
help: "Search forward for the first occurrence of <code class=\"argument\">{pattern}</code>.<br/>" +
|
||||
"If \"\\c\" appears anywhere in the pattern the whole pattern is handled as though <code class=\"option\">'ignorecase'</code> is on. " +
|
||||
"\"\\C\" forces case-sensitive matching for the whole pattern.<br/>" +
|
||||
"If \"\\l\" appears in the pattern only the text of links is searched for a match as though <code class=\"option\">'linksearch'</code> is on. " +
|
||||
"\"\\L\" forces the entire page to be searched for a match."
|
||||
}
|
||||
{ shortHelp: "Search forward for a pattern" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["?"],
|
||||
function () { vimperator.search.openSearchDialog(vimperator.modes.SEARCH_BACKWARD); },
|
||||
{
|
||||
shortHelp: "Search backwards for a pattern",
|
||||
usage: ["?{pattern}[?]<CR>"],
|
||||
help: "Search backward for the first occurrence of <code class=\"argument\">{pattern}</code>.<br/>" +
|
||||
"If \"\\c\" appears anywhere in the pattern the whole pattern is handled as though <code class=\"option\">'ignorecase'</code> is on. " +
|
||||
"\"\\C\" forces case-sensitive matching for the whole pattern.<br/>" +
|
||||
"If \"\\l\" appears in the pattern only the text of links is searched for a match as though <code class=\"option\">'linksearch'</code> is on. " +
|
||||
"\"\\L\" forces the entire page to be searched for a match.<br/>" +
|
||||
"NOTE: incremental searching currently only works in the forward direction."
|
||||
}
|
||||
{ shortHelp: "Search backwards for a pattern" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["n"],
|
||||
function () { vimperator.search.findAgain(false); },
|
||||
{
|
||||
shortHelp: "Find next",
|
||||
help: "Repeat the last search 1 time (until count is supported)."
|
||||
}
|
||||
{ shortHelp: "Find next" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["N"],
|
||||
function () { vimperator.search.findAgain(true); },
|
||||
{
|
||||
shortHelp: "Find previous",
|
||||
help: "Repeat the last search 1 time (until count is supported) in the opposite direction."
|
||||
}
|
||||
{ shortHelp: "Find previous" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.NORMAL], ["q"],
|
||||
function (arg) { vimperator.events.startRecording(arg); },
|
||||
{
|
||||
shortHelp: "record a keysequence into a macro",
|
||||
help: "Available macros are {0-9a-zA-Z} (uppercase to append)." +
|
||||
"type 'q' to stop recording.",
|
||||
|
||||
shortHelp: "Record a keysequence into a macro",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT
|
||||
}
|
||||
));
|
||||
@@ -1347,7 +1064,7 @@ vimperator.Mappings = function () //{{{
|
||||
vimperator.events.playMacro(arg);
|
||||
},
|
||||
{
|
||||
shortHelp: "Execute the contents of macro {0-9a-z}. @@ repeats the previous @{0-9a-z}",
|
||||
shortHelp: "Play a macro",
|
||||
flags: vimperator.Mappings.flags.ARGUMENT | vimperator.Mappings.flags.COUNT
|
||||
}
|
||||
));
|
||||
@@ -1366,10 +1083,7 @@ vimperator.Mappings = function () //{{{
|
||||
}
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.CARET, vimperator.modes.TEXTAREA], ["v"],
|
||||
function (count) { vimperator.modes.set(vimperator.modes.VISUAL, vimperator.mode); },
|
||||
{
|
||||
shortHelp: "Start visual mode",
|
||||
help: "Works for caret mode and textarea mode."
|
||||
}
|
||||
{ shortHelp: "Start visual mode" }
|
||||
));
|
||||
addDefaultMap(new vimperator.Map([vimperator.modes.CARET], ["j", "<Down>"],
|
||||
function (count)
|
||||
|
||||
@@ -35,15 +35,10 @@ vimperator.Option = function (names, type, extraInfo) //{{{
|
||||
|
||||
this.name = names[0];
|
||||
this.names = names;
|
||||
this.usage = this.names;
|
||||
this.type = type;
|
||||
|
||||
if (extraInfo)
|
||||
{
|
||||
if (extraInfo.usage)
|
||||
this.usage = extraInfo.usage;
|
||||
|
||||
this.help = extraInfo.help || null;
|
||||
this.shortHelp = extraInfo.shortHelp || null;
|
||||
|
||||
// "", 0 are valid default values
|
||||
@@ -193,8 +188,8 @@ vimperator.Options = function () //{{{
|
||||
var value = branch.getComplexValue(name, Components.interfaces.nsISupportsString).data;
|
||||
// Try in case it's a localized string (will throw an exception if not)
|
||||
if (!branch.prefIsLocked(name) && !branch.prefHasUserValue(name) &&
|
||||
/^chrome:\/\/.+\/locale\/.+\.properties/.test(value))
|
||||
value = branch.getComplexValue(name, Components.interfaces.nsIPrefLocalizedString).data;
|
||||
/^chrome:\/\/.+\/locale\/.+\.properties/.test(value))
|
||||
value = branch.getComplexValue(name, Components.interfaces.nsIPrefLocalizedString).data;
|
||||
return value;
|
||||
case branch.PREF_INT:
|
||||
return branch.getIntPref(name);
|
||||
@@ -343,7 +338,6 @@ vimperator.Options = function () //{{{
|
||||
|
||||
list: function (onlyNondefault)
|
||||
{
|
||||
// TODO: columns like Vim?
|
||||
var list = ":" + vimperator.util.escapeHTML(vimperator.commandline.getCommand()) + "<br/>" +
|
||||
"<table><tr align=\"left\" class=\"hl-Title\"><th>--- Options ---</th></tr>";
|
||||
var name, value, def;
|
||||
@@ -484,13 +478,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["activate", "act"], "stringlist",
|
||||
{
|
||||
shortHelp: "Define when tabs are automatically activated",
|
||||
help: "Available items:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>homepage</b>: <code class=\"mapping\">gH</code> mapping</li>" +
|
||||
"<li><b>quickmark</b>: <code class=\"mapping\">go</code> and <code class=\"mapping\">gn</code> mappings</li>" +
|
||||
"<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>",
|
||||
defaultValue: "homepage,quickmark,tabopen,paste",
|
||||
validator: function (value)
|
||||
{
|
||||
@@ -501,15 +488,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["complete", "cpt"], "charlist",
|
||||
{
|
||||
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>" +
|
||||
"<li><b>f</b>: Local files</li>" +
|
||||
"<li><b>b</b>: Bookmarks</li>" +
|
||||
"<li><b>h</b>: History</li>" +
|
||||
"</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.",
|
||||
defaultValue: "sfbh",
|
||||
validator: function (value) { return !/[^sfbh]/.test(value); }
|
||||
}
|
||||
@@ -517,18 +495,12 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["defsearch", "ds"], "string",
|
||||
{
|
||||
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.",
|
||||
defaultValue: "google"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["editor"], "string",
|
||||
{
|
||||
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.",
|
||||
defaultValue: "gvim -f"
|
||||
}
|
||||
));
|
||||
@@ -556,13 +528,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["guioptions", "go"], "charlist",
|
||||
{
|
||||
shortHelp: "Show or hide the menu, toolbar and scrollbars",
|
||||
help: "Supported characters:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>m</b>: menubar</li>" +
|
||||
"<li><b>T</b>: toolbar</li>" +
|
||||
"<li><b>b</b>: bookmark bar</li>" +
|
||||
"</ul>" +
|
||||
"You can also hide the tab bar with <code class='command'>:set showtabline=0</code>.",
|
||||
setter: function (value) { setGuiOptions(value); },
|
||||
defaultValue: "",
|
||||
validator: function (value) { return !/[^mTb]/.test(value); }
|
||||
@@ -571,7 +536,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["hinttimeout", "hto"], "number",
|
||||
{
|
||||
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.",
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return value >= 0; }
|
||||
}
|
||||
@@ -617,29 +581,18 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["incsearch", "is"], "boolean",
|
||||
{
|
||||
shortHelp: "Show where the search pattern matches as it is typed",
|
||||
help: "NOTE: Incremental searching currently only works in the forward direction.",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["insertmode", "im"], "boolean",
|
||||
{
|
||||
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.",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["laststatus", "ls"], "number",
|
||||
{
|
||||
shortHelp: "Show the status line",
|
||||
help: "Determines when the last window will have a status line. " +
|
||||
"Possible values:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>0</b>: never</li>" +
|
||||
"<li><b>1</b>: only if there are multiple windows</li>" +
|
||||
"<li><b>2</b>: always</li>" +
|
||||
"</ul>" +
|
||||
"NOTE: laststatus=1 not implemented yet.",
|
||||
defaultValue: 2,
|
||||
setter: function (value) { setLastStatus(value); },
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
@@ -648,7 +601,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["linksearch", "lks"], "boolean",
|
||||
{
|
||||
shortHelp: "Limit the search to hyperlink text",
|
||||
help: "This includes (X)HTML elements with an \"href\" atrribute and XLink \"simple\" links.",
|
||||
defaultValue: false
|
||||
}
|
||||
));
|
||||
@@ -661,21 +613,12 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["nextpattern"], "stringlist",
|
||||
{
|
||||
shortHelp: "Patterns to use when guessing the 'next' page in a document sequence",
|
||||
help: "Each pattern, in order, is matched against all links in the page with the first match being used.<br/>" +
|
||||
"The patterns are case insensitive regular expressions.",
|
||||
defaultValue: "\\bnext,^>$,^(>>|»)$,^(>|»),(>|»)$"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["pageinfo", "pa"], "charlist",
|
||||
{
|
||||
shortHelp: "Desired info on :pa[geinfo]",
|
||||
help: "Available items:<br/>" +
|
||||
"<ul>" +
|
||||
"<li><b>g</b>: general info</li>" +
|
||||
"<li><b>f</b>: feeds</li>" +
|
||||
"<li><b>m</b>: meta tags</li>" +
|
||||
"</ul>" +
|
||||
"The order matters",
|
||||
defaultValue: "gfm",
|
||||
validator: function (value) { return !(/[^gfm]/.test(value) || value.length > 3 || value.length < 1); }
|
||||
}
|
||||
@@ -683,15 +626,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["popups", "pps"], "number",
|
||||
{
|
||||
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>" +
|
||||
"<li><b>0</b>: Force to open in the current tab (NOTE: this can stop some web sites from working correctly!)</li>" +
|
||||
"<li><b>1</b>: Always open in a new tab</li>" +
|
||||
"<li><b>2</b>: Open in a new window if it has a specific requested size (default in Firefox)</li>" +
|
||||
"<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.",
|
||||
defaultValue: 1,
|
||||
setter: function (value) { setPopups(value); },
|
||||
validator: function (value) { return (value >= 0 && value <= 3); }
|
||||
@@ -700,17 +634,12 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["preload"], "boolean",
|
||||
{
|
||||
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).",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["previewheight", "pvh"], "number",
|
||||
{
|
||||
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",
|
||||
defaultValue: 10,
|
||||
validator: function (value) { return (value >= 1 && value <= 50); }
|
||||
}
|
||||
@@ -718,17 +647,12 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["previouspattern"], "stringlist",
|
||||
{
|
||||
shortHelp: "Patterns to use when guessing the 'previous' page in a document sequence",
|
||||
help: "Each pattern, in order, is matched against all links in the page with the first match being used.<br/>" +
|
||||
"The patterns are case insensitive regular expressions.",
|
||||
defaultValue: "\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$"
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["scroll", "scr"], "number",
|
||||
{
|
||||
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>.",
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return value >= 0; }
|
||||
}
|
||||
@@ -742,13 +666,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["showstatuslinks", "ssli"], "number",
|
||||
{
|
||||
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>" +
|
||||
"<li><b>0</b>: Don't show link destination</li>" +
|
||||
"<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>",
|
||||
defaultValue: 1,
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
}
|
||||
@@ -756,12 +673,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["showtabline", "stal"], "number",
|
||||
{
|
||||
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>" +
|
||||
"<li><b>1</b>: Show tab bar only if more than one tab is open</li>" +
|
||||
"<li><b>2</b>: Always show tab bar</li>" +
|
||||
"</ul>",
|
||||
setter: function (value) { setShowTabline(value); },
|
||||
defaultValue: 2,
|
||||
validator: function (value) { return (value >= 0 && value <= 2); }
|
||||
@@ -770,16 +681,12 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["smartcase", "scs"], "boolean",
|
||||
{
|
||||
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.",
|
||||
defaultValue: true
|
||||
}
|
||||
));
|
||||
optionManager.add(new vimperator.Option(["titlestring"], "string",
|
||||
{
|
||||
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); },
|
||||
defaultValue: "Vimperator"
|
||||
}
|
||||
@@ -787,7 +694,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["usermode", "um"], "boolean",
|
||||
{
|
||||
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; },
|
||||
defaultValue: false
|
||||
@@ -796,8 +702,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["verbose", "vbs"], "number",
|
||||
{
|
||||
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.",
|
||||
defaultValue: 0,
|
||||
validator: function (value) { return (value >= 0 && value <= 9); }
|
||||
}
|
||||
@@ -812,20 +716,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["wildmode", "wim"], "stringlist",
|
||||
{
|
||||
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 " +
|
||||
"for the second use, etc.<br/>" +
|
||||
"These are the possible values for each part:<br/>" +
|
||||
"<table>" +
|
||||
"<tr><td><b>''</b></td><td>Complete only the first match</td></tr>" +
|
||||
"<tr><td><b>'full'</b></td><td>Complete the next full match. After the last, the original string is used.</td></tr>" +
|
||||
"<tr><td><b>'longest'</b></td><td>Complete till the longest common string.</td></tr>" +
|
||||
"<tr><td><b>'list'</b></td><td>When more than one match, list all matches.</td></tr>" +
|
||||
"<tr><td><b>'list:full'</b></td><td>When more than one match, list all matches and complete first match.</td></tr>" +
|
||||
"<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.",
|
||||
defaultValue: "list:full",
|
||||
validator: function (value)
|
||||
{
|
||||
@@ -836,11 +726,6 @@ vimperator.Options = function () //{{{
|
||||
optionManager.add(new vimperator.Option(["wildoptions", "wop"], "stringlist",
|
||||
{
|
||||
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>",
|
||||
defaultValue: "",
|
||||
validator: function (value) { return /^(sort|)$/.test(value); }
|
||||
}
|
||||
|
||||
@@ -209,8 +209,7 @@ vimperator.util = { //{{{
|
||||
},
|
||||
|
||||
// generates an Asciidoc help entry, "command" can also be a mapping
|
||||
// TODO: must be refactored, once we get rid of command.usage
|
||||
generateHelp: function (command)
|
||||
generateHelp: function (command, extraHelp)
|
||||
{
|
||||
var start = "", end = "";
|
||||
if (command instanceof vimperator.Command)
|
||||
@@ -233,27 +232,24 @@ vimperator.util = { //{{{
|
||||
ret += "\n"
|
||||
|
||||
// the usage information for the command
|
||||
for (var j = 0; j < command.usage.length; j++)
|
||||
{
|
||||
var usage = command.usage[j].replace(/{/, "\\\\{").replace(/}/, "\\\\}");
|
||||
usage = usage.replace(/'/, "\\'").replace(/`/, "\\`");
|
||||
ret += "||" + start + usage + end + "||";
|
||||
if (command.usage[j].length > 15 || j < command.usage.length - 1)
|
||||
ret += " +";
|
||||
var usage = command.names[0];
|
||||
if (command.specs) // for :commands
|
||||
usage = command.specs[0];
|
||||
|
||||
ret += "\n";
|
||||
}
|
||||
ret += "________________________________________________________________________________\n"
|
||||
usage = usage.replace(/{/, "\\\\{").replace(/}/, "\\\\}");
|
||||
usage = usage.replace(/'/, "\\'").replace(/`/, "\\`");
|
||||
ret += "||" + start + usage + end + "||";
|
||||
if (usage.length > 15)
|
||||
ret += " +";
|
||||
|
||||
ret += "\n________________________________________________________________________________\n"
|
||||
|
||||
// the actual help text
|
||||
if (command.shortHelp)
|
||||
{
|
||||
ret += command.shortHelp; // the help description
|
||||
if (command.help)
|
||||
{
|
||||
//ret += ". +\n";
|
||||
ret += ". " + command.help; // the help description
|
||||
}
|
||||
ret += command.shortHelp + "."; // the help description
|
||||
if (extraHelp)
|
||||
ret += " +\n" + extraHelp;
|
||||
}
|
||||
else
|
||||
ret += "Sorry, no help available";
|
||||
|
||||
@@ -650,7 +650,7 @@ const vimperator = (function () //{{{
|
||||
if (vimperator.options.getPref("firsttime", true))
|
||||
{
|
||||
setTimeout(function () {
|
||||
vimperator.help(null, null, null, { inTab: true });
|
||||
vimperator.commands.help();
|
||||
vimperator.options.setPref("firsttime", false);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user