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 fuzzy result on searching symbol in file #62435

Closed
eypsum opened this issue Nov 2, 2018 · 3 comments
Closed

Allow fuzzy result on searching symbol in file #62435

eypsum opened this issue Nov 2, 2018 · 3 comments
Labels
feature-request Request for new features or functionality quick-pick Quick-pick widget issues

Comments

@eypsum
Copy link

eypsum commented Nov 2, 2018

  • VSCode Version:
    1.28.2
  • OS Version:
    Ubuntu Gnome 16.04.5 (x64)

Steps to Reproduce:
I search very often a symbol in current active file using by ctrl+shift+o.
I noticed that takes some inaccurate results than Sublime Text in cases like below.
symbols with Under and Upper case naming
example 1)
onSomeHandle()
onAnotherSomeHandle()
let search with words such as 'osh' using by ctrl+shift+o
the result element list are:
VS Code =>
onAnotherSomeHandle()
onSomeHandle()

Sublime Text=>
onSomeHandle()
onAnotherSomeHandle()

what I want is onSomeHandle().

example 2)
setDBook()
setDefineSome(bool)
onStoreDefineAddressBook()
let search with such as 'sdb'
the results :
VS Code =>
onStoreDefineAddressBook()
setDefineSome(bool)
setDBook()
Sublime Text =>
setDBook()
onStoreDefineAddressBook()
setDefineSome(bool)

what I want is setDBook()

On the candidates list, It doesn't focus to the symbol in where the cursor is on editor when search box is invoked by ctrl+shift+o, it always get focus at the top element.
Sublime Text focus to the symbol in which gets the cursor in editor.
In my experience, It gets better convenient in Sublime Text.

I'm new with VS Code, I have used Sublime Text and Eclipse for a few years.
I use always the searching by symbol while work.
I feels a bit more bad than Sublime Text with this feature,
I think this feature should key feature on mention to if not full IDE.

@vscodebot vscodebot bot added the search Search widget and operation issues label Nov 2, 2018
@roblourens roblourens assigned jrieken and unassigned roblourens Nov 2, 2018
@jrieken jrieken added this to the October 2018 milestone Nov 2, 2018
@jrieken jrieken added quick-pick Quick-pick widget issues and removed search Search widget and operation issues labels Nov 2, 2018
@jrieken jrieken modified the milestones: October 2018, November 2018 Nov 2, 2018
@eypsum
Copy link
Author

eypsum commented Nov 5, 2018

Additionally, if there are symbols like below,
replaceWaypoints()
requestFromTextSearchResult()
registerService()

If, search with 'r'
that candidates ==>
registerService()
replaceWaypoints()
requestFromTextSearchResult()

If, search with 'rw'
that candidates ==>
replaceWaypoints() --> good

now, the problem is following.

if, search with 'rf'
that candidates ==> there is nothing! what's happen?

example2) let symbols below,
void requestDestinationMemoryEntries() { }
void requestDetailsForSelectedLocation() {}
void requestFreeTextSearchResults ()

i) type 'rd'
results:
void requestDestinationMemoryEntries
void requestDetailsForSelectedLocation
it's good.

ii) type 'rf'
results:
requestDetailsForSelectedLocation

It's bad, there is no requestFreeTextSearchResults.

iii) type 'rft' or 'ft' or 'ftsr'
results:
there is no anything.
it's bad.

iv) type 'free'
results:
void requestFreeTextSearchResults

yes, but It is not fuzzy search.

I hope to improve VSC's fuzzy search.

Thanks.

@jrieken jrieken removed their assignment Nov 6, 2018
@jrieken jrieken removed this from the November 2018 milestone Nov 6, 2018
@bpasero bpasero added the feature-request Request for new features or functionality label Nov 18, 2018
@bpasero bpasero removed their assignment Nov 18, 2018
@bpasero bpasero changed the title Inaccuracy fuzzy result on searching symbol in file Improve fuzzy result on searching symbol in file Nov 18, 2018
@bpasero bpasero changed the title Improve fuzzy result on searching symbol in file Allow fuzzy result on searching symbol in file Nov 18, 2018
@eypsum
Copy link
Author

eypsum commented Jan 14, 2019

example2) let symbols below,
void requestDestinationMemoryEntries() { }
void requestDetailsForSelectedLocation() {}
void requestFreeTextSearchResults ()

i) type 'rd'
results:
void requestDestinationMemoryEntries
void requestDetailsForSelectedLocation
it's good.

ii) type 'rf'
results:
requestDetailsForSelectedLocation

It's bad, there is no requestFreeTextSearchResults.

iii) type 'rft' or 'ft' or 'ftsr'
results:
there is no anything.
it's bad.

iv) type 'free'
results:
void requestFreeTextSearchResults

yes, but It is not fuzzy search.

Add some symbols on top like below
class FreeTextSearchResultCache {
FreeTextSearchResultCache():
FreeTextSearchResultCache(int);
diff(const FreeTextSearchResultCache& other);
}
;
// and place original symbols
void requestDetailsForSelectedLocation() {}
void requestFreeTextSearchResults ()

search with 'requestFree' or even with full matching as 'requestFreeTextSearchResults'

I can never search requestFreeTextSearchResults

!! Symbol Search look Fatal Error

### Sorry, There is syntax error, so I fixed it and can find the symbol.

I tested it on code-insiders_1.31.0-1547187546_amd64.deb

@jrieken
Copy link
Member

jrieken commented Oct 23, 2019

This is now actually working. Since a few months outline uses the same fuzzy score algorithm IntelliSense sense does and the samples should you have listed should now work. please file individual issues for cases that don't work well. Happy Coding

@jrieken jrieken closed this as completed Oct 23, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2019
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

4 participants