I'm trying to set up VS Code such that when the program is just opened (not via the context menu for a file or clicking on a file) a new blank text file is open and ready to start typing in - similar to when Notepad++ is opened - or most other text editors, for that matter.
Searching for "VS Code open with new file" and many variants only brings me to articles/posts about opening a new file in a new tab or window. That's not what I'm trying to do.
File > Preferences > Settings
Search for startupEditor
Change
"workbench.startupEditor": "welcomePage"
to
"workbench.startupEditor": "newUntitledFile"
or select newUntitledFile
from dropdown
In File > Preferences > Settings there is the following option listed under the Window section:
// Controls how windows are being reopened after a restart. Select 'none' to always start with an empty workspace, 'one' to reopen the last window you worked on, 'folders' to reopen all windows that had folders opened or 'all' to reopen all windows of your last session. "window.restoreWindows": "none",
Using the editor in the right pane you can add: "window.restoreWindows": "none"
Which will open an empty workspace with a link that says "new file". It's not exactly the solution you're looking for but it's the closest one I'm aware of.
If 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