summaryrefslogtreecommitdiff
path: root/common/locale/en-US/repeat.xml
blob: 0ef1069aa9639c8bdb5bfa2a45559f8d36c1a629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?>

<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd">

<document
    name="repeat"
    title="&liberator.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>&liberator.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 &liberator.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 &lt; 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>.&liberator.name;rc</tt> file in your home directory and any
            files in <tt>~/.&liberator.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 &liberator.name;rc is sourced, this command must be placed early
            in the &liberator.name;rc file if &liberator.name;rc also includes commands that are
            implemented by plugins. Additionally, this command allows for sourcing
            new plugins without restarting &liberator.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 &liberator.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 &liberator.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: -->