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

Make user aware of CTRL+K for incremental search in the FindAndReplace overlay #2737

Open
Tracked by #2021
vogella opened this issue Jan 20, 2025 · 3 comments
Open
Tracked by #2021
Labels
enhancement New feature or request

Comments

@vogella
Copy link
Contributor

vogella commented Jan 20, 2025

Currently, AFAICS, there are two ways to navigate to the next search result when the Find and Replace overlay is active:

1.) If the focus is in the overlay, pressing Enter or Shift + Enter navigates to the next or previous result, respectively.
2.) If the focus is in the editor, pressing Ctrl + K or Shift + Ctrl + K navigates to the next or previous result.

Could we make this behavior more intuitive for users?

For instance, by supporting Ctrl + K / Shift + Ctrl + K within the overlay as well and mentioning it in the tooltip?

Personally, I find using the mouse to navigate search results inconvenient, and it took me a moment to realize that Ctrl + K still works in the editor. For new users, discovering that Ctrl + K exists might be even harder, especially since the overlay promotes a different shortcut for navigating results that works only within the overlay.

@vogella vogella added the enhancement New feature or request label Jan 20, 2025
@vogella
Copy link
Contributor Author

vogella commented Jan 20, 2025

Adding the master of the FindAndReplace inlay @HeikoKlare as cc

@laeubi
Copy link
Contributor

laeubi commented Jan 20, 2025

I just wanted to mention that CTRL+K even works when switching editor! So for example select java.util then press CTRL+K switch to a different editor and press CTRL+K and it will find it there as well!

So that should then behave similar for F+R Overlay

@HeikoKlare
Copy link
Contributor

The proposal sounds reasonable to me. Having consistent key bindings in the find/replace overlay and outside makes sense.
It should be rather easy to add CTRL+K as an additional key binding for searching (and the inverted version with SHIFT as well), as we have multiple key bindings defined already now.
The issue I see is that CTRL+K is not a static key binding but a dynamic (configurable) binding to the "Find Next" command, so we would need to adapt to the dynamic binding of the "Find Next" command. We also planned to make the key bindings for actions inside the find/replace overlay configurable, but unfortunately, it was not possible yet (or at least we had no time to invest into it yet):

Instead of making CTRL+K perform the "search forward" action of the overlay, it might make even more sense to just have the ordinary "Find Next" command available within the overlay as well. It would then behave different than just pressing Enter (as it would take the previous search options and not the ones currently defined in the overlay), but that's exactly how CTRL+K also currently behaves when used outside the overlay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants