Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the global search in VSCode to work?

I encounter a question while I am using Visual Studio Code on Mac, I used to kill a process related to the search function on VS Code(Sorry I forgot the process name) because of the high CPU usage.

After that, I found that the global search does not work in VS Code any more, sometimes I really need this function to search file or open file in a quick way; I have searched many times but can not get the solution. So I go to here and asking for help.

When I use command + p to search file by name, the rate of process is always on loading, it can only list those files which I have opened, other files even they are matched by name will not be shown in list.

So I want to make search functions well as usual, how could I do?

like image 434
Mongoose Avatar asked Jul 11 '17 03:07

Mongoose


People also ask

How do you search globally in VS Code?

VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term.

How do I open global settings in VS Code?

To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings. On macOS - Code > Preferences > Settings.

How do I search for a word in an entire project in Visual Studio?

In Visual Studio 2022 and later, you can set Visual Studio to always keep results. Go to Tools > Options > General > Find and Replace, and select the checkbox for Keep search results by default.


1 Answers

If search is only searching on opened files, ensure this sneaky setting 'Search only in Open Editors' is not accidentally enabled.

enter image description here

like image 123
Trevor Daniels Avatar answered Sep 26 '22 15:09

Trevor Daniels