Vscode: Allow quick open to filter on folder names by typing folder name after the file

Created on 11 Jul 2017  路  9Comments  路  Source: microsoft/vscode

Quick Open (using Command P) is a great tool. However, if you are in a framework like Rails, you'll often have files that are named the same across many different folders, particularly for views. You may have 10s or 100s of index.html.haml or index.json.jbuilder files. Being able to narrow down the file is practically impossible with VSCode without the ability to also narrow down the folder, which provides a more descriptive name.

It would be great to have Quick Open use the filter to search the names of folders to help narrow down the list and find the file quickly.

feature-request on-testplan quick-pick search

Most helpful comment

I think that directories should be treated as first-class citizens on the quick open. As the requester of this feature, first I think on the file name, then on the folder name. Having to add the folder as a prefix is not practical, and it is not even fuzzy, you need to make a perfect match. Emacs has this feature and it is just wonderful.
To give you an example, to narrow down to a file on core/api/assignments/edit.js I want to be able to write edt assapi

All 9 comments

@enozero you can type the folder name (before the file name) and it should narrow down, does that not work for you?

Ah... interesting. I hadn't ever thought to try the folder before the filename in the quick open tool. My mind automatically thinks of the file name then to narrow down the search from there once I see that the search has too many listings and that I can just keep typing to narrow down the search. Is there a way to allow searching the folder names after the file name? If not, that would be a fantastic addition.

I think it is the filter for files and folders in explorer pane kinda like we have it in Xcode's project navigator.

screen shot 2017-08-03 at 12 37 39 pm

What about treating : as a special character that begins to apply an additional fuzzy filter against the existing results for any additional characters? so you type inhtm then you see that there are 100 index.html.haml files and you realise you need to filter on directory as well. You could then type :foo to filter the existing results and push foo/index.html.haml to the top of the result list?

You can probably achieve the same thing now by jumping the cursor back to the beginning of the quick open input field, but this might be a bit quicker to type (and you could then even apply further filters again).

miss this feature so bad

xcode files filter is very useful, it will show some files always listed in sidebar, but in vscode must Command P everytime when i want to open some files
image

This feature definitely super useful. But, I bet this features will be added after ten years.

I think that directories should be treated as first-class citizens on the quick open. As the requester of this feature, first I think on the file name, then on the folder name. Having to add the folder as a prefix is not practical, and it is not even fuzzy, you need to make a perfect match. Emacs has this feature and it is just wonderful.
To give you an example, to narrow down to a file on core/api/assignments/edit.js I want to be able to write edt assapi

Pushed a change so that quick open now runs a search over each segment of the input that is separated by space. This allows to further narrow down the results based on additional values. These additional values can either match on the label or description part and their scores will add up for each match:

Kapture 2020-03-27 at 11 23 48

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DovydasNavickas picture DovydasNavickas  路  3Comments

chrisdias picture chrisdias  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

biij5698 picture biij5698  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments