-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve Find/Replace in Files dialog #5544
Comments
You can change the file extensions that can be searched in the Project Settings. To avoid the need for this setting, I suppose we could make Godot search in all resource files that are not binary (and exclude |
Can we rename "file mask" to something like "include paths"? where you can specify the directory's or file types to be searched via globbing? |
@EricEzaM any chance you can raise a PR for this? |
Hi @bitbrain, unfortunately I am not in the position to continue work on this feature. My branch is here for anyone who wishes to either continue where I left off or use some of my code in their own implementation. Please note it has not been rebased to latest develop, so if you checkout this branch it will be quite far behind In the end I got the popup working quite well. I think I got a bit stuck with the performance of the tabbed window in the bottom dock when you requested to see the full results - I think I tried The searching was done by offloading the searching work to a background thread, and there was a thread-safe API to access search status and results. This seemed to work well. One day I may be able to return to work on this feature again but it likely won't be soon - sorry about that. I guess this is part of the open source experience™ 😂 Cheers |
I've found some time/motivation and I am working on this again. Updates are available on the same branch linked above. It's getting there, but still quite a way to go before being 'done'. godot.windows.editor.dev.x86_64_UHc4O4f6fA.mp4 |
@EricEzaM would you mind raising a draft PR? This could accellerate the process and you could ask for feedback on implementation details. |
Describe the project you are working on
I am working on an Untitled Single-Player 2D RPG where an adventurer explores a giant mountain area (project name: cave). The game consists of procedurally generated levels and custom built levels. All ported over to Godot 4.0! It comes with a lot of files that I am going to search (and replace) across when required:
This became especially apparent when upgrading to Godot 4.
Describe the problem or limitation you are having in your project
After working on my game for almost 2.5 years I have a lot of files. Searching across all the files becomes cumbersome as it involves the following steps:
click on the Script tab (search not available in 2D/3D node view)
Press CTRL+SHIFT+F to open the "Search in files..." dialog and enter search term with a typo
It shows 0 results and I have to repeat the process
There are three problems for me with this approach:
Problem 1: too many steps to search what I want. When I am currently in a node somewhere I always have to click into the Script tab first to search across files.
Problem 2: search is not responsive enough. In IDEs such as IntelliJ it is possible to search and get "realtime" results for occurences. In Godot it is quite cumbersome to search because on typos or further searches I have to repeat the above steps.
Problem 3: only gdscript and shaders are supported. This seems to be a general limitation by Godot, as many games also come with .json, .csv or other files (e.g. translations) but I am unable to search across them.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
From anywhere within Godot Engine, pressing CTRL+SHIFT+R to open a dialog like this:
Once the user starts typing a scrollable list of results appears. Clicking on any result will switch the Godot view to the Script tab and open the file and jump to the affected line.
Optionally, the user can select a file mask (perhaps dropdown or cleartext, e.g. *.txt) to search across other files.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not really. This is a usability feature that would save myself a lot of frustration long-term.
Is there a reason why this should be core and not an add-on in the asset library?
Most of the functionality described here is already Core but not streamlined from a UX perspective. This proposal aims to change that. The only optional functionality could be the filemask as non-Godot files are currently not really supported within the Godot editor.
The text was updated successfully, but these errors were encountered: