How to change the color of “closing tag” or “matching bracket / parenthesis” highlight color?

丶灬走出姿态 提交于 2021-01-29 11:51:05

问题


When Visual Studio Code can tell what parenthesis or bracket is related to the one you are near, it draws a white box around both of them:

or like this:

I find this color too bright and distracting, making it messy to read when there is a lot of nesting, etc.

Can this color be changed? I don't even know what to call it and thus can't find a setting to turn it off or on, or change the color. Does anyone know what this is called?


回答1:


You have two options for the matching bracket:

"editorBracketMatch.background": "#ff0000",
"editorBracketMatch.border": "#fff",

You are specifically referring to the border, you can change its opacity as well in the hex color via:

"editorBracketMatch.border": "#fff8",  // or #ffffff80
  • a fourth value or a 7-8th values to change opacity

I personally like to set both customizations to the same value to get a bit more "padding" around the bracket:

"workbench.colorCustomizations": {
  "editorBracketMatch.background": "#f008",
  "editorBracketMatch.border": "#f008"
}


来源:https://stackoverflow.com/questions/57912035/how-to-change-the-color-of-closing-tag-or-matching-bracket-parenthesis-hig

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!