VS Code - Search for text in all files in a directory

后端 未结 15 1025
深忆病人
深忆病人 2020-12-12 09:32

Is there a way to search for text in all files in a directory using VS Code?

I.e., if I type \"find this\" in my search, it will search through all the files in the

相关标签:
15条回答
  • 2020-12-12 10:23

    Select your folder, Press + + F Don't know about windows but this works for mac :)

    0 讨论(0)
  • 2020-12-12 10:24

    In order to search only in one folder, you have to click on it and press Alt + Shift + F.

    When you use Ctrl, VS Code looks in all project.

    0 讨论(0)
  • 2020-12-12 10:26

    What is NOT so obvious is that you can use the following pattern to recursively search

    ./src/**/*.html
    

    so perhaps leave the following as the default for most of your typical searches to remind that there is such a thing

    ./src/**/
    

    For example I was after an attribute for left-right justify/docking content, I could not remember except "start" so I did the following search which reveals to me "item-start"

    This fixed my layout to

    Instead of

    Here is where "item-sart" goes in the template.

    0 讨论(0)
提交回复
热议问题