Feature req: word background highlight color in find and spellcheck

As RStudio's support for rmarkdown and rnotebooks has grown, many users are increasingly using it as their main program for authoring technical and quantitative reports, or even scientific articles. As this happens, the document pane is increasing full of narrative text.

I have found that when I am authoring reports and I search for a word or phrase using the find facility, or when I use the built-in spell checker, I have to hunt for the word on the visible portion of text even after RStudio has jumped to the relevant section of the text.

My feature request is small and simple: change the color of the background of the highlighted word in find and spell check. Instead of using light grey, which can be easily lost in a busy document, use an easy-to-spot, transparent neon color like light pink, yellow, or green to highlight the word found using the find or or the spell checking utilities.

Thank you very much!

4 Likes

I struggled with the exact same problem the last couple of days as well.
It's less of a problem in light themes, but it would definitely be great if the highlight color was customizable or something easy to recognize by default.

1 Like

FWIW, now that you can use custom themes in RStudio (in the 1.2 preview and release versions), you can make that selector any colour you choose. See post below for details:

The relevant scope is .ace_marker-layer .ace_selection.

The theme I'm using (night-owl, a custom theme I ported from VS Code) doesn't use red highlighting, I just changed it in the CSS here for visual effect.

Obviously that's a stop-gap approach, but, like all things theme-related, it's ultimately a matter of personal taste. So, it's always good to know you can tweak it to your liking.

Also, just an FYI, @edonavot, I'm a big Tomorrow Night Bright fan, but it has one of the lowest contrast ratios for selections — also possibly no single-word selection. You can check it out in the tmTheme builder here.

TNB
image

Tomorrow-Night
image

Tomorrow-Night-Eighties
image

Upstream (I'm just randomly looking at themes, there are tons of them)
image

5 Likes

Perfect, thanks a lot Mara!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.