actboy168 / vscode-tasks

MIT License
37 stars 14 forks source link

filePattern能否根据活动文件的后缀触发隐藏 #19

Closed Sdator closed 4 years ago

Sdator commented 4 years ago

如:

// 使用正则匹配
"filePattern" : "*\.lua"
"filePattern" : "\.lua$"
//简单后缀匹配
"filePattern" : ".lua"
//多项后缀匹配
"filePattern" : ".lua ; .txt"

如果能直接支持正则就更好了。

actboy168 commented 4 years ago

我不明白你在说什么

Sdator commented 4 years ago

我不明白你在说什么

官方例子

"label": "Test",
"options": {
  "statusbar": {
    "filePattern" : "test_.*"
  }

在例子中 "filePattern" : "test_.*" 用于匹配前缀带有test_的文件,如果我想匹配后缀使用此语句 "filePattern" : "*.lua" 没有起作用,不知道是我写错了还是不支持此匹配方式。

actboy168 commented 4 years ago

filePattern使用的就是正则表达式,使用"filePattern" : "lua$"应该就能达到你想要的效果

Sdator commented 4 years ago

可以了,之前可能是我的配置文件出问题了。