Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable VSCode from remembering opened editors in the folder I opened before? [duplicate]

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.


2 Answers

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.

  1. Open the Command Palette by pressing F1.
  2. Type, "Open settings".
  3. When you see the options, select Open Settings (JSON).

After that, add the following option.

{
  "window.restoreWindows": "none"
}

This should prevent Visual Studio Code from opening the previous folder when launching the application.

like image 62
Viradex Avatar answered Oct 25 '25 23:10

Viradex


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

like image 36
Muhammad Bappi Avatar answered Oct 25 '25 23:10

Muhammad Bappi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!