禁用 VSCode 提示:“是否要保存工作区配置"? [英] Disable VSCode prompt: "Do you want to save your workspace configuration"?
问题描述
使用最新发布的 VSCode 版本,在撰写本文时(2018 年 1 月 29 日;版本 1.19.3),我看到以下行为(这对于我的需要来说是不必要的耗时):
Using the latest, released version of VSCode, at the time of this writing (2018-Jan-29; version 1.19.3), I see the following behavior (which is unnecessarily time-consuming, for my needs):
每当我尝试关闭从多个不同目录打开文件的窗口时,我都会收到以下提示:
Whenever I attempt to close a window that has files open from multiple, disparate directories, I get the following prompt:
是否要将工作区配置保存为文件?"
"Do you want to save your workspace configuration as a file?"
还提供了一组按钮,为我提供选项.
A set of buttons is also presented, offering me options.
屏幕截图:
如果我尝试关闭打开单个文件或单个目录的窗口,则不会出现此提示.
This prompt does not come up if I try to close a window with a single file being open, or a single directory.
以下是如何从操作系统命令提示符启动 VSCode 以重现此提示符的示例:
Here is an example of how to launch VSCode from an OS command prompt, to reproduce this prompt:
代码路径/to/DirectoryA path/to/DirectoryB
code path/to/DirectoryA path/to/DirectoryB
我很少想要或需要保存新的工作区.我宁愿这个提示永远不会出现.如果需要,我可以通过其他方式创建工作区.
I rarely want, or need, to save a new workspace. I would rather this prompt never appear. I am ok creating workspaces through other means, if and when necessary.
有没有办法通过 VSCode 中的一个或多个设置来禁用此提示?
Is there a way to disable this prompt via one or more setting(s) in VSCode?
推荐答案
我在创建 Untitled.code-workspace 文件时遇到了类似的问题,因为我只是关闭了笔记本电脑,却从未正确关闭 Vs 代码.我会手动删除它们,但是每当我将代码推送到分支时,Git 仍在以某种方式跟踪这些文件.
I was having similar issue Untitled.code-workspace file being created as I just close my laptop and never properly close Vs code. I would delete them manually but somehow Git was still tracking these files whenever I push my code to the branch.
在任何情况下,我们都希望停止为此目的生成这些文件,请执行以下步骤:
In any case we want to stop these files from being generated for that purpose follow the steps below:
转到代码->偏好 ->设置->在常用->文件:排除 ->添加图案 ->**/.code-workspace
这将禁用提示并且不会再次创建此类文件.
that would disable the prompt and no such files would be created again.
#disable-vscode-prompt #untitled.code-workspace #disable #autosave #vscode-workspace-disable #workspace #vscode-workspace
#disable-vscode-prompt #untitled.code-workspace #disable #autosave #vscode-workspace-disable #workspace #vscode-workspace
这篇关于禁用 VSCode 提示:“是否要保存工作区配置"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!