20

I'm asking for a method similar to Ctrl+P but that searchs in all workspace (but not in ignored foldres like node_modules or .git folders).

Ctrl+P searchs in recent opened list.

I am searching some way to type a file name (in a quick search way) and search files in all folders of the workspace (ignoring ignored folders).

Search by file name not by content.

  • What about (1) Menu Edit, Find in Files (Ctrl+Shift+F) to search the Currently open Folder, or (2) Go to Explorer (Ctrl+Shift+E), right click the folder and select "Find in folder". – harrymc Oct 14 '18 at 13:17
  • "Find in Files" search a text in the content of the files. I am looking for a way to search files by file name. I will edit the question to be more accurate. – Emilio Platzer Oct 14 '18 at 13:39
  • I don't know how to search only for a file-name in Visual Studio Code. Why don't you use a product that excels in such searches like Everything. – harrymc Oct 14 '18 at 13:50
  • The problem of using a general product (like TotalCommander) is that it doesn't knows about VSC configurations (i.e. excluded folders). Ctrl P exists (search file names in recent file opened), then the existence of a search in the whole workspace or project sounds possible (and it will be more comfortable). – Emilio Platzer Oct 14 '18 at 14:55
  • I'm not sure you will get many hits in the excluded folders, and you can also exclude them in Everything. – harrymc Oct 14 '18 at 16:16
26

short answer

Ctrl+P is the way for search file names in the current workspace or project.

but

  • recently opened files are shown above.
  • the quick search found files recently opened and files that are in the workspace or project but are not ignored
  • ignored files may be ruled by .gitignore if in settings.json "search.useIgnoreFiles" is true.

That means that sometimes ignored files are found and sometimes not.

the solution to the question

  1. Change settings.json and set "search.useIgnoreFiles": false.
  2. Use Ctrl+P to search.

refs:

-1

"search.useIgnoreFiles": false

What I found in VSC: There do not exists any real working "search file in folder explorer" !!

It works only advanced "Recently opened". It means: What you create, move inside VSC you can see in "search" result. But if you move, create something outside VSC you actually, won't see it in "search" result, like never existed.

Prove: You cant't "search" anything what was installed like libraries before you browse it physically in in vsc file explorer...


You can run into problems if you don't know how this feature work. It could cause problems, with the behavior of App, if there is file or not!

Also answers there are pretending search should be marked as dangerous, deprecated...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.