-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Feature: Select all instances for search (Like Sublime's Find All) #6208
Comments
Hey @selfish, does this issue cover your request? |
Closes https://github.com/zed-industries/community/issues/75 Closes https://github.com/zed-industries/community/issues/1749 The PR * changes keybindings for `Editor && mode == auto_height` context: before, `alt-enter` and `alt-shift-enter` added new lines in such editors, including the one from buffer search. New bindings are the same as in `Editor && mode == full` context. * adds `search::SelectAllMatches` action and binds it to `Alt + Enter` by default, to select all matches of a buffer search The behavior mimics VSCode: we do not move the screen even if all selections are out of the visible range (Cmd+G will navigate there) and allow reselecting the results from both pane and search field, as long as the search is not dismissed. Release Notes: - Added `search::SelectAllMatches` (`Alt + Enter` default) action to place carets and select all buffer search results ([#75](https://github.com/zed-industries/community/issues/75), [#1749](https://github.com/zed-industries/community/issues/1749)).
This comes with the 0.96.0 version. |
Will this eventually be applied to the project-wide search? Should we open another issue for that? |
This action is valid in the context of a single buffer search only (since interacts with cmd+g and other related keybindings), and project search is a multibuffer that does not have such search, neither I am aware of any close future plans to add one. #5448 could help, though: |
@SomeoneToIgnore that would definitely help. Alternatively, some kind of find and global find and replace feature would be ideal, especially if the replacement could include regex captures. |
Sorry for the slow response here; it's great to hear that! |
Check for existing issues
Describe the feature
When searching (buffer), I'd like to be able to define a hotkey for selecting all instances of the search string.
In Sublime, you would Cmd+f, type something in, then Alt+Enter or (click the "Find All" button) to select all results.
A selection (with a marker at the end of it) would then be placed on every match in the document.
This aligns with the current supported:
Select next match: Enter
Select prev match: Shift+Enter
Suggested:
Select all matches: Alt+Enter
Thank you
If applicable, add mockups / screenshots to help present your vision of the feature
Keymap.json example:
The text was updated successfully, but these errors were encountered: