1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-25 02:13:46 +01:00

Major documentation updates and formatting fixes, and many, many other changes thanks to an MQ glitch, including:

* Significant completion speed improvements
 * Significantly improve startup speed, in large part by lazily
   instantiating Options and Commands, lazily installing highlight
   stylesheets, etc.
 * Update logos and icons, fix atrocious about page
 * Fix Teledactyl
 * JavaScript completion now avoids accessing property values
 * Add Option#persist to define which options are saved with :mkp
 * Add new Dactyl component which holds add-on-specific configuration
   information and removes need for separate components for each dactyl
   host
 * Several fixes for latest nightlies
 * Significant code cleanup and many bug fixes

--HG--
rename : muttator/AUTHORS => teledactyl/AUTHORS
rename : muttator/Donors => teledactyl/Donors
rename : muttator/Makefile => teledactyl/Makefile
rename : muttator/NEWS => teledactyl/NEWS
rename : muttator/TODO => teledactyl/TODO
rename : muttator/chrome.manifest => teledactyl/chrome.manifest
rename : muttator/components/commandline-handler.js => teledactyl/components/commandline-handler.js
rename : muttator/components/protocols.js => teledactyl/components/protocols.js
rename : muttator/content/addressbook.js => teledactyl/content/addressbook.js
rename : muttator/content/compose/compose.js => teledactyl/content/compose/compose.js
rename : muttator/content/compose/compose.xul => teledactyl/content/compose/compose.xul
rename : muttator/content/compose/dactyl.dtd => teledactyl/content/compose/dactyl.dtd
rename : muttator/content/compose/dactyl.xul => teledactyl/content/compose/dactyl.xul
rename : muttator/content/config.js => teledactyl/content/config.js
rename : muttator/content/dactyl.dtd => teledactyl/content/dactyl.dtd
rename : muttator/content/logo.png => teledactyl/content/logo.png
rename : muttator/content/mail.js => teledactyl/content/mail.js
rename : muttator/content/muttator.xul => teledactyl/content/pentadactyl.xul
rename : muttator/contrib/vim/Makefile => teledactyl/contrib/vim/Makefile
rename : muttator/contrib/vim/ftdetect/muttator.vim => teledactyl/contrib/vim/ftdetect/muttator.vim
rename : muttator/contrib/vim/mkvimball.txt => teledactyl/contrib/vim/mkvimball.txt
rename : muttator/contrib/vim/syntax/muttator.vim => teledactyl/contrib/vim/syntax/muttator.vim
rename : muttator/install.rdf => teledactyl/install.rdf
rename : muttator/locale/en-US/Makefile => teledactyl/locale/en-US/Makefile
rename : muttator/locale/en-US/all.xml => teledactyl/locale/en-US/all.xml
rename : muttator/locale/en-US/autocommands.xml => teledactyl/locale/en-US/autocommands.xml
rename : muttator/locale/en-US/gui.xml => teledactyl/locale/en-US/gui.xml
rename : muttator/locale/en-US/intro.xml => teledactyl/locale/en-US/intro.xml
rename : muttator/skin/icon.png => teledactyl/skin/icon.png
This commit is contained in:
Kris Maglione
2010-09-17 06:21:33 -04:00
parent bfbb4b1313
commit 1557b70f45
125 changed files with 4409 additions and 3969 deletions

View File

