How to search for just a specific file type in Visual Studio code?

前端 未结 2 893
甜味超标
甜味超标 2021-01-31 01:28

In Visual Studio code, how do I search for just a specific file type (i.e. *.css or *.ts)?

PS: I\'m talking about the global search (Ctrl+Shif

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 02:24

    You can do this.

    ./src/app/**/*.ts
    

    other glob syntax

    • * to match one or more characters in a path segment
    • ? to match on one character in a path segment
    • ** to match any number of path segments, including none
    • {} to group conditions (for example {**/*.html,**/*.txt} matches all HTML and text files)
    • [] to declare a range of characters to match (example.[0-9] to match on example.0, example.1, …)

提交回复
热议问题