After I use VSCode to open a folder and some editors for the files, I close the folder. When I close and reopen the folder, VSCode opens the editors I opened last time.
How to prevent VSCode from reopening the editors I opened last time?
I have already set "window.restoreWindows": "none". When I exit directly from VSCode, it won't restore windows. I am saying when I reopen a folder, the editors I opened last time before I close the folder, will still be opened.
To stop Visual Studio Code from opening your previous folder all the time, then you have to edit settings.json.
To achieve this, open the settings.json. Do this by following the steps below.
F1.After that, add the following option.
{
"window.restoreWindows": "none"
}
This should prevent Visual Studio Code from opening the previous folder when launching the application.
Follow this process
Open VS Code, goto file>preferences>settings.
search for restore Window or click on Window tab then find restore window .select none from selection.
https://i.sstatic.net/FLx4a.png
https://i.sstatic.net/TAuHT.png
https://i.sstatic.net/B8W5a.png
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