Sublime text 2 find in folder with file extension

前端 未结 3 1332
长发绾君心
长发绾君心 2020-12-13 13:30

How do I search in a folder in sublime text 2 with file extension?

My where when I use:

*.js

searches globally for all js files.

3条回答
  •  一生所求
    2020-12-13 13:44

    Instead of this:

    /project/*.js
    

    Try using this:

    project .js
    

    This should match files which have project in the path and have a .js extension

    EDIT: The above assumes you're trying to find all the files with .js extension using the Goto Anything feature in Sublime Text.

    In case you'd like to search within .js files located within a directory, you can add an Include Filter in the search path:

    /project,*.js
    

    This will search for the text you've entered, limiting the scope to files within /project and it's sub-directories having the extension .js.

    Reference: Sublime Text Docs - Search Scope

    EDIT 2: For Sublime Text 3, refer Simons answer below.

提交回复
热议问题