1 <?xml version="1.0" encoding="UTF-8"?>
2 <?xml-stylesheet type="text/xsl" href="dactyl://content/help.xsl"?>
4 <!DOCTYPE document SYSTEM "dactyl://content/dtd">
8 title="&dactyl.appName; Command-line"
10 xmlns:html="&xmlns.html;">
12 <h1 tag="command-line-mode command-line mode-cmdline">Command Line mode</h1>
16 &dactyl.appName;'s Command Line mode is perhaps its most
17 powerful interface. In this mode, the command input bar at the
18 bottom of the window is given the keyboard focus for any of a
19 variety of required inputs. In addition to access to almost
20 every aspect of &dactyl.appName; and &dactyl.host;, the command
21 line provides power and comprehensive completion for all of its
22 commands, along with concise descriptions for each command and
23 all of its arguments. Couple this with persistent, searchable
24 command history, and you have a very efficient interface for
25 easily performing simple and complex tasks.
29 Included among the several command-line modes are Ex command
30 mode (the standard mode for entering commands), Find mode (for
31 searching the current page), Prompt mode (for selecting files,
32 confirming actions), and Hints mode (for selecting links and
33 other items on a page).
42 Opens the command line in Ex mode. This is the mode used
43 for entering the various commands listed in
49 <h2 tag="cmdline-editing">Command-line editing</h2>
52 <tags><![CDATA[c_<C-i>]]></tags>
54 <description short="true">
55 <p>Launch the external editor. See the <o>editor</o> option.</p>
60 <tags><![CDATA[c_<C-c>]]></tags>
62 <description short="true">
63 <p>Quit Command Line mode without executing.</p>
68 <tags><![CDATA[c_<C-]>]]></tags>
70 <description short="true">
71 <p>Expand a command-line abbreviation.</p>
76 <tags><![CDATA[c_<Up>]]></tags>
81 Recall from command history the previous command line
82 which begins with the current input value.
88 <tags><![CDATA[c_<Down>]]></tags>
90 <spec><Down></spec>
93 Recall from command history the next command line
94 which begins with the current input value.
100 <tags><![CDATA[c_<C-p> c_<S-Up> c_<PageUp>]]></tags>
101 <spec><S-Up></spec>
103 <spec><PageUp></spec>
105 <p>Recall the previous command line from the history list.</p>
110 <tags><![CDATA[c_<C-n> c_<S-Down> c_<PageDown>]]></tags>
111 <spec><S-Down></spec>
112 <spec><PageDown></spec>
114 <p>Recall the next command line from the history list.</p>
118 <h2 tag="cmdline-completion">Command-line completion</h2>
121 <tags><![CDATA[c_<Tab>]]></tags>
123 <spec><Tab></spec>
126 Complete the word in front of the cursor according to the behavior
127 specified in <o>wildmode</o>. If <o>wildmode</o> contains
128 <str>list</str> and there are multiple matches then the completion
129 menu window is opened.
135 <tags><![CDATA[c_<S-Tab>]]></tags>
137 <spec><S-Tab></spec>
139 <p>Complete the previous full match when <o>wildmode</o> contains <str>full</str>.</p>
144 <tags><![CDATA[c_<A-Tab>]]></tags>
146 <spec><A-Tab></spec>
149 Similar to <k name="Tab" mode="c"/>, but the completion behavior is
150 specified by the <o>altwildmode</o> option.
156 <tags><![CDATA[c_<A-S-Tab>]]></tags>
158 <spec><A-S-Tab></spec>
160 <p>The <k name="S-Tab" mode="c"/> equivalent for <o>altwildmode</o>.</p>
164 <h2 tag="cmdline-lines">Ex command lines</h2>
171 Multiple commands, separated by a <em>|</em> can be
172 given in a single command line and will be executed consecutively.
173 <em>|</em> can be included as an argument to a command by escaping
174 it with a backslash. E.g.
175 <code><ex>:map \|</ex> <ex>:echo <str>bar</str></ex><k name="CR"/></code>
177 Several commands process the entire command-line string literally.
178 These commands will include any <em>|</em> as part of their
179 argument string and so cannot be followed by another command. The
180 list of these commands is:
182 <li><ex>:abbreviate</ex></li>
183 <li><ex>:autocmd</ex></li>
184 <li><ex>:cabbreviate</ex></li>
185 <li><ex>:cmap</ex></li>
186 <li><ex>:cnoremap</ex></li>
187 <li><ex>:command</ex></li>
188 <li><ex>:delmacros</ex></li>
189 <li><ex>:delmarks</ex></li>
190 <li><ex>:delqmarks</ex></li>
191 <li><ex>:delstyle</ex></li>
192 <li><ex>:echo</ex></li>
193 <li><ex>:echoerr</ex></li>
194 <li><ex>:echomsg</ex></li>
195 <li><ex>:elseif</ex></li>
196 <li><ex>:execute</ex></li>
197 <li><ex>:highlight</ex></li>
198 <li><ex>:iabbreviate</ex></li>
199 <li><ex>:if</ex></li>
200 <li><ex>:imap</ex></li>
201 <li><ex>:inoremap</ex></li>
202 <li><ex>:javascript</ex></li>
203 <li><ex>:let</ex></li>
204 <li><ex>:map</ex></li>
205 <li><ex>:marks</ex></li>
206 <li><ex>:nmap</ex></li>
207 <li><ex>:nnoremap</ex></li>
208 <li><ex>:noremap</ex></li>
209 <li><ex>:open</ex></li>
210 <li><ex>:qmarks</ex></li>
211 <li><ex>:silent</ex></li>
212 <li><ex>:style</ex></li>
213 <li><ex>:styledisable</ex></li>
214 <li><ex>:styleenable</ex></li>
215 <li><ex>:styletoggle</ex></li>
216 <li><ex>:tabopen</ex></li>
217 <li><ex>:toolbarhide</ex></li>
218 <li><ex>:toolbarshow</ex></li>
219 <li><ex>:toolbartoggle</ex></li>
220 <li><ex>:vmap</ex></li>
221 <li><ex>:vnoremap</ex></li>
222 <li><ex>:winopen</ex></li>
223 <li><ex>:yank</ex></li>
229 <h3 tag="cmdline-arguments">Ex command-line arguments</h3>
232 Most Ex commands accept a number of options and arguments. Arguments and
233 options are generally separated by spaces, and treat a number of
234 characters, including <em>\</em>, <em>'</em>, <em>"</em>, and <em>|</em>,
235 specially. Moreover, certain arguments have their own special characters.
236 For instance, when using <ex>:set</ex> to change a <t>stringlist</t>
237 option, the comma character is used to separate elements of said list. Or
238 when calling <ex>:autocmd</ex>, the pattern given may be negated by
239 prefixing it with a <em>!</em>. In order to use these characters in
240 command arguments, stripped of their special meaning, they must be quoted.
243 <p tag="cmdline-quoting quoting">
244 &dactyl.appName; offers four distinct quoting styles, each with its own
245 distinct advantages and disadvantages. The first, and most basic, is the
246 automatic quoting applied to the commands listed in <ex>:bar</ex>. When
247 any of these commands is invoked, their final argument is always
248 interpreted literally. No characters have special meaning whatsoever, and
249 no care need be taken to quote anything. Additionally, the following three
250 optional quoting characters are available:
253 <dl dt="width: 8em;">
256 This is the most basic quoting character. When it is encountered
257 outside of single or double quotes, it forces the next character to be
258 interpreted literally. So, for instance, <tt>\\</tt> ⇒ <tt>\</tt>,
259 <tt>\'</tt> ⇒ <tt>'</tt>, <tt>\a</tt> ⇒ <tt>a</tt>, and
260 <tt>\␣</tt> ⇒ <tt>␣</tt>.
264 Any character inside single quotes aside from the ' character itself
265 is interpreted literally. To include a literal single quote, it must
266 be doubled. So, <code>'foo\ ''bar\\ baz\' ⇒ foo\ 'bar\\ baz\</code>
270 Any character inside of double quotes except for <em>"</em> and
271 <em>\</em> is interpreted literally. A literal double quote may be
272 included by preceding it with a backslash. Any other occurrence of a
273 backslash starts an escape sequence as in JSON strings.
274 Among the available escape sequences are:
275 <dl dt="width: 8em;">
276 <dt>\n</dt> <dd>A newline character.</dd>
277 <dt>\t</dt> <dd>A tab character.</dd>
278 <dt>\uxxxx</dt> <dd>Where each <em>x</em> is a digit between 0 and F, a Unicode character at code-point <em>xxxx</em>.</dd>
283 <p tag="cmdline-options">
284 Many Ex commands accept option arguments in addition to regular arguments.
285 Option arguments begin with a hyphen (<em>-</em>), and often have a short
286 form and a long form, such as <em>-name</em> and <em>-n</em>. Most options
287 accept arguments, which come after the option separated by either a space
288 or an equal sign. For instance, the following three forms,
289 <em>-name=<str>foo</str></em>, <em>-name <str>foo</str></em>, and
290 <em>-n <str>foo</str></em>, are all acceptable and entirely equivalent.
295 <!-- vim:se sts=4 sw=4 et: -->