Is it anyway possible to open all files which found in my search query? Otherwise I need to double click 37 times for a single search result which seems suboptimal.
Example of search
VS Code provides two powerful commands to navigate in and across files with easy-to-use key bindings. Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it.
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.
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.
Go to File>Preferences>Setting and search for the Scrollback setting and increase the value to get the number of lines of output you want. This worked for me. Save this answer. Show activity on this post.
As stated in @Alex's comment, search.action.focusNextSearchResult
is a great match for @NealVDV's use case. It can be run by pressing F4
. It will open each result one after the other in a (writable) preview tab.
F4
(search.action.focusPreviousSearchResult
) cycles forward through the search resultsShift+F4
(search.action.focusPreviousSearchResult
) cycles backward through the search results@jakub.g makes the remark that modifying a file in a way that removes them from the search result will make the focusNextSearchResult
pointer restart from the beginning. A solution to this issue is to make sure that either:
There is this VS Code extension for that: Search - Open All Results
To install it, launch VS Code Quick Open (Ctrl+P) and run
ext install fabiospampinato.vscode-search-open-all-results
I'm not sure how to do this with a VSCode native tool, but you could do this using VSCode terminal to find the pattern that you're looking for and open all files that match your search pattern. Something like the following:
grep -l "<Icon" * | xargs code
xargs
to pass the output as the argument for code
.This way you won't have to double click all the files one-by-one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With