1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-05 11:53:31 +02:00

Add :map -arg. Document :com -literal.

This commit is contained in:
Kris Maglione
2011-02-03 02:00:47 -05:00
parent 8b6086fb7f
commit edecec56f9
5 changed files with 14 additions and 3 deletions

View File

@@ -482,6 +482,7 @@ var Mappings = Module("mappings", {
args["-description"], args["-description"],
Command.bindMacro(args, "-keys", function (params) params), Command.bindMacro(args, "-keys", function (params) params),
{ {
arg: args["-arg"],
count: args["-count"], count: args["-count"],
noremap: args["-builtin"], noremap: args["-builtin"],
persist: !args["-nopersist"], persist: !args["-nopersist"],
@@ -506,6 +507,10 @@ var Mappings = Module("mappings", {
hereDoc: true, hereDoc: true,
literal: 1, literal: 1,
options: [ options: [
{
names: ["-arg", "-a"],
description: "Accept an argument after the requisite key press",
},
{ {
names: ["-builtin", "-b"], names: ["-builtin", "-b"],
description: "Execute this mapping as if there were no user-defined mappings" description: "Execute this mapping as if there were no user-defined mappings"

View File

@@ -114,11 +114,13 @@
<dl dt="width: 12em;"> <dl dt="width: 12em;">
<dt></dt> <dd></dd> <dt></dt> <dd></dd>
<dt>-arg</dt> <dd>Accept an argument after the requisite key press. Sets the <tt>arg</tt> parameter to the result. (short name <em>-a</em>)</dd>
<dt>-builtin</dt> <dd>Execute this mapping as if there were no user-defined mappings (short name <em>-b</em>)</dd> <dt>-builtin</dt> <dd>Execute this mapping as if there were no user-defined mappings (short name <em>-b</em>)</dd>
<dt>-count</dt> <dd>Accept a count before the requisite key press (short name <em>-c</em>)</dd> <dt>-count</dt> <dd>Accept a count before the requisite key press. Sets the <tt>count</tt> parameter to the result. (short name <em>-c</em>)</dd>
<dt>-description</dt> <dd>A description of this mapping (short name <em>-d</em>)</dd> <dt>-description</dt> <dd>A description of this mapping (short name <em>-d</em>)</dd>
<dt>-ex</dt> <dd>Execute <a>rhs</a> as an Ex command rather than keys (short name <em>-e</em>)</dd> <dt>-ex</dt> <dd>Execute <a>rhs</a> as an Ex command rather than keys (short name <em>-e</em>)</dd>
<dt>-javascript</dt> <dd>Execute <a>rhs</a> as JavaScript rather than keys (short names <em>-js</em>, <em>-j</em>)</dd> <dt>-javascript</dt> <dd>Execute <a>rhs</a> as JavaScript rather than keys (short names <em>-js</em>, <em>-j</em>)</dd>
<dt>-literal=<a>n</a></dt> <dd>Parse the <a>n</a>th argument without specially processing any quote or meta characters. (short name <em>-l</em>)</dd>
<dt>-modes</dt> <dd>Create this mapping in the given modes (short names <em>-mode</em>, <em>-m</em>)</dd> <dt>-modes</dt> <dd>Create this mapping in the given modes (short names <em>-mode</em>, <em>-m</em>)</dd>
<dt>-nopersist</dt> <dd>Do not save this mapping to an auto-generated rc file (short name <em>-n</em>)</dd> <dt>-nopersist</dt> <dd>Do not save this mapping to an auto-generated rc file (short name <em>-n</em>)</dd>
<dt>-silent</dt> <dd>Do not echo any generated keys to the command line (short name <em>-s</em>, also <em>&lt;silent></em> for Vim compatibility)</dd> <dt>-silent</dt> <dd>Do not echo any generated keys to the command line (short name <em>-s</em>, also <em>&lt;silent></em> for Vim compatibility)</dd>

View File

@@ -7,7 +7,7 @@
Components.utils.import("resource://dactyl/bootstrap.jsm"); Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("downloads", { defineModule("downloads", {
exports: ["Download", "Downloads", "downloads"], exports: ["Download", "Downloads", "downloads"],
use: ["io", "prefs", "services", "template", "util"] use: ["io", "prefs", "services", "util"]
}, this); }, this);
Cu.import("resource://gre/modules/DownloadUtils.jsm", this); Cu.import("resource://gre/modules/DownloadUtils.jsm", this);

View File

@@ -7,7 +7,7 @@
Components.utils.import("resource://dactyl/bootstrap.jsm"); Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("finder", { defineModule("finder", {
exports: ["RangeFind", "RangeFinder", "rangefinder"], exports: ["RangeFind", "RangeFinder", "rangefinder"],
use: ["prefs", "services", "util"] use: ["services", "util"]
}, this); }, this);
/** @instance rangefinder */ /** @instance rangefinder */
@@ -242,6 +242,8 @@ var RangeFinder = Module("rangefinder", {
}, },
options: function (dactyl, modules, window) { options: function (dactyl, modules, window) {
const { options, rangefinder } = modules; const { options, rangefinder } = modules;
const { prefs } = require("prefs");
// prefs.safeSet("accessibility.typeaheadfind.autostart", false); // prefs.safeSet("accessibility.typeaheadfind.autostart", false);
// The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187 // The above should be sufficient, but: https://bugzilla.mozilla.org/show_bug.cgi?id=348187
prefs.safeSet("accessibility.typeaheadfind", false); prefs.safeSet("accessibility.typeaheadfind", false);

View File

@@ -78,7 +78,9 @@
buffer. [b6] buffer. [b6]
- Added :mapgroup command and -group flag to :map, :unmap, and - Added :mapgroup command and -group flag to :map, :unmap, and
:mapclear. [b6] :mapclear. [b6]
- Added -arg flag to :map. [b6]
- :extensions has been replaced with a more powerful :addons. - :extensions has been replaced with a more powerful :addons.
- Added -literal flag to :command. [b6]
- Added :cookies command. [b3] - Added :cookies command. [b3]
- :extadd now supports remote URLs as well as local files on Firefox 4. [b2] - :extadd now supports remote URLs as well as local files on Firefox 4. [b2]
- Added :if/:elseif/:else/:endif conditionals. [b3] - Added :if/:elseif/:else/:endif conditionals. [b3]