Vscode: Have search match include filename

Created on 19 Aug 2018  路  10Comments  路  Source: microsoft/vscode

I'd like the text search feature to also match the filename, e.g. I am searching for "changelog" but a file called "changelog" does not show up unless it has the words "changelog" appearing within it. I find this counter-intuitive and confusing. I think the default should be to match words in the file contents and filename

*out-of-scope feature-request search under-discussion

Most helpful comment

I'd love VSCode to include filenames in the search. Even if it would only be an optional thing I could enable. Thanks @tansaku for bringing this up.

All 10 comments

I disagree. Quickopen searches file names, text search searches file contents. I think these are very different workflows.

@roblourens sorry to hear you disagree - personally they are identical workflows to me ... if I'm looking for, say a changelog, I want to see a file called that or anything that mentions it, i.e. that's a single workflow.

Even if one wanted to separate the two workflows, including filenames could still be an option on the search, and there could be a user setting to make it default include or not - then vscode would support my workflow and yours and others - sounds great doesn't it?

Why not leave the issue open to increase the chances that others might chime in with information on their preferred workflow rather than just limiting the discussion to covering yours and mine ...

I'd love VSCode to include filenames in the search. Even if it would only be an optional thing I could enable. Thanks @tansaku for bringing this up.

Me too, actually filed a feature request without noticing this thread. I don't know any other way to search for files in VSCode, I just don't. I figured they would be under 'search' but no, if there is a way I would like to know, and would suggest to make it more visible, or if possible, including it within the search panel

Quick open (ctrl+p/cmd+p) searches files

Nice! Any way of leaving that bar there? Not fond of shortcuts, but will do for now, thanks

I'm also missing this. Ideally I also would like it if I could do a filename-only search by leaving the main search field empty but filling the "files to include" field.
EDIT: Nevermind, the new filter feature in the current insider has all I need!

Here is a use-case: when replacing the name of a function/variable in the entire app often there are also templates (someFunction.html) that should also be changed... In this case it would be ideal to replace a string in both the text and the filenames.

This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

No one in this thread introduced the notion of a user-configurable setting to allow this. That would be a nice way to handle this; no need for it to be all-or-nothing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trstringer picture trstringer  路  3Comments

vsccarl picture vsccarl  路  3Comments

sirius1024 picture sirius1024  路  3Comments

lukehoban picture lukehoban  路  3Comments

chrisdias picture chrisdias  路  3Comments