visual-studio-code - 如何排除多根工作区文件夹之一中的所有文件以在 Visual Studio 代码中搜索?
问题描述
我设置了一个多根工作区,其中四个文件夹中有两个是外部的,因此我无法向该文件夹添加特定设置。我想禁用对这些文件夹的搜索,最好是在工作区设置中。
我找不到合适的模式来完成这项工作:(
以下是我的工作区设置,我正在尝试过滤 out 文件夹中的文件:
"folders": [
{
"name": "Application"
"path": "./application"
},
{
"name": "Device"
"path": "./device"
},
{
"name": "Out"
"path": "./out"
}],
"settings": {
// Configure glob patterns for excluding files and folders in searches. Inherits all glob patterns from the files.exclude setting.
"search.exclude": {
"out": true,
"**/tests": true,
".tags": true
},
解决方案
正如https://stackoverflow.com/a/33418660/6225923中所建议的,您可以使用工作区设置并为要排除的文件夹添加模式,如下所示:
"search.excludeFolders": [
"folder1",
"folder2",
"folder3",
"path/to/other/folder4"
],
此外,确保搜索排除仍然处于活动状态是设置。
推荐阅读
- c++ - 为什么我的链表实现不起作用?
- flutter - 如何创建一个具有 2 种颜色的 Flutter 扁平按钮?非渐变,2 纯色并排
- linux-kernel - radeon(hd 7450)在Linux内核中的中断处理程序在哪里?
- google-cloud-platform - 同一个 GCP 项目中的 Kubeflow 管道存储访问错误?
- java - 我们如何将方向向量转换为角度?
- elasticsearch - 如何在elasticsearch中将字符附加到字符串?
- python - 如何将数据帧中的值添加到另一个数据帧以获得正确的索引?
- python - 将多列中的行移动到它们自己的列中Python
- xamarin.forms - OxyPlot.Xamarin.Forms 1.0.0 并支持 NETStandard 版本 2.0
- mongodb - 尝试为 mongodb 指定数据库路径