microsoft / microsoft/vscode

Remember VS Code Layout Size When Switching Between Different Screen Sizes

Open
#333,932 0 comments 0 reactions 1 assignee Claimed by @benibenj View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

When using VS Code across monitors with different screen sizes, the sidebar/editor layout ratio is reset instead of being remembered.

For example:

On a large monitor, I usually configure the layout around 30% sidebar / 70% code editor.
When I drag the VS Code tab/window to a laptop screen, the layout changes to around 15% sidebar / 85% code editor because of the smaller screen.
When I move it back to the large monitor, VS Code keeps the 15/85 layout instead of restoring the previously configured 30/70 layout.

This means I have to manually resize the sidebar every time I switch between screens.

### Expected Behavior

VS Code should remember the layout size/proportion for different screen sizes or display configurations.

For example:

Large Monitor
Sidebar: 30%
Editor: 70%

↓ Move to laptop

Laptop
Sidebar: 15%
Editor: 85%

↓ Move back to large monitor

Large Monitor
Sidebar: 30%
Editor: 70% ← Restore previous layout

Ideally, VS Code could remember the sidebar/editor dimensions or ratio based on the display/window configuration and restore them when returning to that screen.

### Actual Behavior

The layout appears to use the most recently applied/default proportion. After moving back to the larger monitor, the sidebar remains at approximately 15%, rather than returning to the previously configured 30%.

Why This Would Be Useful

For developers who frequently switch between a laptop and an external monitor, this would reduce repetitive UI adjustments and make the workspace feel much more consistent.

A per-display or per-window layout memory would be especially useful for users with significantly different screen resolutions.

### Suggested Improvement

Consider storing the user's panel/sidebar dimensions per display or screen configuration, for example:

Display resolution
Window size
Display ID/configuration
Sidebar width or percentage
Other relevant editor layout dimensions

When the window moves back to a previously used display/configuration, VS Code could restore the corresponding layout automatically.

Environment
VS Code: [1.135.0]
OS: [Windows-11]
Displays: External large monitor + laptop display
Summary

Please consider adding persistent/per-display layout sizing so VS Code can remember the user's preferred sidebar/editor ratio when switching between screens.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.