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

File Switcher should search all project files and not only the open ones #3860

Closed
talkaminker opened this issue Dec 19, 2016 · 8 comments · Fixed by #20895
Closed

File Switcher should search all project files and not only the open ones #3860

talkaminker opened this issue Dec 19, 2016 · 8 comments · Fixed by #20895

Comments

@talkaminker
Copy link
Contributor

Currently Ctrl+P fuzzy searches only the open files. in other editors (sublime, pycharm) it fuzzy searches the whole project so that you can easily find files regardless of whether they are open or not.

Since good implementation might be tricky, maybe you should somehow use fzf project?

@ccordoba12
Copy link
Member

@mariacamilaremolinagutierrez, I'm assigning this one to you but for 3.2, not 3.1 ;-)

@talkaminker, unfortunately fzf is made in Go, but we already have our own fuzzy search library.

@ccordoba12 ccordoba12 changed the title suggestion: ctrl+p should search all project files and not only the open ones File Switcher should search all project files and not only the open ones Dec 28, 2016
@ccordoba12 ccordoba12 modified the milestones: v3.2, v3.3 Feb 14, 2017
@ccordoba12 ccordoba12 modified the milestones: v4.0beta2, v4.0beta3 Aug 13, 2017
@ccordoba12 ccordoba12 modified the milestones: v4.0betaX, Not sorted Oct 11, 2018
@goanpeca
Copy link
Member

goanpeca commented May 4, 2020

@ccordoba12 is this going to v4.2 or v5 ?

@ccordoba12
Copy link
Member

This is for Spyder 5.

@ccordoba12 ccordoba12 removed this from the not sorted milestone May 15, 2020
@ccordoba12 ccordoba12 added this to the v5.0alpha2 milestone Aug 5, 2020
@ccordoba12 ccordoba12 modified the milestones: v5.0alpha2, v5.0alpha3 Nov 12, 2020
@ccordoba12 ccordoba12 modified the milestones: v5.0alpha3, v5.0alpha4 Jan 8, 2021
@ccordoba12 ccordoba12 modified the milestones: v5.0alpha4, v5.0alpha5 Feb 14, 2021
@ccordoba12 ccordoba12 removed this from the v5.0alpha5 milestone Feb 23, 2021
@maurerle
Copy link
Contributor

Just a finding:
Ctrl+Shift+P is used as the Print-Key on non OSX. Yet the Project Pane already has this Shortcut, so there already are shortcuts for:

  • File Switcher -> Ctrl+P
  • Project Pane -> Ctrl+Shift+P
  • Printing -> Nothing

@ccordoba12
Copy link
Member

Note: This problem is really complex and difficult to solve in pure Python. So now I agree that we should use fzf to solve it.

@degel123
Copy link

Guys any progress on that? It would save a lot of time

@ccordoba12
Copy link
Member

Perhaps we'll have time to work on this before the end of the year.

@ccordoba12
Copy link
Member

ccordoba12 commented Feb 25, 2023

A few more details about how this could be implemented:

  1. I think we need to create first a SpyderPluginV2 for the switcher, so that it provides a public API that other plugins (in this case Projects) can rely on to populate it with the content they want to display there.
  2. Then, we'd need to implement a way to call fzf with the query passed by the user in the switcher and gather the results it returns.
  3. Finally we'd need to display those results in the Switcher.

Some important points to take into account are the following:

  • This will only work for projects. In other words, if no project is active, then this functionality won't be available because there's no specific directory to search.
  • We need to filter the results coming from fzf to only display plain text files because those are the only ones that can be handled by the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants