Way to highlight parts of words permanently? (Find is too limited)

Answered

There are times where coding certain libraries becomes a horrifying exercise in visual pattern recognition.

Is there a way to highlight (or otherwise color) certain text matches?

Take the following before and after code for example (removing comments for brevity, and using images because of the limitations of this forum):

This is dramatically easier for me to parse through.  Imagine pages upon pages upon pages of this.

I can enocde a macro of some kind to search for it on a keypress, but in that case, I would have to be careful in selecting the "ignore case" and "whole words" thing, because their prior states might not be known from prior searches (they're toggles).

There were a few requests for a sort of "custom syntax highlighter" in the past, but I cannot find that in any current revision.

Any solution come to mind?  Or do I need to write my own plugin?

Thanks!

8 comments
Comment actions Permalink

Have you tried semantic highlighting (Settings/Preferences | Editor | Color Scheme | Language Defaults | Semantic highlighting)?

>There were a few requests for a sort of "custom syntax highlighter" in the past, but I cannot find that in any current revision.

What request do you mean?

0
Comment actions Permalink

At the time, this is the first one I found.  There are others, but I'm having trouble locating them right now.  They were under various names IIRC: partial identifier coloring, and the like.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000082599-Custom-syntax-highlighting

The existing Semantic Highlighting you pointed out doesn't address my problem.  That will assign a different color to each of the parameters or variables.  It doesn't allow partial highlighting (or coloring), nor does it keep the same color throughout the file anyway.

It's helpful to visually mask out the insane clutter of long prefixes in identifiers.

0
Comment actions Permalink

Thanks for elaboration. At the moment there are no means to achieve this via the configuration.

0
Comment actions Permalink

Can you point me in the right direction for the construction of such a plugin?

I don't mind spending time on this.

Perhaps I'm just getting old.  LOL...

 

0
Comment actions Permalink

Thanks Andrey!

0
Comment actions Permalink

2 year Necro.

In 2020-3.2, I still can't find something similar to this feature.  Is it hiding someplace, or am I out of luck still?

0

Please sign in to leave a comment.