Is it possible to create split editors inside individual tabs in VS Code?
Asked Answered
W

1

6

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

Wallraff answered 22/1, 2019 at 1:54 Comment(2)
Well I guess it' not possible then :(Wallraff
See https://mcmap.net/q/664633/-is-it-possible-to-have-one-tab-with-a-vertical-split-view-of-a-file-in-vscode-while-other-tabs-just-have-one-fileInstructor
C
2

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".

Covetous answered 6/7, 2023 at 5:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.