How to search only in currently open files in vscode?
For me somehow it works just by typing ./
in the files to exclude field.
"Search: target particular set of files #20530" located here: https://github.com/Microsoft/vscode/issues/20530
Is tracking a search "scope" such as "all open files".
As of v1.55 this will be enabled by default - the icon will always appear, you do not need to enable the setting mentioned below.
The v1.55 pre-release notes mention a "checkbox", but it isn't in Insiders Build so I think they mean the icon.
This is in the Stable Build v1.53 behind an experimental "flag":
Search > Experimental: Search in Open Editors
It is enabled by default in the Insiders' Build but requires a reload to take effect - so that the relevant option icon will appear. It is not enabled by default in the Stable Build (also requires a reload after enabling).
v1.53 Release Notes:
This release comes with experimental support for searching in open editors, which has been a highly requested feature for some time. This feature is enabled by default in Insiders, and can be enabled with the
search.experimental.searchInOpenEditors
setting in Stable.
See demo:
As you can see, the icon is at the end of the files to include
input so you will have to have that showing (click the three dots ...
just below the search options if files to include
is not already showing).