Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow additional fuzzy search within files found via CTRL+P #39542

Closed
smuuf opened this issue Dec 4, 2017 · 8 comments
Closed

Allow additional fuzzy search within files found via CTRL+P #39542

smuuf opened this issue Dec 4, 2017 · 8 comments
Labels
feature-request Request for new features or functionality quick-pick Quick-pick widget issues

Comments

@smuuf
Copy link

smuuf commented Dec 4, 2017

  • VSCode Version: 1.18.1
  • Feature request

How about allowing users to fine-tune their fuzzy searching within a project/workspace? This could be done by treating the : character (which AFAIK is not an allowed character in Windows and Unix filenames) as a separator.

Format: <fuzzy matching file paths>:<fuzzy matching text inside found files>
Examples/use cases:

  • function:getnode - Find files with path fuzzy-matching the string function that also contain lines that fuzzy-match string getnode.
  • controller:action - Same logic. Could be used for example to trivially find all controllers that define at least one action (yes, possibly with some false positives).

Example

Current behaviour

  1. ctrl+p, enter function
  2. Search would find these files: image

Proposed behaviour

  1. ctrl+p, enter function:getnode
  2. Seach would return these files: image

And would find only these two files, because contents of the files ...

  • ...\nikic\php-parser\lib\PhpParser\Builder\Function_.php
  • ...\nikic\php-parser\lib\PhpParser\Node\Stmt\Function_.php

... match getnode "fuzzily":

  1. First one contains a line with "getSubNodeNames" and
  2. Second file contains just "getNode"
@vscodebot vscodebot bot added the search Search widget and operation issues label Dec 4, 2017
@roblourens roblourens added feature-request Request for new features or functionality and removed search Search widget and operation issues labels Dec 4, 2017
@roblourens roblourens assigned bpasero and unassigned roblourens Dec 4, 2017
@bpasero bpasero added the quick-pick Quick-pick widget issues label Dec 5, 2017
@bpasero bpasero removed their assignment Dec 5, 2017
@bpasero bpasero changed the title Feature request: Allow additional fuzzy search within files found via CTRL+P Allow additional fuzzy search within files found via CTRL+P Dec 5, 2017
@smuuf
Copy link
Author

smuuf commented Dec 15, 2017

Maybe it would be better for the separator to be #, as that's what Sublime Text uses for the same functionality, AFAIK.

@brandondrew
Copy link

I don't know ultimately whether : is better or # is better, but I definitely find : much easier to type, and I don't think that compatibility with Sublime is important. The key could be configurable for those users who care about consistency with Sublime, but the default should be chosen to:

  1. not conflict with characters that will be needed as part of a file name
  2. be convenient and easy to type

with criteria number 1 being far more important.

@brandondrew
Copy link

brandondrew commented May 2, 2018

The user could also have to type a modified key, such as ⌘; to avoid possible conflicts with file names (where that key combination is given simply to explain what I mean by "modified key" rather than as a specific suggestion).

@smuuf
Copy link
Author

smuuf commented May 3, 2018

My favourite choice would be the : character, too.

@syntaxseed
Copy link

This would be great. An awesome feature that exists in SublimeText.

@roblourens
Copy link
Member

roblourens commented Sep 9, 2018

I don't think Sublime has this feature? They use foo:100 for "line 100 in a file with foo in the path", vscode supports this syntax too. Since we are already using that syntax for something I don't think we can support this feature as originally requested...

@roblourens roblourens added the *out-of-scope Posted issue is not in scope of VS Code label Sep 9, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 9, 2018

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. 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!

@vscodebot vscodebot bot closed this as completed Sep 9, 2018
@roblourens roblourens removed the *out-of-scope Posted issue is not in scope of VS Code label Sep 9, 2018
@roblourens
Copy link
Member

Never mind, I do see it with #

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality quick-pick Quick-pick widget issues
Projects
None yet
Development

No branches or pull requests

5 participants