0

When I open more than one tab, in the top appears a bar with the names of the focused files: two tabs
but when I close the second tab the bar disappears: enter image description here

How can I keep that top bar always open? I also want to keep it because it helps me visualize which window is focused when more than one window is opened: enter image description here

2
  • 4
    Have a look at :help tabline and :help showtabline
    – D. Ben Knoble
    Jul 23 at 1:25
  • 2
    Also for window focus use the statusline
    – D. Ben Knoble
    Jul 23 at 3:10
4

How can I keep that top bar always open?

set showtabline=2

As stated in the help topic:

    The value of this option specifies when the line with tab page labels
    will be displayed:
        0: never
        1: only if there are at least two tab pages
        2: always

I also want to keep it because it helps me visualize which window is focused when more than one window is opened

Tab pages in vim are not the same as tabs in other popular editors. If you try to use it that way it might be something you struggle with.

A tab page holds one or more windows.  You can easily switch between tab
pages, so that you have several collections of windows to work on different
things.
...

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.