Visual Studio Code 永远不会重新打开以前的文件或文件夹 [英] Visual Studio Code never reopens previous file or folder
问题描述
我有这个问题的完全相反的问题:VisualStudio Code 总是重新打开以前的文件或文件夹
I have the exact opposite Problem of this question: Visual Studio Code always reopens previous file or folder
VSCode 似乎永远不会记住我以前打开的文件,并且总是从一个空窗口开始.我检查了,如果我的快捷方式意外具有参数-n"(这会强制执行此行为),但它不存在.
VSCode never seems to remembery my previously opened files and does always start with an empty window. I checked, if my Shortcut has the Parameter "-n" by accident (which would force this behaviour), but it's not there.
有没有办法强制 VSCode 记住打开的文件和文件夹?
Is there a way to force VSCode to remember opened files and folders?
推荐答案
看来,如果您还打开了一个文件夹,VsCode 只会记住打开的文件.没关系,如果这只是您驱动器上某处的一个虚拟文件夹 - 如果您打开该文件夹外的文件,它们也会被记住.
It seems, VsCode only remembers opened files, if you also have a folder opened.
It doesn't matter, if this is just a Dummy Folder somewhere on your drive - if you open files outside of this folder, they will be remembered aswell.
我不确定这是设计的那样,还是错误.
I'm not sure if this is as designed, or a bug.
这是一个错误并在此处跟踪
编辑 2:总结下面的答案,现在有两个关于这个问题的设置:
Edit 2: To sum up the answers from below there are now two settings concerning this issue:
热退出已实施,恢复在 VS Code 关闭之前未保存的文件.要更改此设置,请使用此设置:
Hot exit has been implemented, which restores files which weren't saved before VS Code is closed. To change this, use this setting:
files.hotExit: "onExit"
要重新打开所有文件,请使用此设置:
To reopen all files, use this setting:
window.restoreWindows: "all"
但是在这里发现的问题仍然存在.
But there is still on open issue with this found here.
...
这篇关于Visual Studio Code 永远不会重新打开以前的文件或文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!