zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.43k stars 3.01k forks source link

Ability to highlight text by pattern #4610

Open failable opened 1 year ago

failable commented 1 year ago

Check for existing issues

Describe the feature

Can be helpful for reading codes. Don't necessary to be semantic.

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

image
JosephTLyons commented 1 year ago

Hey @liebkne, can you explain this a bit more? Is the regex and color stored in some settings file?

failable commented 1 year ago

@JosephTLyons

Hi, the regex or the pattern is interactively input by user, thought one should be also highlight symbol under cursor without inputing regex.

The colors might be built-in or configurable. When highlighting, colors might be selectable or automatically selected.

I think It may be possible to just re-use the current search interface by adding a "Highlight matches", or use other interaction.

Below is several demos:

Note that highlighting does not necessary mean selecting. But it will be helpful to have the ability turn highlights into selections like

https://github.com/zed-industries/community/assets/5475262/14716c8f-c483-4d06-800d-a64da7e5d0be

JosephTLyons commented 1 year ago

Ok, that all makes sense now. Appreciate the super thorough reply @liebkne!