[英]How to show certain files in Visual Studio Code
I wish to hide .js file & .map file extensions, but to display some .js files that are important to my project. 我希望隐藏.js文件和.map文件扩展名,但要显示一些对我的项目很重要的.js文件。 When I use the following to hide:
当我使用以下内容隐藏时:
{
"files.exclude": {
"**/*.js": true,
"**/*.js.map": true
}
}
Everything gets hidden. 一切都被隐藏了。 How can I display specific files while the rest are hidden?
隐藏其余文件时如何显示特定文件?
You probably want to hide .js
files only when there is a .ts
file with the same name, so you need to add condition: 您可能只想在具有相同名称的
.ts
文件时隐藏.js
文件,因此您需要添加条件:
{
"files.exclude": {
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map": true
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.