Vscode can start with a blank file #223
DebeeArmstrong
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Making VSCode Behave like Many Other Editors
In his March workshop, Jeff said you could adjust a setting that would ensure VSCode would open a blank file at startup and not open windows with files you'd previously edited.
I find this behavior annoying because I often open some text file with a different editor and that confuses VSCode. So I asked copilot for help.
The answer, that works, is below:
Copilot Response
You’re looking for the startup behavior settings in VS Code. The specific setting that controls whether VS Code opens a blank file instead of restoring your last session is
workbench.startupEditor, and optionallywindow.restoreWindowsif you want to prevent reopening previous files entirely.✅ The exact setting you want
Set:
workbench.startupEditor:"newUntitledFile"This forces VS Code to open with a fresh blank file. [Stack Overflow](https://stackoverflow.com/questions/51310743/how-can-i-make-vs-code-open-with-a-blank-text-editor-tab)
Optional (if VS Code still restores old files):
window.restoreWindows:"none"This prevents VS Code from reopening previous windows or files. [Stack Overflow](https://stackoverflow.com/questions/51310743/how-can-i-make-vs-code-open-with-a-blank-text-editor-tab)
🔧 Where to find it in the UI
📝 settings.json version
If you prefer editing JSON directly:
{ "workbench.startupEditor": "newUntitledFile", "window.restoreWindows": "none" }Want to tweak anything else about VS Code startup?
You can explore options like startup behavior, window restore settings, or untitled file settings.
Beta Was this translation helpful? Give feedback.
All reactions