Vscode: Provide an option to set default editor group layout

Created on 24 Aug 2017  路  6Comments  路  Source: microsoft/vscode

I'd like to change the default editor group layout from vertical to horizontal.

Without that option, whenever I open a new project, I have to change the editor group layout before I split.

Is this doable through extension?

Thank you!

feature-request layout on-testplan

Most helpful comment

I wrote a custom extension to hack this one.

Code APIs don't tell us whether the current editor group is horizontal or vertical. So I don't have this information for the extension to decide whether to execute the toggle command.

So, what I did instead is I registered my extension to be activated upon startup, and toggle the layout at that time. Also, store a flag in workspaceStorage to remember that the layout was toggled, so that when the same workspace is opened the next time, my extension would not attempt to toggle the layout again.

Seems to be working so far... 馃榿

(P.S. happy to publish this extension if anyone else is interested)

All 6 comments

It would be nice to have the setting by language mode. For SQL split vertically, for rest horizontally.

I don't have the answer but understand that it complicates things if you have multiple files types open at the same time.

I wrote a custom extension to hack this one.

Code APIs don't tell us whether the current editor group is horizontal or vertical. So I don't have this information for the extension to decide whether to execute the toggle command.

So, what I did instead is I registered my extension to be activated upon startup, and toggle the layout at that time. Also, store a flag in workspaceStorage to remember that the layout was toggled, so that when the same workspace is opened the next time, my extension would not attempt to toggle the layout again.

Seems to be working so far... 馃榿

(P.S. happy to publish this extension if anyone else is interested)

Surely this should just be an option in the global config - to set a default split? As far as I can tell it doesn't even seem to be saved with the project variables?

Love VS Code, but the inability to set default for so ubiquitous a setting is sad.
I often open a new window to view other parts of the same file on my small computer screens.
The setting in parent window doesn't even carry over to the new windows open in the same session.

This is extremely important for people like me who use their coding monitor rotated by 90 degrees. I pretty much never wants it to be horizontal split yet whenever I open a new project that is what I get

This landed as part of https://github.com/Microsoft/vscode/issues/14909#issuecomment-393870565

A new setting workbench.editor.openSideBySideDirection: right | down can be used to define how the workbench should split editors when a request is made to open an editor to the side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

biij5698 picture biij5698  路  3Comments

sirius1024 picture sirius1024  路  3Comments

curtw picture curtw  路  3Comments

mrkiley picture mrkiley  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments