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
:$tabmove " as above
:tabmove $ " as above
:tabmove # " move the tab page after the last accessed
" tab page
:tabm[ove] +[N]
:tabm[ove] -[N]
Move the current tab page N places to the right (with +) or to
the left (with -). >
:tabmove - " move the tab page to the left
:tabmove -1 " as above
:tabmove + " move the tab page to the right
:tabmove +1 " as above
Note that although it is possible to move a tab behind the N-th one by using
:Ntabmove. And move it by N places by using :+Ntabmove. For clarification what
+N means in this context see |[range]|.
LOOPING OVER TAB PAGES:
*:tabd* *:tabdo*
:[range]tabd[o] {cmd}
Execute {cmd} in each tab page or, if [range] is given, only
in tabpages which tab page number is in the [range]. It works
like doing this: >
:tabfirst
:{cmd}
:tabnext
:{cmd}
etc.
< This only operates in the current window of each tab page.
When an error is detected on one tab page, further tab pages
will not be visited.
The last tab page (or where an error occurred) becomes the
current tab page.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close tab pages or reorder them.
Also see |:windo|, |:argdo|, |:bufdo|, |:cdo|, |:ldo|, |:cfdo|
and |:lfdo|.
==============================================================================
3. Other items *tab-page-other*
*tabline-menu*
The GUI tab pages line has a popup menu. It is accessed with a right click.
The entries are:
Close Close the tab page under the mouse pointer. The
current one if there is no label under the mouse
pointer.
New Tab Open a tab page, editing an empty buffer. It appears
to the left of the mouse pointer.
Open Tab... Like "New Tab" and additionally use a file selector to
select a file to edit.
Diff mode works per tab page. You can see the diffs between several files
within one tab page. Other tab pages can show differences between other
files.
Variables local to a tab page start with "t:". |tabpage-variable|
Currently there is only one option local to a tab page: 'cmdheight'.
*tabnew-autocmd*
The TabLeave and TabEnter autocommand events can be used to do something when
switching from one tab page to another. The exact order depends on what you
are doing. When creating a new tab page this works as if you create a new
window on the same buffer and then edit another buffer. Thus ":tabnew"
triggers:
WinLeave leave current window
TabLeave leave current tab page
WinEnter enter window in new tab page
TabEnter enter new tab page
BufLeave leave current buffer
BufEnter enter new empty buffer
When switching to another tab page the order is:
BufLeave
WinLeave
TabLeave
WinEnter
TabEnter
BufEnter
When entering a new tab page (|:tabnew|), TabNew is triggered before TabEnter
and after WinEnter.
==============================================================================
4. Setting 'tabline'