behaviour can be customized using the 'tabclose' option.
*:tabo* *:tabonly*
:tabo[nly][!] Close all other tab pages.
When the 'hidden' option is set, all buffers in closed windows
become hidden.
When 'hidden' is not set, and the 'autowrite' option is set,
modified buffers are written. Otherwise, windows that have
buffers that are modified are not removed, unless the [!] is
given, then they become hidden. But modified buffers are
never abandoned, so changes cannot get lost. >
:tabonly " close all tab pages except the current one
:tabo[nly][!] {count}
Close all tab pages except {count} one. >
:.tabonly " as above
:-tabonly " close all tab pages except the previous
" one
:+tabonly " close all tab pages except the next one
:1tabonly " close all tab pages except the first one
:$tabonly " close all tab pages except the last one
:tabonly - " close all tab pages except the previous
" one
:tabonly +2 " close all tab pages except the two next
" one
:tabonly 1 " close all tab pages except the first one
:tabonly $ " close all tab pages except the last one
:tabonly # " close all tab pages except the last
" accessed one
SWITCHING TO ANOTHER TAB PAGE:
Using the mouse: If the tab page line is displayed you can click in a tab page
label to switch to that tab page. Click where there is no label to go to the
next tab page. |'tabline'|
:tabn[ext] *:tabn* *:tabnext* *gt*
<C-PageDown> *CTRL-<PageDown>* *<C-PageDown>*
gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
Go to the next tab page. Wraps around from the last to the
first one.
:{count}tabn[ext]
:tabn[ext] {count}
Go to tab page {count}. The first tab page has number one. >
:-tabnext " go to the previous tab page
:+tabnext " go to the next tab page
:+2tabnext " go to the two next tab page
:1tabnext " go to the first tab page
:$tabnext " go to the last tab page
:tabnext $ " as above
:tabnext # " go to the last accessed tab page
:tabnext - " go to the previous tab page
:tabnext -1 " as above
:tabnext + " go to the next tab page
:tabnext +1 " as above
{count}<C-PageDown>
{count}gt Go to tab page {count}. The first tab page has number one.
:tabp[revious] *:tabp* *:tabprevious* *gT* *:tabN*
:tabN[ext] *:tabNext* *CTRL-<PageUp>*
<C-PageUp> *<C-PageUp>* *i_CTRL-<PageUp>* *i_<C-PageUp>*
gT Go to the previous tab page. Wraps around from the first one
to the last one.
:tabp[revious] {count}
:tabN[ext] {count}
{count}<C-PageUp>
{count}gT Go {count} tab pages back. Wraps around from the first one
to the last one. Note that the use of {count} is different
from |:tabnext|, where it is used as the tab page number.
:tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
:tabfir[st] Go to the first tab page.
*:tabl* *:tablast*
:tabl[ast] Go to the last tab page.
<C-Tab> *CTRL-<Tab>* *<C-Tab>*
g<Tab> *g<Tab>* *CTRL-W_g<Tab>*
CTRL-W g<Tab> Go to the last accessed tab page.
Other commands:
*:tabs*
:tabs List the tab pages and the windows they contain.
Shows a ">" for the current window.
Shows a "+" for modified buffers.
For example:
Tab page 1 ~
+ tabpage.txt ~
ex_docmd.c ~
Tab page 2 ~
> main.c ~
REORDERING TAB PAGES:
:tabm[ove] [N] *:tabm* *:tabmove*
:[N]tabm[ove]
Move the current tab page to after tab page N. Use zero to
make the current tab page the first one. N is counted before
the move, thus if the second tab is the current one,
`:tabmove 1` and `:tabmove 2` have no effect.
Without N the tab page is made the last one. >
:.tabmove " do nothing
:-tabmove " move the tab page to the left
:+tabmove " move the tab page to the right
:0tabmove " move the tab page to the first
:tabmove 0 " as above
:tabmove " move the tab page to the last