0

I want to disable tab pages in Vim completely to let Vim open every file in the same single tab page. How to disable tab pages in Vim?

2
  • it does that by default in my configuration. so, what do you do when you open a new file?
    – akira
    Feb 19, 2012 at 15:42
  • Vim opens files in tabs if you tell it to do so.
    – romainl
    Feb 19, 2012 at 17:20

2 Answers 2

0

Are you using the -p option to open files? That will cause VIM to open each file in a separate tab. if you use -o or -O it will open in a single tab but in separate windows (split horizontally or vertically respectively).

If you just call VIM with a list of filenames it will open all of them in a single tab and show a window displaying the first.

0

AFAIK, you cannot disable tabs in vim. However, unless you explicitly tell vim to open files in tabs, the default is to open buffers in a single tab pane; you therefore do not have to use tabs, and vim will not force you into tabs by default. I couple of ways to tell vim to open files in tabs is by passing the -p switch to vim on startup (followed by two or more files), or by using :tabe in command mode. I was a long time tab user, coming from other editors and web browsers, where tabs essentially represented open files, and it's been a hard habit to break (in vim, a buffer represents an open file). Learning how to properly switch between buffers is probably the best thing I've learned in vim to date. The problem is that vim by default does not give you a visual cue about open buffers, you have to query this via :ls and whatnot If you care for a presistent visual representation of open files, this plugin can help. But otherwise, opening files with :sp, :vsp, :e, etc will never create a tab for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .