Java 如何在 IntelliJ IDEA 中更改使用高亮颜色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26352197/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 02:19:24  来源:igfitidea点击:

How to change usage highlight color in IntelliJ IDEA

javaintellij-idea

提问by Lahiru Chandima

In Dracula theme, when I click on a symbol, even though IntelliJ IDEA highlights the usages of that symbol, the highlights are not that visible. I need to change the highlight text color and background color of usages so usages are more visible. I Googled for a solution but couldn't find.

在 Dracula 主题中,当我单击一个符号时,即使 IntelliJ IDEA 突出显示了该符号的用法,但突出显示并不那么明显。我需要更改用法的突出显示文本颜色和背景颜色,以便用法更加明显。我用谷歌搜索了一个解决方案,但找不到。

Following page mentions that this can be done in Colors and Fonts settings page but I couldn't find where I can change the colors in that page.

以下页面提到这可以在颜色和字体设置页面中完成,但我找不到可以在该页面中更改颜色的位置。

https://www.jetbrains.com/idea/webhelp/highlighting-usages.html

https://www.jetbrains.com/idea/webhelp/highlighting-usages.html

Can somebody help me in this please?

有人可以帮我吗?

采纳答案by Andreas Wederbrand

Go into Settings->IDE Settings->Editor->Color and Fonts->General

进入设置->IDE设置->编辑器->颜色和字体->常规

Make a copy of Darcula to something like MyOwnDarcula (can't change the built in schema).

将 Darcula 的副本复制到 MyOwnDarcula 之类的内容(无法更改内置架构)。

Find whatever you need to change, in this case I think it's "Identifier under caret" and change the colors for foreground and background to your liking.

找到您需要更改的任何内容,在这种情况下,我认为它是“插入符下的标识符”并根据您的喜好更改前景和背景的颜色。

回答by user9087

The accepted answer is wrong. Editor>Colors & Fonts>General>Selection background/Selection foreground

接受的答案是错误的。编辑器>颜色和字体>常规>选择背景/选择前景

回答by vossad01

The linked page also mentions Highlighting usages of a symbol in the current filewith a Ctrl + Shift + F7keyboard shortcut.

所链接的页面也提到在当前文件中的符号的高亮用法Ctrl + Shift + F7键盘快捷键。

The highlighting for that is governed by "Search Results" > "Search Result" (under Editor > Color Scheme > General)

突出显示由“搜索结果”>“搜索结果”(在编辑器>配色方案>常规下)控制

回答by Bohdan

It's called "identifier under caret" and "identifier under caret (write)".

它被称为“插入符下的标识符”和“插入符下的标识符(写入)”。

I suggest editing background color.

我建议编辑背景颜色。

enter image description here

在此处输入图片说明

回答by ankit

Steps for your solution are:

您的解决方案的步骤是:

  1. File->setting or ctrl+alt+s
  2. Got identifier under caret(For finding this click on codein general tab and enter identifier under caret). Refer image.
  1. 文件->设置或ctrl+alt+s
  2. 得到了identifier under caret(为了找到这个,code在常规选项卡中点击并输入identifier under caret)。参考图片。

ss1

SS1