john c. j.
john c. j.

Reputation: 1185

Keep opened files between close and reopen

If I open some single file (without creating any project), and then close and reopen VS Code, the file will be restored. Okay, that's what I want.

But, if I open some file, then close VS Code, and then open another single file, the first file will not be reopened.

Is there way to fix it? Probably, some changes in "User Settings" (?).

I've already tried

"window.restoreWindows": "all"

but it doesn't help.

enter image description here

Upvotes: 3

Views: 1810

Answers (3)

ax.
ax.

Reputation: 60167

A new setting preserve for window.restoreWindows has been introduced (#15949) in version 1.52 November 2020. This should do just what you want.

Upvotes: 1

Nirav Bhoi
Nirav Bhoi

Reputation: 659

Go to Settings > Window > In Restore Windows section set it to > all

That's it. There are other options you can find your best.

I am using visual studio code Version 1.27 on linux.

Upvotes: 0

Gama11
Gama11

Reputation: 34148

I think this is the same issue as described in the following feature request:

Keep previously opened files when opening a single file instead of clearing all files (#14675)

Which means that no, this is not possible at the moment.

Upvotes: 2

Related Questions