3

I'm wondering if it is possible to split a tab up in VS Code in the same way it works in VS 2017. In essence I only want to see the split for the file that is in focus. In VS Code when I have two files open with the first split then view the second file the first file tab is still showing but I only want to see the whole of the second file. Hope this makes sense. I've included a screenshot to demonstrate the differences.

Another way to phrase this is that I basically want editor groups inside tabs.

Screen shot of both programs with tabs

starball
  • 20,030
  • 7
  • 43
  • 238

1 Answers1

1

As far as I know, this is not super well supported in vanilla VS Code (I.e. with no extensions) at the time of this writing.

There is the View: Split Editor in Group command which was introduced in version 1.61, which you can access from the command palette, and is bound by default to ctrl/cmd+k,ctrl/cmd+shift+\, and also accessible from the context menu of the tab handle. It seems to only allow splitting horizontally, and only split the same text document.

There's a quite popular feature-request issue ticket covering what you're looking for (if I understand correctly): Allow to open two distinct editors side by side in one group #36700. You can give it a thumbs up reaction to show support for it and subscribe to it to get notified about discussion and progress. Please refrain from making noisy comments like "+1" / "bump".

In that discussion thread, someone wrote an extension that they claim provides a solution, which perhaps you could try out: agquick.workviews (I have no affiliation with that extension).

There's also a similar feature-request here that you might be interested in doing the same for: Tabs that group editor grid layouts (Vim-style tabs) #143024.

For your reference / learning purposes, I found the above issue tickets by googling "github vscode issues split inside tab".

starball
  • 20,030
  • 7
  • 43
  • 238