Questions tagged [tabbed-user-interface]

A tab page holds one or more windows. Questions about how to use and customize the behavior of Vim tabs.

From :h tab-page-intro:

You can easily switch between tab pages, so that you have several collections of windows to work on different things.

Usually you will see a list of labels at the top of the Vim window, one for each tab page. With the mouse you can click on the label to jump to that tab page. There are other ways to move between tab pages, see below.

Most commands work only in the current tab page. That includes the CTRL-W commands, :windo, :all and :ball (when not using the :tab modifier). The commands that are aware of other tab pages than the current one are mentioned below.

Tabs are also a nice way to edit a buffer temporarily without changing the current window layout. Open a new tab page, do whatever you want to do and close the tab page

110 questions
17
votes
5 answers

How can I open multiple tabs at once?

If I use: :tabedit file1 file2 I get: E172: Only one file name allowed Is there any way to use :tabedit with multiple file names? Or another way to open multiple tabs at once?
Martin Tournoij
  • 62,054
  • 25
  • 192
  • 271
15
votes
3 answers

How do I make opening new tabs the default?

When I open vim with multiple files (vim f1 f2 ...), how can I make it open them in tabs directly, without using -p? I'm looking to separate out shell behaviour from vim behaviour, removing vim-based aliases, etc. That's why I'd prefer not to use…
muru
  • 24,838
  • 8
  • 82
  • 143
12
votes
2 answers

Duplicate buffer into new tab instead of moving it

I frequently want to temporarily maximize a buffer in a tab page and then go back to the old buffer configuration that I was looking at. My current workflow for doing something like this is either to close all the other buffers using o or to…
Greg Nisbet
  • 1,839
  • 14
  • 27
10
votes
1 answer

How do I open a file to view in a new tab?

How do I open a file to view in a new tab? Specifically, I want the read-only equivalent of :tabe[dit] . I have tried :tab :view but that does not create a new tab as the documentation would suggest.
adurity
  • 203
  • 2
  • 5
7
votes
1 answer

Is there a way to move n tabs forward?

I'm familiar with ngT, which will move n tabs backward. Is there an equivalent way to move forward? I know that if I have 5 tabs open and I'm on tab 3, I can use 3gT to move backwards to tab 5. However, this quickly becomes unwieldy as the number of…
Floegipoky
  • 457
  • 5
  • 13
6
votes
1 answer

How do you set the name of a tab page?

I have a couple of tabs open. Is it possible to set custom tab page names for each individual tab page? For example, I want to name one tab "database", another "backend", and another "frontend". I just want static labels. Does something like…
425nesp
  • 576
  • 5
  • 16
5
votes
1 answer

Retitling tab labels

Context: I tend to use tabs to contain splits of files that are grouped around some purpose (e.g. in a typical MVC framework, I'll have the model/view/controller files for a given part of the app open in splits under the same tab). Since these…
aehlke
  • 151
  • 4
5
votes
3 answers

How do I open a shell in only one tab in Vim?

I usually work on tabs in Vim, and on many occasions, I end up requiring a shell to do run some command, etc. (Escape -> :!sh). Is there any way I can open the shell in only one tab in Vim? I would like to be able to switch between tabs containing…
ArM
  • 153
  • 1
  • 4
5
votes
2 answers

How to close all tabs with windows and terminals so I can quit

I have multiple tab pages. Some tab pages only have open files, some only have :terminals open, and some have a mix of files and terminals. At the end of the day, I want to quit Vim. Normally, I go through every tab page and close every window…
425nesp
  • 576
  • 5
  • 16
3
votes
2 answers

How does one put currently open files into tabs?

When I open a large number of files in vim with tabs only the first tabpagemax files are in tabs and any more than that are available by doing :n. After I close several of the open tabs how do I 'refresh' the tabs with the untabbed files?
andorov
  • 205
  • 1
  • 6
2
votes
1 answer

What is the X that appears on the top right corner when multiple tabs are open?

What is that X on the corner? What is it for and what does it do? I opened Vim with vim -p tab1 tab2 on Windows 10 and in WLS with Ubuntu and they both have it.
Marcus
  • 135
  • 6
2
votes
1 answer

Rather than tabnext and tabprevious can I get a list of tabs and select the one to switch to?

Instead of using tabnext and tabprevious is there a command or a plugin which can list your tabs vertically so you can navigate up and down and choose the one to switch to? I am thing along the lines of the Ctrl-a " command in screen which lists…
vfclists
  • 907
  • 8
  • 15
1
vote
1 answer

Modification of a tab's windows to specified format

I have the following structure of a tab in Vim. x marks the cursor position. (Note that I don't have control over how these windows are placed in the tab in the first place. It is the default debug output in Vimspector for those interested. There…
Tryer
  • 247
  • 1
  • 6
1
vote
0 answers

Add a blank line between tabline and first line of text?

Screenshot of my vim: I want to add a line between my tabline and the first line of the text. How can I do that?
1
vote
1 answer

Is there a way to use a wildcard with :tabnew

I often find myself wanting to open multiple tabs at the same time from within vim. I would like something like this: :tabnew src/Class.* which would open all matching files in separate tabs. Is there a way to get this functionality?
oarfish
  • 1,277
  • 3
  • 10
  • 18
1
2