mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 22:32:27 +01:00
95 lines
3.3 KiB
Plaintext
95 lines
3.3 KiB
Plaintext
HEADER
|
|
|
|
|repeat| +
|
|
|
|
Vimperator can repeat a number of commands or record macros...
|
|
|
|
section:Macros[macros,complex-repeat]
|
|
|
|
|q|
|
|
||q {arg}|| +
|
|
____________________________________________________________________________
|
|
Record a key sequence into a macro.
|
|
Available macros are {0-9a-zA-Z} (uppercase to append).
|
|
Type 'q' to stop recording.
|
|
____________________________________________________________________________
|
|
|
|
|
|
|:macros| +
|
|
||:mac[ros] [regex]||
|
|
________________________________________________________________________________
|
|
List recorded macros matching the optional regular expression. If no regex is
|
|
given, list all.
|
|
________________________________________________________________________________
|
|
|
|
|
|
|:delmac| |:delmacros|
|
|
||:delmac[ros] [regex]|| +
|
|
________________________________________________________________________________
|
|
Delete recorded macros matching a regular expression.
|
|
________________________________________________________________________________
|
|
|
|
|
|
|@| |@@| |:play|
|
|
||[count]@ {arg}|| +
|
|
||[count]@@|| +
|
|
||:pl[ay] {arg}|| +
|
|
____________________________________________________________________________
|
|
|
|
Plays the contents of macro {0-9a-z}.
|
|
|
|
@@ replays a previous executed macro.
|
|
|
|
:play {arg} plays a recorded macro.
|
|
____________________________________________________________________________
|
|
|
|
section:Using{nbsp}scripts[using-scripts]
|
|
|
|
|:so| |:source|
|
|
||:so[urce][!] {file}|| +
|
|
________________________________________________________________________________
|
|
Read Ex commands from {file}. You can either source files which mostly contain
|
|
Ex commands like [c]map < gt[c] and put JavaScript code within a:
|
|
|
|
--------------------------------------------------------------------------------
|
|
js <<EOF
|
|
hello = function () {
|
|
alert("Hello world");
|
|
}
|
|
EOF
|
|
--------------------------------------------------------------------------------
|
|
Or you can alternatively source a file which ends in _.js_, these files are
|
|
automatically sourced as pure JavaScript files.
|
|
|
|
Note: In both cases you must add functions to the global window object like
|
|
shown above, functions written as:
|
|
--------------------------------------------------------------------------------
|
|
function hello2() {
|
|
alert("Hello world");
|
|
}
|
|
--------------------------------------------------------------------------------
|
|
are only available within the scope of the script.
|
|
|
|
The _.vimperatorrc_ file in your home directory and any files in
|
|
_\~/.vimperator/plugin/_ are always sourced at startup.
|
|
\~ is supported as a shortcut for the _$HOME_ directory. If [!] is
|
|
specified, errors are not printed.
|
|
________________________________________________________________________________
|
|
|
|
section:Profiling[profile,profiling]
|
|
|
|
|:time|
|
|
||:[count]time[!] {code|:command}|| +
|
|
________________________________________________________________________________
|
|
Profile a piece of code or a command. Run {code} [count] times (default 1)
|
|
and returns the elapsed time. {code} is always passed to JavaScript's eval(),
|
|
which might be slow, so take the results with a grain of salt.
|
|
|
|
If {code} starts with a [c]:[c], it is executed as a Vimperator command.
|
|
|
|
Use the special version with [!] if you just want to run any command multiple
|
|
times without showing profiling statistics.
|
|
________________________________________________________________________________
|
|
|
|
// vim: set syntax=asciidoc:
|