1

There are several hundred files in the workspace and I would like to perform a search within specific files. For example,

Find "Hello world" in the files starting with these three letters "mkr*"

Is there a way to accomplish this kind of search in the VS Code?

Thanks.

2 Answers 2

5
  1. Open search (Mac: command+shift+f, Windows/Linux: ctrl+shift+f).
  2. Toggle search details (Mac: command+shift+j, Windows/Linux: ctrl+shift+j).
  3. In the "search" input, enter the keywords. In this case, Hello world.
  4. In the "files to include" input, add the pattern. In this case, */mkr*.*.
Sign up to request clarification or add additional context in comments.

2 Comments

Took me a while to activate the "files to include" box. Turns out I had to click on the ... button first show this box. Thanks!
No problem! Yeah, that's actually the icon for toggling the search details (step 2 in my answer, if you prefer keyboard shortcuts).
2

Click '...' and it will shows file to include and files to exclude.

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.