如何在文件树结构中添加更多缩进?它有一点缩进,我想增加更多,就像 NetBeans 一样。
检查图像
转到文件 > 首选项 > 设置并选择:
工作台 › 树:缩进
控制树缩进(以像素为单位)。
或者(在你的settings.json中直接输入)
"workbench.tree.indent": 10
并为您选择一个足够高的数字。
另请参阅我的答案Visual Studio代码侧栏垂直指南(自定义侧栏)在v1.36中,您可以添加彩色树缩进指南以使资源管理器文件结构更加明显。
示例图片使用:
"tree.indentGuidesStroke": "#00ff00"
中的colorCustomizations
,因此辅助线将显示为绿色。
// in settings.json
{
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#00ff00"
}
在 v1.64 的一个小变化中,请注意,最小树缩进将从之前的 0 提高到 4。所以你不能少于4个。
如果您只想更改缩进,您可以设置以下选项:
按 Ctrl+Shift+P -> 转到首选项:打开设置 (JSON)
"workbench.tree.indent": 18,
您还可以添加指南:
"workbench.tree.renderIndentGuides": "always",
您还可以使用以下方法更改其颜色:
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#008070"
},
对于 Mac,使用菜单栏是
Code > Preferences > Settings
然后在搜索设置中输入:
tree
或转到
Workbench > Appearance > Tree: Indent
(控制树缩进(以像素为单位))
并设置您喜欢的缩进
{
"workbench.tree.indent": 20, // just paste this line of code in setting.json file
"editor.mouseWheelZoom": true // for zoom in & out font size with Ctrl+ mouse scroll
}