-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Create command for find in selection and add default keybinding #8843
Comments
After looking closer, the Find in Selection button is the only thing in the dialog without a shortcut |
@tbfleming thanks for opening this :) |
@tbfleming what if we instead had a setting that, if enabled, would always find within a selection by default? That way you can still use the same keyboard shortcut you use today for Find/Replace. Would you prefer that? |
See #12109 (comment) for background on why we changed the default behavior of Find/Replace to not be scoped by default to a selection. |
As long as there's an easy way for me to switch between find selected and find in selected (e.g. whether it's multiline or not), then a setting will be nice. |
The change to the default behavior is extremely annoying. Find in selection by default is what users from a Visual Studio / Windows background expect. I suspect users with an OSX background prefer it to be off by default. Please add a setting for this, and I recommend turning find in selection on by default on Windows and off by default for OSX. |
@mylowillem may be right. It's been odd seeing people complain about behavior that I expect. |
By far, this is the biggest frustration I have with VS Code (which is a great product). If I have text selected, it is setting a context of scope, and that scope should be respected on any command executed (including search or search/replace).
I see this more as a problem with "flat" or minimalist UI than a behavioral issue. The behavior needs to be reverted to work just like the vast majority of code editors out there. To mitigate the risk of confusion, perhaps use something other than a "left justify" icon to indicate "find in selection" search. Using colors with more contrast in the "down" mode for buttons (instead of medium grey) that behave like checkboxes may help as well. |
Let's track the setting persistence in #6158 |
How is this related to persistence? I sometimes need to replace in selection and sometimes not. Switching between them right now is painful. |
@tbfleming First of all, speaking of your pain, I already added a command to toggle Find in selection. #6158 is about setting persistence as some users may want to have their default value for these settings. I commented here to help others know where to find that if they happen to jump into this issue. Sorry for the misleading and let me know if the newly added command helps you out. |
Thanks. What is the command? I just tried searching for in Keyboard Shortcuts but don't see it (Insiders build) |
@tbfleming we don't release Insider on weekends, with today's insider, you can toggle it by cmd+alt+l |
@rebornix I just updated and checked again. I tried searching for "selection" in Keyboard Shortcuts, but it's not there. I use Windows, which doesn't have a cmd key. |
@tbfleming can you try search |
Found it. Alt+L. These made it hard to find:
|
@tbfleming you are right, I'll fix these you issues you mentioned. Thanks! |
Thanks for adding the shortcut! |
@tbfleming from tomorrow's insider, you should be the shortcut in the hover text and the command will be called |
I am using mac OS. |
actions.find and editor.action.startFindReplaceAction no longer find in selection without having to click an extra button (#8787). The Find in Selection button doesn't have a keyboard shortcut.
I frequently replace in selections. Ideally:
Also, it would be nice if all buttons and fields in the find dialog could be bound to keyboard shortcuts.
The text was updated successfully, but these errors were encountered: