Visual studio code Visual Studio代码要包含的文件中的高级搜索通配符
我正试图找到一行代码,以符合特定的文件名标准。我试图利用Visual Studio代码的高级搜索,在文件中添加一个通配符,以包含搜索的字段。但我没能做到这一点。我尝试使用星号(*)符号,但我认为Visual Studio代码不接受这一点。因此,我尝试在互联网上搜索,并使用?;然而,它仍然一事无成Visual studio code Visual Studio代码要包含的文件中的高级搜索通配符,visual-studio-code,glob,Visual Studio Code,Glob,我正试图找到一行代码,以符合特定的文件名标准。我试图利用Visual Studio代码的高级搜索,在文件中添加一个通配符,以包含搜索的字段。但我没能做到这一点。我尝试使用星号(*)符号,但我认为Visual Studio代码不接受这一点。因此,我尝试在互联网上搜索,并使用?;然而,它仍然一事无成 搜索关键字:ICustomMatColumn 要包括的文件:(通配符)viewmodel.ts 因此,我发现当您将较高级别的文件夹名称作为标准放入文件中时,星号(*)起作用 格式将为higherLeve
搜索关键字
:ICustomMatColumn
要包括的文件
:(通配符)viewmodel.ts
因此,我发现当您将较高级别的文件夹名称作为标准放入文件中时,星号(*)起作用 格式将为higherLevelFolderName* 例如: 文件夹结构:
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
假设每个ViewModel文件都有以下单词/代码/字符串ICustomMatColumn
搜索关键字:ICustomMatColumn
要包括的文件:app*
搜索结果:
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
但是此解决方案的缺点是,如果您的搜索条件出现在另一个文件中,它将包含在搜索结果中。显然,Visual Studio代码支持
全局语法
,这非常好。要在问题中获得所需的结果,只需执行以下格式
./***|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
假设每个ViewModel文件都有以下单词/代码/字符串ICustomMatColumn
搜索关键字:ICustomMatColumn
要包括的文件:./***ViewModel.ts
搜索结果:
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
|-- app
|-- users
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- cars
|-- list.ts|html|css|viewmodel
|-- form.ts|html|css|viewmodel
|-- configurator.ts|html|css|viewmodel
|-- app.component.ts|html|css
|-- app.module.ts
|-- user.service.ts
|-- car.service.ts
|-- index.html
|-- main.ts
|-- style.css
|-- app
|-- users
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- cars
|-- list.ts|viewmodel
|-- form.ts|viewmodel
|-- configurator.ts|viewmodel
它将严格地只包含您在“要包含的文件”字段中输入的具有partialFileName的文件,这非常有用。