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
How to change usage highlight color in IntelliJ 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 + F7
keyboard shortcut.
所链接的页面也提到在当前文件中的符号的高亮用法与Ctrl + Shift + F7
键盘快捷键。
The highlighting for that is governed by "Search Results" > "Search Result" (under Editor > Color Scheme > General)
突出显示由“搜索结果”>“搜索结果”(在编辑器>配色方案>常规下)控制