mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 15:02:27 +01:00
--HG-- rename : common/content/liberator-overlay.js => common/content/dactyl-overlay.js rename : common/content/liberator.js => common/content/dactyl.js rename : common/content/liberator.xul => common/content/dactyl.xul rename : common/skin/liberator.css => common/skin/dactyl.css rename : muttator/content/compose/liberator.dtd => muttator/content/compose/dactyl.dtd rename : muttator/content/compose/liberator.xul => muttator/content/compose/dactyl.xul rename : muttator/content/liberator.dtd => muttator/content/dactyl.dtd rename : vimperator/AUTHORS => pentadactyl/AUTHORS rename : vimperator/Donors => pentadactyl/Donors rename : vimperator/Makefile => pentadactyl/Makefile rename : vimperator/NEWS => pentadactyl/NEWS rename : vimperator/TODO => pentadactyl/TODO rename : vimperator/chrome.manifest => pentadactyl/chrome.manifest rename : vimperator/components/about-handler.js => pentadactyl/components/about-handler.js rename : vimperator/components/commandline-handler.js => pentadactyl/components/commandline-handler.js rename : vimperator/components/protocols.js => pentadactyl/components/protocols.js rename : vimperator/content/about.html => pentadactyl/content/about.html rename : vimperator/content/about_background.png => pentadactyl/content/about_background.png rename : vimperator/content/config.js => pentadactyl/content/config.js rename : vimperator/content/liberator.dtd => pentadactyl/content/dactyl.dtd rename : vimperator/content/logo.png => pentadactyl/content/logo.png rename : vimperator/content/vimperator.svg => pentadactyl/content/pentadactyl.svg rename : vimperator/content/vimperator.xul => pentadactyl/content/pentadactyl.xul rename : vimperator/contrib/vim/Makefile => pentadactyl/contrib/vim/Makefile rename : vimperator/contrib/vim/ftdetect/vimperator.vim => pentadactyl/contrib/vim/ftdetect/pentadactyl.vim rename : vimperator/contrib/vim/mkvimball.txt => pentadactyl/contrib/vim/mkvimball.txt rename : vimperator/contrib/vim/syntax/vimperator.vim => pentadactyl/contrib/vim/syntax/pentadactyl.vim rename : vimperator/install.rdf => pentadactyl/install.rdf rename : vimperator/locale/en-US/all.xml => pentadactyl/locale/en-US/all.xml rename : vimperator/locale/en-US/autocommands.xml => pentadactyl/locale/en-US/autocommands.xml rename : vimperator/locale/en-US/liberator.dtd => pentadactyl/locale/en-US/dactyl.dtd rename : vimperator/locale/en-US/gui.xml => pentadactyl/locale/en-US/gui.xml rename : vimperator/locale/en-US/intro.xml => pentadactyl/locale/en-US/intro.xml rename : vimperator/locale/en-US/options.xml => pentadactyl/locale/en-US/options.xml rename : vimperator/locale/en-US/tutorial.xml => pentadactyl/locale/en-US/tutorial.xml rename : vimperator/vimperatorrc.example => pentadactyl/pentadactylrc.example rename : vimperator/regressions.js => pentadactyl/regressions.js rename : vimperator/skin/about.css => pentadactyl/skin/about.css rename : vimperator/skin/icon.png => pentadactyl/skin/icon.png rename : xulmus/content/liberator.dtd => xulmus/content/dactyl.dtd rename : xulmus/locale/en-US/liberator.dtd => xulmus/locale/en-US/dactyl.dtd
227 lines
6.1 KiB
XML
227 lines
6.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
|
|
|
|
<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
|
|
|
|
<document
|
|
name="repeat"
|
|
title="&dactyl.appname; Repeating Commands"
|
|
xmlns="http://vimperator.org/namespaces/liberator"
|
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
|
<h1 tag="repeating">Repeating commands</h1>
|
|
<toc start="2"/>
|
|
|
|
<p>&dactyl.appname; can repeat a number of commands and record macros.</p>
|
|
|
|
<h2 tag="single-repeat">Single repeats</h2>
|
|
|
|
<item>
|
|
<tags>.</tags>
|
|
<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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>@:</tags>
|
|
<spec><oa>count</oa>@:</spec>
|
|
<description>
|
|
<p>Repeat the last Ex command <oa>count</oa> times.</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
|
|
<h2 tag="macros complex-repeat">Macros</h2>
|
|
|
|
<item>
|
|
<tags>q</tags>
|
|
<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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:macros</tags>
|
|
<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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:delmac :delmacros</tags>
|
|
<spec>:delmac<oa>ros</oa> <a>args</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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>@ :play</tags>
|
|
<spec>:pl<oa>ay</oa> <a>arg</a></spec>
|
|
<spec><oa>count</oa>@<a>arg</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>.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>@@</tags>
|
|
<spec><oa>count</oa>@@</spec>
|
|
<description>
|
|
<p>Replay the last executed macro <oa>count</oa> times.</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
|
|
<h2 tag="using-scripts">Using scripts</h2>
|
|
|
|
<item>
|
|
<tags>:so :source</tags>
|
|
<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 < gt</ex> and put JavaScript code
|
|
within a:
|
|
</p>
|
|
|
|
<code><![CDATA[
|
|
js <<EOF
|
|
hello = function () {
|
|
alert("Hello world");
|
|
}
|
|
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>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:lpl :loadplugins</tags>
|
|
<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;.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:ru :runtime</tags>
|
|
<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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:scrip :scriptnames</tags>
|
|
<spec>:scrip<oa>tnames</oa></spec>
|
|
<description>
|
|
<p>List all sourced script names, in the order they were first sourced.</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<item>
|
|
<tags>:fini :finish</tags>
|
|
<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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
|
|
<h2 tag="profile profiling">Profiling</h2>
|
|
|
|
<item>
|
|
<tags>:time</tags>
|
|
<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.
|
|
</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.
|
|
</p>
|
|
</description>
|
|
</item>
|
|
|
|
</document>
|
|
<!-- vim:se sts=4 sw=4 et: -->
|