简体   繁体   English

如何在vscode中重新打开上次打开的文件

[英]How to reopen last opened file in vscode

If i close the vscode editor after saving a file and reopen the editor again, the session is not restored.如果我在保存文件后关闭 vscode 编辑器并再次重新打开编辑器,会话不会恢复。 I am unable to find the file in open recent.我无法在最近打开的文件中找到该文件。 The only way how can I open the file is navigating to the directory in open menu.如何打开文件的唯一方法是导航到open菜单中的目录。 Thats very annoying is it some problem with my editor or default behaviour?这很烦人是我的编辑器或默认行为有问题吗?

You must have a folder opened to restore previously opened files.您必须打开一个文件夹才能恢复以前打开的文件。

  • Go to 'File' menu转到“文件”菜单
  • Open folder打开文件夹
  • Select a folder (my documents for example)选择一个文件夹(例如我的文档)

Now open any files, close vscode and re-open.现在打开任何文件,关闭 vscode 并重新打开。 Your files are still in the editor.您的文件仍在编辑器中。

"window.restoreWindows": "all"都可以;)

The complete settings are完整的设置是

"window.restoreWindows": "all",
"files.hotExit":"onExitAndWindowClose",

Note that with:请注意,与:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 ftp-simple 在 VSCode 中重新打开 FTP 项目,而无需再次下载每个文件信息 - How to reopen an FTP project in VSCode with ftp-simple without the need to download every file info again 在 VSCode 中打开“.sql”文件时如何隐藏突出显示的行 - How to hide the highlighted lines when the “.sql” file are opened in VSCode 如何禁用 VSCode 的资源管理器打开文件的打开目录? - How to disable VSCode's Explorer opening directory of opened file? VSCode仅对打开的文件显示TSLint错误 - VSCode shows TSLint errors only for opened file vscode 命令行:打开已打开项目的文件 - vscode command line : open a file of an opened project vscode 在文件侧边栏中查找打开的文件 - vscode find opened file in files sidebar 当通过导航选项卡打开文件时,如何在 VSCode Explorer 面板中禁用文件自动聚焦? - How to disable file auto-focus in VSCode Explorer panel when file is opened by navigating tabs? vscode 总是在启动时打开欢迎屏幕,而不是最后打开的文件夹 - vscode always opens welcome screen on startup instead of last opened folder 如何更改在 VSCode 中默认打开的文件夹? - How to change folder that opened by default in VSCode? 在文件资源管理器中指定(区分).c 和 .h 文件图标,它们使用 vscode 打开 - specify(distinguish) .c and .h file icon in file explorer and they opened with vscode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM