tabs.xml

tabsbuffers
Tabs and buffers

Contents

  1. Listing tabs
  2. Opening tabs
  3. Changing tabs
  4. Reordering tabs
  5. Closing tabs
  6. Looping over tabs
  7. Application Tabs

Tabs allow you to keep many web pages open at the same time and to quickly switch between them. Each tab contains exactly one buffer. If your version of Firefox supports tab groups, only buffers in the active group will be attached to visible tabs. Although not all buffers are always attached to visible tabs, they are all always accessible via the buffer-centric commands and key bindings. Tab-centric commands and key bindings, however, only operate on the set of visible tabs.

listing-tabs
Listing tabs

B:tabs:ls:files:buffers
:buffers [filter]
B

Show a list of buffers matching [filter]. Buffers are listed according to their tab groups, whether they are visible or not.

A buffer may be marked with one of the following indicators:

%
The current buffer
#
The alternate buffer for :buffer # and <C-^>
:keepa:keepalt
:keepa[lt] {cmd}

Execute a command without changing the current alternate buffer.

opening-tabs
Opening tabs

:tab
:tab {cmd}

Execute {cmd}, but open any new pages in a new tab rather than the currently focused tab.

:window:wind
:wind[ow] {cmd}

Execute {cmd}, but open any new pages in a new window rather than the currently focused tab.

See opening for other ways to open new tabs.

changing-tabs
Changing tabs

gb
[count]gb

Repeat last :buffer[!] command. This is useful to quickly jump between buffers which have a similar URL or title.

gB
[count]gB

Repeat last :buffer[!] command in the reverse direction.

gt
[count]gt

Go to the next tab. Cycles to the first tab when the last one is selected. If [count] is specified, go to the [count]th tab.

<C-PageDown><C-Tab><C-n>
[count]<C-n>

Go to the next tab. Cycles to the first tab when the last one is selected. If [count] is specified, go to the [count]th next tab.

<C-PageUp><C-S-Tab><C-p>gT
[count]gT

Go to the previous tab. Cycles to the last tab when the first one is selected. If [count] is specified, go to the [count]th previous tab.

:tabn:tabnext
:[count]tabn[ext] [count]
:tn:tnext
:[count]tn[ext] [count]
:bn:bnext
:[count]bn[ext] [count]

Switch to the next or [count]th tab. Cycles to the first tab when the last one is selected and [count] is not specified.

:bN:bNext:bp:bprevious
:[count]bp[revious] [count]
:[count]bN[ext] [count]
:tN:tNext:tabN:tabNext
:[count]tabN[ext] [count]
:tp:tprevious:tabp:tabprevious
:[count]tabp[revious] [count]
:[count]tp[revious] [count]

Switch to the previous tab or go [count] tabs back. Wraps around from the first tab to the last tab.

<C-6><C-^>
[count]<C-^>

Select the previously selected tab. This provides a quick method of toggling between two tabs. If [count] is specified, go to the [count]th tab.

b:b:buffer
:[count]b[uffer][!] [url|index]
:[count]b[uffer][!] {match}
[count]b

Go to the specified buffer from the buffer list. Argument can be either the buffer index or the full URL opened in an existing buffer. If [count] is given, go to the [count]th buffer.

If argument is neither a full URL nor an index but uniquely identifies a buffer, by a partial match with the URL or title, it is selected. With [!] the next buffer matching the argument is selected, even if it cannot be identified uniquely. Use b as a shortcut to open this prompt.

If argument is #, the alternate buffer will be selected (see <C-^>).

If no argument is given, the current buffer remains current.

g^g0
g0
g^
:bf:bfirst:br:brewind
:br[ewind]
:bf[irst]
:tabfir:tabfirst:tabr:tabrewind
:tabr[ewind]
:tabfir[st]

Switch to the first tab.

g$:bl:blast:tabl:tablast
:tabl[ast]
:bl[ast]
g$

Switch to the last tab.

:tabde:tabdetach
:tabde[tach]

Detach the current tab, and open it in its own window. As each window must contain at least one buffer, it is not possible to detach the last buffer in a window.

:taba:tabattach
:taba[ttach] {window-index} [buffer-index]

Attach the current tab to another window. {window-index} is an index into the list of open windows and [buffer-index] is the index at which to insert the tab in the other window's buffer list. If this is the last buffer in a window, the window will be closed.

reordering-tabs
Reordering tabs

:tabm:tabmove
:tabm[ove] {N}
:tabm[ove] {match}
:tabm[ove][!] {+N|-N}

Move the current tab to the position of tab {N}. When {N} is $, the current tab is made the last one. {N} can also be prefixed with + or - to indicate a relative movement. If [!] is specified the movement wraps around the start or end of the tab list.

The tab index may also be selected by a general {match} string like :buffer.

closing-tabs
Closing tabs

d
:tabc:tabclose
:bun:bunload:bw:bwipeout:bd:bdelete
:[count]bd[elete][!] [arg]
:[count]bun[load][!] [arg]
:[count]bw[ipeout][!] [arg]
:[count]tabc[lose][!] [arg]
[count]d

Delete current buffer. If [count] is specified then [count] tabs are removed. Afterwards, the tab to the right of the deleted tabs is selected.

When used with [arg], remove all tabs which contain [arg] in the currently opened hostname. With [!], remove all tabs for which the currently opened page's URL or title contains [arg].

D
[count]D

Like d but selects the tab to the left of the deleted tabs after deletion.

:tabo:tabonly
:tabo[nly]

Close all buffers other than the currently visible tab.

u:u:undo
:[count]u[ndo] [url]
[count]u

Restore a closed tab. If a [count] is given, restore the [count]th closed tab. With [url], restores most recently closed tab with a matching URL.

:undoa:undoall
:undoa[ll]

Restore all closed tabs in the closed tabs list.

looping-over-tabs
Looping over tabs

:tabd:tabdo:bufd:bufdo
:tabd[o] {cmd}

Execute {cmd} once in each buffer. Each buffer is focused, in turn, and {cmd} is executed therein. The last buffer remains focused after execution.

{cmd} should not alter the tab list state by adding, removing or reordering tabs.

app-tabsapplication-tabspinned-tabs
Application Tabs

:pin:pintab
:[count]pin[tab][!] [arg]

Pin tab as an application tab. If [!] is given, the tab's pinned state is toggled. Arguments and count are the same as for :bdelete and :buffer.

:unpin:unpintab
:[count]unpin[tab] [arg]

Unpin tab as an application tab. Arguments and count are the same as for :pintab.