Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code search across files (find in files) is not working

I am using Visual Studio Code 1.31.1 in MacOS 10.13.6. I open VSCode, I open a folder of text files, and I press command-option-F, or use Edit -> Find in Files. I search for a string that I know for sure exists in multiple text files in the open folder, and it says it can't find it.

Searching across files works if I have the folder open and have each and every single file open as a tab, which is rather pointless. Is there a way to search across files without actually having them all open as tabs?

I think it was because I opened a folder on Google Drive File Stream. It works fine on local files.

like image 511
Ray Avatar asked Mar 08 '19 12:03

Ray


People also ask

How do I search across files in VSCode?

Search across files# VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.

How do I search inside files in Visual Studio?

The new experience is available by searching for “Find in Files” or “Replace in Files” in Visual Studio search (Ctrl+Q by default). You can also get to these commands with Ctrl+Shift+F and Ctrl+Shift+H respectively.

How do I enable Find all references in Visual Studio code?

The Find All References command is available on the context (right-click) menu of the element you want to find references to. Or, if you are a keyboard user, press Shift + F12.

How do I search everywhere in Visual Studio?

Visual Studio 17.2 Preview 3 introduces a brand-new All-In-One search experience that merges the existing VS Search (Ctrl + Q) and Go To (Ctrl + T) to allow you to search both your code and Visual Studio features quicker and easier than ever, all in the same place.


1 Answers

In my case, this was caused by me accidentally toggling the "Search only in Open Editors" option.

enter image description here

like image 115
Jonathan Avatar answered Oct 14 '22 06:10

Jonathan