0

I would like to know the possible way(s) to open multiple vim tabs under one window.

In Vim, we could open new windows with :Sexplore. Likewise, we can also open a file in a new tab for editing with :tabe <filename>.

Is there a way for us to have multiple tabs under a split window ?

My intention is to view the directories on one side and have the files for editing on the other side.

YAMAZAKI1996
  • 35
  • 1
  • 10
  • 1
    Yes, you can have several windows per tabs. Use e.g. `:sp file` or `:vsp file` to create viewports on different buffers at the same time. – Christian Brabandt Apr 18 '19 at 11:35
  • 2
    However @YAMAZAKI1996, you can't have multiple tabs in a window. – padawin Apr 18 '19 at 11:36
  • 2
    "My intention is to view the directories on one side and have the files for editing on the other side." - many people think they want that, but it is not the Vim way. Go with the Vim way, you will be happier. If you insist, you can try the NERDTree plugin, which is the closest thing to that. But learning good buffer navigation techniques is way better. – Amadan Apr 19 '19 at 04:05
  • @Amadan nailed it. This is a workflow that other editors and IDEs have engrained in you. The Vim workflow is different, but once you embrace it, you will never look back. – badfilms Apr 19 '19 at 10:17
  • interesting. what are some tutorials that you would recommend to have me familiarize with the vim workflow ? – YAMAZAKI1996 Apr 19 '19 at 11:55
  • The general gist is described in the answer [here](https://stackoverflow.com/questions/26708822/why-do-vim-experts-prefer-buffers-over-tabs). The vim wiki also has very comprehensive [page](https://vim.fandom.com/wiki/Vim_buffer_FAQ). And of course `:help buffers`. As usual with Vim, you'll probably use 10% of things described there to achieve 90% of what you want\need, so don't let the number of commands and options intimidate you. – Michail Apr 21 '19 at 15:48

0 Answers0