Intellij IDEA sets the background color and font color of "selected variable or method" (Mark Occurrences)

background

Selecting a variable in IDEA will mark all the variables related to the variable, so that it is very convenient to know where the variable appears. This function is called in Eclipse Mark Occurrences, but I don't know how to call it in IDEA.

The pain point we want to solve is that the prompts are not obvious . As shown in the picture below, the Macbook has such a good screen, whether it is in the dark or white theme, it is not very clear (especially the dark theme that many people like, it is almost impossible to look directly at it, it is simply incomprehensible Why do so many people like to use the dark theme of whirring)

insert image description here
insert image description here
(Careful friends have observed that although they are all the same variable, the place where the variable is changed and other situations are different colors)

solution

This change is global, not specific to a project

  1. 打开:Settings/Preferences -> Editor -> Color Scheme -> General

  2. Modify: "Backgroud" color of "Identifier under caret", note that what is modified here is the non-assigned one of the selected variables, as shown in the figure below
    insert image description here

  3. Modify: "Backgroud" color of "Identifier under caret(write)", the color here is to control the assignment of the selected variable, as shown in the figure belowinsert image description here

I personally change the "Backgroud" of "Identifier under caret" and "Identifier under caret(write)" to 9F9DA7and7C52FF

The effect is as follows:
insert image description here
It can be seen that it is much more obvious, especially in the case of a lot of codes!

Guess you like

Origin blog.csdn.net/w8y56f/article/details/131263662