Home > OS >  How to disable VSCode from remembering opened editors in the folder I opened before?
How to disable VSCode from remembering opened editors in the folder I opened before?

Time:03-20

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.

CodePudding user response:

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.

CodePudding user response:

I just open vscode from my terminal, it's way faster and efficient in my opinion. Just browse to your wished folder and write "code ." in your terminal.

CodePudding user response:

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.stack.imgur.com/FLx4a.png
https://i.stack.imgur.com/TAuHT.png
https://i.stack.imgur.com/B8W5a.png

  • Related