@@ -6,23 +6,28 @@
<document
name="repeat"
title="&dactyl.appname; Repeating Commands"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
xmlns="&xmlns.dactyl;"
xmlns:html="&xmlns.html;">
<h1 tag="repeating">Repeating commands</h1>
<toc start="2"/>
<p>&dactyl.appname; can repeat a number of commands and record macros.</p>
<p>
&dactyl.appname; can repeat commands in a number of ways, from repeating
the last command, to recording and playing macros, to saving its state and
executing scripts.
</p>
<h2 tag="single-repeat">Single repeats</h2>
<item>
<tags>.</tags>
<strut/>
<spec><oa>count</oa>.</spec>
<description>
<p>
Repeat the last keyboard mapping <oa>count</oa> times. Note that, unlike in Vim, this
does not apply solely to editing commands, mainly because &dactyl.appname; doesn't
have them.
Repeat the last keyboard mapping <oa>count</oa> times. Note that,
unlike in Vim, this does not apply solely to editing commands,
mainly because &dactyl.appname; doesn't have them.
</p>
</description>
</item>
@@ -30,6 +35,7 @@
<item>
<tags>@:</tags>
<strut/>
<spec><oa>count</oa>@:</spec>
<description>
<p>Repeat the last Ex command <oa>count</oa> times.</p>
@@ -42,12 +48,14 @@
<item>
<tags>q</tags>
<strut/>
<spec>q<a>0-9a-zA-Z</a></spec>
<description>
<p>
Record a key sequence into a macro.
Available macros are {0-9a-zA-Z} (uppercase to append).
Type <k>q</k> to stop recording.
Record a key sequence as a macro. Available macros are
<a>0-9a-zA-Z</a>. If the macro is an uppercase letter, the
recorded keys are appended to the lowercase macro of the same
name. Typing <k>q</k> again stops the recording.
</p>
</description>
</item>
@@ -58,8 +66,8 @@
<spec>:mac<oa>ros</oa> <oa>pat</oa></spec>
<description>
<p>
List recorded macros matching the optional regular expression <oa>pat</oa>. If
no regex is given, list all macros.
List recorded macros matching the optional regular expression
<oa>pat</oa>. If no regex is given, list all macros.
</p>
</description>
</item>
@@ -67,12 +75,12 @@
<item>
<tags>:delmac :delmacros</tags>
<spec>:delmac<oa>ros</oa> <a>args</a></spec>
<spec>:delmac<oa>ros</oa> <a>pat</a></spec>
<spec>:delmac<oa>ros</oa>!</spec>
<description>
<p>
Delete recorded macros matching the regular expression <a>args</a>. If <oa>!</oa> is given
all macros are deleted.
Delete recorded macros matching the regular expression
<a>pat</a>. If <em>!</em> is given, all macros are deleted.
</p>
</description>
</item>
@@ -80,12 +88,12 @@
<item>
<tags>@ :play</tags>
<spec>:pl<oa>ay</oa> <a>arg</a></spec>
<spec><oa>count</oa>@<a>arg</a></spec>
<spec>:pl<oa>ay</oa> <a>a-z0-9</a></spec>
<spec><oa>count</oa>@<a>a-z0-9</a></spec>
<description>
<p>
Plays the contents of macro with name <a>arg</a> <oa>count</oa> times. The <k>@</k> mapping
only accepts {0-9a-z} as <a>arg</a>.
Plays the contents of macro with name <a>a-z0-9</a> <oa>count</oa>
times.
</p>
</description>
</item>
@@ -94,7 +102,7 @@
<item>
<tags>@@</tags>
<spec><oa>count</oa>@@</spec>
<description>
<description short="true">
<p>Replay the last executed macro <oa>count</oa> times.</p>
</description>
</item>
@@ -108,57 +116,91 @@
<spec>:so<oa>urce</oa><oa>!</oa> <a>file</a></spec>
<description>
<p>
Read Ex commands, JavaScript, or CSS from <a>file</a>. You can either source files
which mostly contain Ex commands like <ex>map &lt; gt</ex> and put JavaScript code
within a:
Read Ex commands, JavaScript, or CSS from <a>file</a>. Files are
interperated based on their extensions. Files when end in
<em>.js</em> are executed as JavaScript, while those ending in
<em>.css</em> are loaded as Cascading Stylesheets, and anything
else is interperated as Ex commands. In normal cases, any errors
generated by the execution or non-existence of <a>file</a> are
printed to the <t>command-line</t> area. When <oa>!</oa> is
provided, these are suppressed.
</p>
<code><![CDATA[
js <<EOF
hello = function () {
alert("Hello world");
<p>
Environment variables in <a>file</a> are expanded to their current
value, and the prefix <em>~</em> is replaced with the value of
<em>$HOME</em>. See <t>expand-env</t> and <t>initialization</t>
for more information.
</p>
<h3 tag=":source-css">Cascading Stylesheets</h3>
<p>
When a CSS file is sourced, its contents are applied to every web
page and every chrome document, including all browser windows and
dialogs. If the same file is sourced more than once, its previous
rules are cleared before it is applied again. Rules can be
restricted to specific documents by enclosing them
<link topic="https://developer.mozilla.org/en/CSS/@-moz-document">@-moz-document</link>
blocks.
</p>
<h3 tag=":source-javascript">JavaScript</h3>
<p>
JavaScript files are executed with full chrome privileges in their
own global namespaces. These namespaces are stored as objects in
the <em>plugins</em> object, in the property named for the full
path of the sourced file. This means that any variables or
functions created by your script are stored as properties of that
object. Additionally, all properties of the global <em>window</em>
and <em>modules</em> objects are accessible to your script as
global variables.
</p>
<p>
Files in <em>~/.&dactyl.name;/plugins</em> may additionally be
accessed in <em>plugins.<a>filename</a></em> where <a>filename</a>
is the last component of the file's path stripped of any
extensions, with all hyphens stripped and any letter following a
hyphen capitalized. So, the file
<em>~/.&dactyl.name;/plugins/foo-bar.js</em> may be accessed as
<em>plugins.fooBar</em>. See also <t>writing-plugins</t>
</p>
<h3 tag=":source-ex">Ex commands</h3>
<p>
Ex command files are executed as if each line were entered into
the <t>command-line</t> individually. Additionally, certain
commands support the same here document syntax supported by most
Unix shells and by the <t>command-line</t>. So, to execute a
JavaScript statement which does not comfortably fit on a single
line, you can use,
</p>
<code><ex>js</ex> &lt;&lt;<em>EOF</em>
<hl key="Object">var</hl> hello = <hl key="Key">function</hl> () {
alert(<str>Hello world</str>);
}
EOF
]]></code>
<p>
Or you can alternatively source a file which ends in <tt>.js</tt>. These files are
automatically sourced as pure JavaScript files.
</p>
<p>
Note: In both cases you must add functions to the global window object like
shown above, functions written as:
</p>
<code><![CDATA[
function hello2() {
alert("Hello world");
}
]]></code>
<p>are only available within the scope of the script.</p>
<p>
The <tt>.&dactyl.name;rc</tt> file in your home directory and any
files in <tt>~/.&dactyl.name;/plugin/</tt> are always
sourced at startup. <tt>~</tt> is supported as a
shortcut for the <tt>$HOME</tt> directory. If <oa>!</oa> is
specified, errors are not printed.
</p>
<em>EOF</em></code>
</description>
</item>
<item>
<tags>:lpl :loadplugins</tags>
<strut/>
<spec>:loadplugins</spec>
<description>
<p>
Load all unloaded plugins immediately. Because plugins are automatically
loaded after &dactyl.name;rc is sourced, this command must be placed early
in the &dactyl.name;rc file if &dactyl.name;rc also includes commands that are
implemented by plugins. Additionally, this command allows for sourcing
new plugins without restarting &dactyl.appname;.
Immediately load all plugins which have yet to be loaded. Because
plugins are not automatically loaded until after &dactyl.name;rc
is sourced, this command must be placed early in the
&dactyl.name;rc file if &dactyl.name;rc uses commands or options
which are defined by plugins. Additionally, this command allows
newly installed plugins to be easily loaded without restarting
&dactyl.appname;.
</p>
</description>
</item>
@@ -169,13 +211,12 @@ function hello2() {
<spec>:runt<oa>ime</oa><oa>!</oa> <a>file</a></spec>
<description>
<p>
Source the specified file from each directory in <o>runtimepath</o>. Example:
</p>
<code><ex>:runtime plugin/foobar.vimp</ex></code>
<p>
Only the first found file is sourced. When <oa>!</oa> is given, all found files are
sourced.
Source the specified file from the first directory in
<o>runtimepath</o> in which it exists. When <oa>!</oa> is given,
source the specified from all directories in <o>runtimepath</o> in
which it exists.
</p>
<example><ex>:runtime plugins/foobar.js</ex></example>
</description>
</item>
@@ -191,11 +232,12 @@ function hello2() {
<item>
<tags>:fini :finish</tags>
<strut/>
<spec>:fini<oa>sh</oa></spec>
<description>
<p>
Stop sourcing a script file. This can only be called from within a &dactyl.appname;
script file.
Stop sourcing a script file. This can only be called from within a
&dactyl.appname; script file.
</p>
</description>
</item>
@@ -208,16 +250,17 @@ function hello2() {
<spec>:<oa>count</oa>time<oa>!</oa> <a>code|:command</a></spec>
<description>
<p>
Profile a piece of code or a command. Run <a>code</a> <oa>count</oa> times (default: 1)
and returns the elapsed time. <a>code</a> is always passed to JavaScript's eval(),
which might be slow, so take the results with a grain of salt.
Profile a piece of JavaScript code or an Ex command. Run
<a>code</a> <oa>count</oa> times and print the elapsed time.
If <a>code</a> begins with a <ex>:</ex>, it is executed as an Ex
command. Otherwise, it is executed as JavaScript, in which case it
is evaluated only once and stored as a function which is executed
<oa>count</oa> times.
</p>
<p>If <a>code</a> starts with a <ex>:</ex>, it is executed as a &dactyl.appname; command.</p>
<p>
Use the special version with <oa>!</oa> if you just want to run any command multiple
times without showing profiling statistics.
When <oa>!</oa> is given, <a>code</a> is executed <oa>count</oa>
times, but no statistics are printed.
</p>
</description>
</item>