zed icon indicating copy to clipboard operation
zed copied to clipboard

Preview all regex matches as you type in find/replace

Open sambeau opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

I would like to propose that, while finding text, ALL regex matches are highlighted in the text as you type.

Currently, if you do a find using a regex, the first match is highlighted as you type, and the position of all other matches appear dynamically in the scrollbar. This makes it tricky to discover if your regex is correct. A live update would make it possible to use trial and error before hitting select all matches (or at the very least boost everyone's confidence about pressing the button ).

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2024-01-26 at 09 18 54

sambeau avatar Jan 26 '24 09:01 sambeau

Hey, thanks for the report; I believe we're already highlighting all matches of a regex (or a search query in general), though in some themes the contrast of a match background is quite low. See the attached screenshot: image

osiewicz avatar Jan 26 '24 10:01 osiewicz

Confirmed.

Maybe using an older version that didn't have this feature?

Screenshot 2024-03-05 at 17 00 35

sambeau avatar Mar 05 '24 17:03 sambeau