时如何打开默认工作区

时如何打开默认工作区

本文介绍了启动 Visual Studio Code 时如何打开默认工作区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

软件:Visual Studio Code

Software : Visual Studio Code

操作系统:macOS 10.14

OS : macOS 10.14

版本:1.28.2 (1.28.2)

Version : 1.28.2 (1.28.2)

我有一个每次使用 VSC 都会处理的文件夹,没有其他要求.我想在启动 VSC 时默认将此文件夹作为文件夹/工作区打开,这样我就不必再次浏览和打开该工作区.如何更改设置/编写脚本,以便在启动 VSC 时自动打开该工作区.

I have a folder that I work on every time with VSC, no other requirements.I want to open this folder as a folder/workspace by default on launch of VSC so that I don't have to browse through and open that workspace again.How can I change settings/ write a script so that when I launch VSC, that workspace opens up automatically.

推荐答案

设置设置

"files.hotExit": "onExitAndWindowClose"
"window.restoreWindows": "folders"

请注意,如果您通过资源管理器中的文件启动 VSC,它将不会在您当前的工作区中打开该文件并且工作区信息将丢失(您必须在保存时再次手动打开工作区)

Note if you launch VSC by a file in explorer, it will not open the file in your current workspace and the workspace information will be lost (you'll have to open the workspace manually again on saving)

这篇关于启动 Visual Studio Code 时如何打开默认工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 03:31