In Visual Studio Code I can split the view and see two areas of the same file side-by-side.
But then I seem to have two views from then on. Each side has a number of tabs to choose from. So I can switch between files in either half.
But what I actually want is to switch between that view with the two parts of one file, and other views that are plain old single views of any of the other files.
Is this also possible? It seems to be more what I was used to in other editors before I started using VSCode.
That functionality is currently being worked on in the Insiders' Build v1.61 - presumably in Stable early October, 2021.
It is currently limited to 2 views into the same file.
In the commands that follow or in the editor tabs' context menu: Split In Group and Join in Group. See Issue: Allow to split an editor into two without creating separate tabs. It is a little buggy right now though, but promising.
View: Split Active Editor in Group
workbench.action.splitEditorInGroup
View: Join Active Editor in Group
workbench.action.joinEditorInGroup

Whether the split is vertical or horizontal is controlled by this setting:

The border between the two views into the same file can be styled with this setting:
"workbench.colorCustomizations": {
"sideBySideEditor.border": "#0400ff"
}
See v1.61 release notes: splitting an editor
workbench.action.splitEditorInGroup
workbench.action.toggleSplitEditorInGroup
workbench.action.joinEditorInGroup
workbench.action.toggleSplitEditorInGroupLayout
A new setting workbench.editor.splitInGroupLayout allows to set the layout for splitting to be either vertical or horizontal.
A bunch of new commands allow to use this new feature via keybindings:
workbench.action.splitEditorInGroupworkbench.action.toggleSplitEditorInGroupworkbench.action.joinEditorInGroupworkbench.action.toggleSplitEditorInGroupLayoutIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With