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; Tabs"
10 xmlns:html="&xmlns.html;">
12 <h1 tag="tabs buffers">Tabs and buffers</h1>
16 Tabs allow you to keep many web pages open at the same time and to quickly
17 switch between them. Each tab contains exactly one buffer. If your version
18 of &dactyl.host; supports tab groups, only buffers in the active group
19 will be attached to visible tabs. Although not all buffers are always
20 attached to visible tabs, they are all always accessible via the
21 buffer-centric commands and key bindings. Tab-centric commands and key
22 bindings, however, only operate on the set of visible tabs.
29 <h2 tag="listing-tabs">Listing tabs</h2>
32 <tags>B :tabs :ls :files :buffers</tags>
33 <spec>:buffers <oa>filter</oa></spec>
37 Show a list of buffers matching <oa>filter</oa>. Buffers are
38 listed according to their tab groups, whether they are visible or
42 <p>A buffer may be marked with one of the following indicators:</p>
45 <dt><hl key="Indicator">%</hl></dt><dd>The current buffer</dd>
46 <dt><hl key="Indicator">#</hl></dt><dd>The alternate buffer for <ex>:buffer #</ex> and <k name="C-^"/></dd>
52 <tags>:keepa :keepalt</tags>
53 <spec>:keepa<oa>lt</oa> <a>cmd</a></spec>
55 <p>Execute a command without changing the current alternate buffer.</p>
59 <h2 tag="opening-tabs">Opening tabs</h2>
64 <spec>:tab <a>cmd</a></spec>
67 Execute <a>cmd</a>, but open any new pages in a new tab rather
68 than the currently focused tab.
74 <!-- TODO: move this somewhere more appropriate -->
75 <tags>:window :wind</tags>
76 <spec>:wind<oa>ow</oa> <a>cmd</a></spec>
79 Execute <a>cmd</a>, but open any new pages in a new window rather
80 than the currently focused tab.
86 <tags>:tabdu :tabduplicate</tags>
87 <spec>:<oa>count</oa>tabdu<oa>plicate</oa></spec>
90 Duplicate the current tab and focus the duplicate. If
91 <oa>count</oa> is given, duplicate the tab <oa>count</oa> times.
96 <!-- TODO: should the tab commands be moved back here? -->
98 See <t>opening</t> for other ways to open new tabs.
101 <h2 tag="changing-tabs">Changing tabs</h2>
106 <spec><oa>count</oa>gb</spec>
109 Repeat last <ex>:buffer<oa>!</oa></ex> command. This is useful to quickly jump between
110 buffers which have a similar URL or title.
118 <spec><oa>count</oa>gB</spec>
121 Repeat last <ex>:buffer<oa>!</oa></ex> command in the reverse direction.
129 <spec><oa>count</oa>gt</spec>
132 Go to the next tab. Cycles to the first tab when the last one is selected.
133 If <oa>count</oa> is specified, go to the <oa>count</oa>th tab.
139 <tags><![CDATA[<C-PageDown> <C-Tab> <C-n>]]></tags>
141 <spec><oa>count</oa><C-n></spec>
144 Go to the next tab. Cycles to the first tab when the last one is selected.
145 If <oa>count</oa> is specified, go to the <oa>count</oa>th next tab.
151 <tags><![CDATA[<C-PageUp> <C-S-Tab> <C-p> gT]]></tags>
153 <spec><oa>count</oa>gT</spec>
156 Go to the previous tab. Cycles to the last tab when the first one is selected.
157 If <oa>count</oa> is specified, go to the <oa>count</oa>th previous tab.
163 <tags>:tabn :tabnext</tags>
164 <spec>:<oa>count</oa>tabn<oa>ext</oa> <oa>count</oa></spec>
165 <tags>:tn :tnext</tags>
166 <spec>:<oa>count</oa>tn<oa>ext</oa> <oa>count</oa></spec>
167 <tags>:bn :bnext</tags>
168 <spec>:<oa>count</oa>bn<oa>ext</oa> <oa>count</oa></spec>
171 Switch to the next or <oa>count</oa>th tab. Cycles to the first tab when
172 the last one is selected and <oa>count</oa> is not specified.
178 <tags>:bN :bNext :bp :bprevious</tags>
179 <spec>:<oa>count</oa>bp<oa>revious</oa> <oa>count</oa></spec>
180 <spec>:<oa>count</oa>bN<oa>ext</oa> <oa>count</oa></spec>
181 <tags>:tN :tNext :tabN :tabNext</tags>
182 <spec>:<oa>count</oa>tabN<oa>ext</oa> <oa>count</oa></spec>
183 <tags>:tp :tprevious :tabp :tabprevious</tags>
184 <spec>:<oa>count</oa>tabp<oa>revious</oa> <oa>count</oa></spec>
185 <spec>:<oa>count</oa>tp<oa>revious</oa> <oa>count</oa></spec>
188 Switch to the previous tab or go <oa>count</oa> tabs back. Wraps around from the
189 first tab to the last tab.
195 <tags><![CDATA[<C-6> <C-^>]]></tags>
196 <spec><oa>count</oa><C-^></spec>
199 Select the previously selected tab. This provides a quick method of toggling
200 between two tabs. If <oa>count</oa> is specified, go to the <oa>count</oa>th tab.
206 <tags>b :b :buffer</tags>
207 <spec>:<oa>count</oa>b<oa>uffer</oa><oa>!</oa> <oa>url|index</oa></spec>
208 <spec><oa>count</oa>b</spec>
211 Go to the specified buffer from the buffer list. Argument can be
212 either the buffer index or the full URL opened in an existing
213 buffer. If <oa>count</oa> is given, go to the <oa>count</oa>th
218 If argument is neither a full URL nor an index but uniquely identifies a
219 buffer, it is selected. With <oa>!</oa> the next buffer matching the argument is
220 selected, even if it cannot be identified uniquely. Use <k>b</k> as a
221 shortcut to open this prompt.
224 <p>If argument is <em>#</em>, the alternate buffer will be selected (see <k name="C-^"/>).</p>
226 <p>If no argument is given, the current buffer remains current.</p>
235 <tags>:bf :bfirst :br :brewind</tags>
236 <spec>:br<oa>ewind</oa></spec>
237 <spec>:bf<oa>irst</oa></spec>
239 <tags>:tabfir :tabfirst :tabr :tabrewind</tags>
240 <spec>:tabr<oa>ewind</oa></spec>
241 <spec>:tabfir<oa>st</oa></spec>
243 <p>Switch to the first tab.</p>
248 <tags>g$ :bl :blast :tabl :tablast</tags>
249 <spec>:tabl<oa>ast</oa></spec>
250 <spec>:bl<oa>ast</oa></spec>
253 <p>Switch to the last tab.</p>
258 <tags>:tabde :tabdetach</tags>
260 <spec>:tabde<oa>tach</oa></spec>
263 Detach the current tab, and open it in its own window. As each
264 window must contain at least one buffer, it is not possible to detach
265 the last buffer in a window.
271 <tags>:taba :tabattach</tags>
272 <spec>:taba<oa>ttach</oa> <a>window-index</a> <oa>buffer-index</oa></spec>
275 Attach the current tab to another window. <a>window-index</a> is
276 an index into the list of open windows and <oa>buffer-index</oa>
277 is the index at which to insert the tab in the other window's
278 buffer list. If this is the last buffer in a window, the window
284 <h2 tag="reordering-tabs">Reordering tabs</h2>
287 <tags>:tabm :tabmove</tags>
288 <spec>:tabm<oa>ove</oa> <oa>N</oa></spec>
289 <spec>:tabm<oa>ove</oa><oa>!</oa> <oa>+N</oa> | <oa>-N</oa></spec>
292 Move the current tab to a position after tab <oa>N</oa>. When <oa>N</oa> is 0, the
293 current tab is made the first one. Without <oa>N</oa> the current tab is made the
294 last one. <oa>N</oa> can also be prefixed with ‘+’ or ‘-’ to indicate a relative
295 movement. If <oa>!</oa> is specified the movement wraps around the start or end of the
301 <h2 tag="closing-tabs">Closing tabs</h2>
305 <tags>:tabc :tabclose</tags>
306 <tags>:bun :bunload :bw :bwipeout :bd :bdelete</tags>
307 <spec>:<oa>count</oa>bd<oa>elete</oa><oa>!</oa> <oa>arg</oa></spec>
308 <spec>:<oa>count</oa>bun<oa>load</oa><oa>!</oa> <oa>arg</oa></spec>
309 <spec>:<oa>count</oa>bw<oa>ipeout</oa><oa>!</oa> <oa>arg</oa></spec>
310 <spec>:<oa>count</oa>tabc<oa>lose</oa><oa>!</oa> <oa>arg</oa></spec>
311 <spec><oa>count</oa>d</spec>
314 Delete current buffer. If <oa>count</oa> is specified then <oa>count</oa> tabs are
315 removed. Afterwards, the tab to the right of the deleted tabs is selected.
319 When used with <oa>arg</oa>, remove all tabs which contain <oa>arg</oa> in the
320 currently opened hostname. With <oa>!</oa>, remove all tabs for which
321 the currently opened page's URL or title contains <oa>arg</oa>.
329 <spec><oa>count</oa>D</spec>
331 <p>Like <k>d</k> but selects the tab to the left of the deleted tabs after deletion.</p>
336 <tags>:tabo :tabonly</tags>
338 <spec>:tabo<oa>nly</oa></spec>
340 <p>Close all buffers other than the currently visible tab.</p>
345 <tags>u :u :undo</tags>
346 <spec>:<oa>count</oa>u<oa>ndo</oa> <oa>url</oa></spec>
347 <spec><oa>count</oa>u</spec>
350 Restore a closed tab. If a <oa>count</oa> is given, restore the
351 <oa>count</oa>th closed tab. With <oa>url</oa>, restores most
352 recently closed tab with a matching URL.
358 <tags>:undoa :undoall</tags>
359 <spec>:undoa<oa>ll</oa></spec>
360 <description short="true">
361 <p>Restore all closed tabs in the closed tabs list.</p>
365 <h2 tag="looping-over-tabs">Looping over tabs</h2>
368 <tags>:tabd :tabdo :bufd :bufdo</tags>
369 <spec>:tabd<oa>o</oa> <a>cmd</a></spec>
372 Execute <a>cmd</a> once in each buffer. Each buffer is focused, in
373 turn, and <a>cmd</a> is executed therein. The last buffer remains
374 focused after execution.
378 <a>cmd</a> should not alter the tab list state by adding, removing or reordering
386 <!-- vim:se sts=4 sw=4 et: -->