0

So I want vim to behave like a "standard" text editor where whatever buffers are open will always map to a tab, and that tab only shows 1 buffer only.

This is like say sublime text, where any open file lives in a tab.

Is this achievable?

1

2 Answers 2

2

No. You can't do that without serious losses in usability and flexibility so you should get used to the Vim way:

  • the buffer is your file proxy,
  • the window is a view into a buffer,
  • the tab page is a "workspace", an arrangement of windows.

Forget all your old habits as they will slow your learning down.

0

It is very complicated to do this, possibly even impossible, and it can cause you to fight with Vim instead of learning Vim's quirky yet powerful way of doing tabs.

However, there are a few options:

  • Install a plugin that provides a clickable list of buffers, basically giving you the same functionality. I know they exist, I'm not sure of any specific names off the top of my head though.
  • Install the "cream" configuration. I think there are settings that try to emulate 1-file-per-tab editors.
  • Accept that Vim will sometimes have a file in more than one tab, and more than one file in a tab, but edit new files in new tabs, etc. to mostly maintain 1-file-per-tab on your own. Of special interest to you may be the 'switchbuf' option, and the ":tab drop" command. Both of these allow Vim to search for a tab page already containing a file rather than creating a new one, when editing. See the help for 'switchbuf' and :drop for details (the tab modifier just makes :drop use tabs in place of windows).

You must log in to answer this question.

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