Visual Studio Code files.exclude 设置不起作用 [英] Visual Studio Code files.exclude setting not working
问题描述
我正在使用 Unity 并尝试从文件资源管理器侧栏中排除 .meta 文件.我导航到文件->首选项->用户设置(或工作区设置,无所谓),并将文件内容设置为以下内容:
I am using Unity and trying to exclude .meta files from the file explorer sidebar. I navigated to File->Preferences->User Settings (or Workspace settings, doesn't matter), and set the contents of the file to the following:
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.meta": true
}
}
...并保存了我的更改.然而,当我单击刷新图标或关闭/重新打开我的文件夹视图时,我仍然看到左窗格中显示的所有 .meta 文件.我在这里做错了吗?
...and saved my changes. Yet, when I click the Refresh icon or close/reopen my folder view, I am still seeing all the .meta files showing up in the left pane. Am I doing something wrong here?
推荐答案
我的问题是将我的模式建立在现有模式的基础上,它排除了特定的文件名而不是模式.我只需要在文件扩展名前添加一个星号,即
My problem was basing my pattern off of the existing ones, which excluded specific file names rather than patterns. I simply needed to add an asterisk before the file extension, i.e.
"**/*.meta"
代替
"**/.meta"
这篇关于Visual Studio Code files.exclude 设置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!