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

Remember last Find in Files / Replace in Files search text #6340

Closed
hsandt opened this issue Feb 22, 2023 · 1 comment · Fixed by godotengine/godot#89085
Closed

Remember last Find in Files / Replace in Files search text #6340

hsandt opened this issue Feb 22, 2023 · 1 comment · Fixed by godotengine/godot#89085

Comments

@hsandt
Copy link

hsandt commented Feb 22, 2023

Describe the project you are working on

A platformer, but what matters is code

Describe the problem or limitation you are having in your project

I keep searching for the same things again and again with Find in Files, but the search text field keeps being cleared. I need to remember to copy the string before each search to be able to search again.

The reason why I repeat my search is to make sure I removed all references of a certain variable.

Unlike simple Find, the field is not preserved when the selection is empty. When something is selected, I understand that it auto-fills the search text like simple Find, but when it's empty, it may be good to reuse the last selection.

Visual Studio has exactly the same issue. The only way to fix it is to disable "fill search field with selection" so last selection is reused, but then you also lose that nice behaviour when you actually select something. Simple Find does it well already, we just need to copy this behaviour for Find in Files.

There is no way to go up to see previous search as you'd do in a terminal to navigate history (unlike Visual Studio and others, although the former may require move down instead) either.

The same thing applies to Replace in Files.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Reuse last search text in Find / Replace in Files popup, if selection is empty.

Alternatively, offer history navigation with up/down arrows (but requires more work).

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

If no text is selected: reuse last search text to fill Find/Replace in Files search field
If some text is selected: fill Find/Replace in Files search field with it, as usual

If this enhancement will not be used often, can it be worked around with a few lines of script?

No, it's built-in functionaliry

Is there a reason why this should be core and not an add-on in the asset library?

Yes, it's built-in functionaliry

@okla
Copy link

okla commented Apr 2, 2023

+1 for keeping the history of searched prompts (ideally, with autocomplete).
A good example of such functionality is Qt Creator IDE.

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