🎨VS Code 已内置括号颜色化插件,处理速度比以往的插件快了10000倍

type
status
date
slug
summary
tags
category
icon
password
URL
💡
我过去几年使用的 VSCode 扩展之一是 Bracket Pair Colorizer 2,它可以为每个括号对着色不同的颜色,以便可以直观地看到开始/结束括号。
随着 VSCode 2021 年 8 月(版本 1.60.0)更新,此功能现已内置到 VSCode 中。您只需在user settings中进行配置,将其打开即可。
 

json

"editor.bracketPairColorization.enabled": true
JSON
开启括号颜色化
 

json

{ "editor.bracketPairColorization.enabled": true, "workbench.colorCustomizations": { "editorBracketHighlight.foreground1": "#5caeef", "editorBracketHighlight.foreground2": "#dfb976", "editorBracketHighlight.foreground3": "#c172d9", "editorBracketHighlight.foreground4": "#4fb1bc", "editorBracketHighlight.foreground5": "#97c26c", "editorBracketHighlight.foreground6": "#abb2c0", "editorBracketHighlight.unexpectedBracket.foreground": "#db6165" }, }
JSON
开启括号颜色化,并指定各层括号的颜色,括号最多6层
 

📎 参考文章

 
💡
有关Notion安装或者使用上的问题,欢迎您在底部评论区留言,一起交流~

© black-black-cat 2021-2025