0

Is it possible to close all tab pages and to stay back in "no tab page mode", without exiting?

3 Answers 3

3

As romainl points out in the comments, there is no such thing as "no tab page mode": if Vim is running you always have at least one tab.

If your tab line is displaying when you only have one tab, you need to change your 'showtabline' option (to its default value):

" Only display tab line when there are at least two tab pages:
:set showtabline = 1
5

You can use the :tabonly command, to close all other tabpages at once.

Note: technically you will still have a single tabpage open, even if the tablabel does not show up.

1

I would close all the tab pages (:tabclose) but the last one.

2
  • That is the point, I'd like to get rid of tab pages, including the last one ?
    – IvanDi
    Commented May 10, 2023 at 7:38
  • 2
    You always have at least one tab page, with one window, displaying one buffer. That is how Vim is designed and there is no workaround for that.
    – romainl
    Commented May 10, 2023 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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