在用户设置(JSON)中间添加
"editor.guides.bracketPairs": "active",
即可。
效果如下:

如果你还想自定义这条线的颜色,只需要在用户设置(JSON)里加上:
"workbench.colorCustomizations": {
"[*]":{
"editorIndentGuide.activeBackground": "#ff0000", // 被选中的线的颜色
"editorIndentGuide.background": "#00ff00" // 没有选中的线的颜色
}
}, 更多 VSCode 小技巧,请查看 我的 VSCode 技巧汇总。