-
Notifications
You must be signed in to change notification settings - Fork 188
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
Find/Replace Overlay: unable to selectively replace using the keyboard #2473
Comments
Just to understand the issue correctly: is this a regression within the existing dialog or is this a drawback in functionality of the overlay compared to the dialog? In addition, can you explain the workflow with the existing dialog in a bit more detail? I have to admit that I am not sure how this works (i.e., which key bindings allow to do this):
On the contrary, this workflow should work fine now with the overlay (starting from yesterday, as the according fix #2405 was merged two days ago): when the replace input field has focus, pressing "enter" performs a replace operation and CTRL+K performs the ordinary "find next" action. If I am not mistaken, the latter was not possible with the dialog, because the editor shortcuts (like CTRL+K) were not passed from the separate dialog shell to the editor. Thank you for further input! |
The latter. I.e., the out-of-the box experience is worse, I had to search for an option to get the old dialog back just to answer your questions below. A button in the overlay could have helped, to get the old functionality back (just like inline rename refactoring in JDT still has a way to open the original, feature rich dialog). In fact, with remaining differences I'd love to dynamically select which UI better suites my usecase without having to drill into preferences.
Alt+d (for Replace/Fin&d )
Alt+n (for Fi&nd)
I'll try that but let me mention that keeping Alt depressed and typing a staccato of d and n I was quite fast for mass changes. The combination of Enter and Ctrl+K looks clumsy by comparison. |
Okay, so the workflow was realized via the existing mnemonics for the buttons. Thank you for the clarification! I agree that this workflow was "smoother" with the existing dialog, so maybe we can find some enhancement that makes the overlay better support this workflow. I've added it to the list of issues in the umbrella issue #2021. Would be great to know if this is a relevant workflow for a significant number of users.
I disagree with this one. There are still several points that should be improved with the overlay, but the general statement that "the out-of-the box experience is worse" is contrary to the feedback I have noticed so far. In addition, the option to switch back to the existing dialog should be easy to find: just typing "find" or "search" in the preferences dialog directly leads you to the option, and the N&N also points to it.
We had discussed this option in the original issue/PR, but did not add such a button because the overlay was intended to be lean and adding such a switch button for the hopefully seldom case of using it would conflict with that goal. In particular, because the overlay is generally intended to have the same features as the existing dialog. I understand that depending on how much you rely on specific functionality of the existing dialog that the overlay does not provide (yet), having such a switch button might be helpful, but I am not sure whether that holds for the majority or even a significant number of users. |
sorry if I was unclear: I didn't mean to say "generally worse", just regarding the workflow we are discussing here. This was just answering your question: that the perceived regression was not between versions of the overlay, but between old and new UI - in this particular regard.
I used Ctrl+3 looking for the old dialog and found nothing :) - looking for a preference was only my second thought and typing "replace" in the preference dialog's search box brought me to the preference alright.
I agree, this is different from inline rename refactoring. So, if in the end the overlay does all that the old dialog did, and is always easier to use, then of course no more switching is necessary (once old users like me accept the need to change some habits :) ). |
How about adding a "skip this occurrence" button on the replace bar with keybinding Alt + Enter? I for the most part almost exclusively use "replace all" or "replace all in an area", I almost never have any use for "selectively only replaceing some". Can you come up with some example when that is especially useful? |
👍
Well, every string pattern to be replaced in lots and lots of places is at risk to accidentally match in unintended places, no? :) My latest use case was: replace any like this:
with
Which I did in two iterations as I didn't want to fiddle with multi-line regex etc. The second iteration replacing ": null" with "" found several matches in unrelated code. Those I had to skip. Should I use the search & replace dialog instead? Perhaps, but then stepping through all suggested replacements and deselecting unwanted ones didn't feel very fluent to me. So I chose find & replace. I don't exactly remember other situations, but it's a fairly frequent workflow for me. |
The old Find/Replace dialog supported the following workflow:
In a recent build (Build id: I20241024-1800) on linux, both actions are said to be bound to Enter, but separate keybindings for find next and replace are needed for the above workflow.
The text was updated successfully, but these errors were encountered: