如何在 Visual Studio 代码浏览器文件树结构中添加更多缩进?
How to add more indentation in the Visual Studio code explorer file tree structure?
如何在文件树结构中添加更多缩进?它有一点缩进我想像 NetBeans 一样增加更多。
查看图片
转到 文件 > 首选项 > 设置 并选择:
Workbench › Tree: Indent
Controls tree indentation in pixels.
或(在您的 settings.json 中直接输入)
"workbench.tree.indent": 10
并为您选择一个足够高的数字。
另请参阅我在 的回答,您可以在 v1.36 中添加彩色树缩进指南,使资源管理器文件结构更加明显。
示例图片使用:colorCustomizations
中的"tree.indentGuidesStroke": "#00ff00"
,所以指引线会显示为绿色。
{ // in settings.json
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#00ff00"
}
在 v1.64 中的一个小变化中,请注意 最小值 树缩进将从之前的 0 提高到 4。所以你将不能少于4.
{
"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
}
对于 Mac,使用菜单栏将是
Code > Preferences > Settings
然后在搜索设置中键入:tree
或转至
Workbench > Appearance > Tree: Indent
(以像素为单位控制树缩进)
并设置您喜欢的缩进
如果您只想更改缩进,您可以设置这些选项:
按 Ctrl+Shift+P -> 转到首选项:打开设置 (JSON)
"workbench.tree.indent": 18,
您也可以添加指南:
"workbench.tree.renderIndentGuides": "always",
您还可以使用以下方式更改它们的颜色:
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#008070"
},
除了涉及设置文件的其他答案外,还可以在 文件/首选项/设置 GUI 中更改缩进:
截至 Visual Studio 代码版本:1.59.0+
你必须去:Code (on menu bar) > preferences > [user menu] > Appearance > tree:indent
我设置为22
如何在文件树结构中添加更多缩进?它有一点缩进我想像 NetBeans 一样增加更多。
查看图片
转到 文件 > 首选项 > 设置 并选择:
Workbench › Tree: Indent
Controls tree indentation in pixels.
或(在您的 settings.json 中直接输入)
"workbench.tree.indent": 10
并为您选择一个足够高的数字。
另请参阅我在
示例图片使用:colorCustomizations
中的"tree.indentGuidesStroke": "#00ff00"
,所以指引线会显示为绿色。
{ // in settings.json
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#00ff00"
}
在 v1.64 中的一个小变化中,请注意 最小值 树缩进将从之前的 0 提高到 4。所以你将不能少于4.
{
"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
}
对于 Mac,使用菜单栏将是
Code > Preferences > Settings
然后在搜索设置中键入:tree
或转至
Workbench > Appearance > Tree: Indent
(以像素为单位控制树缩进)
并设置您喜欢的缩进
如果您只想更改缩进,您可以设置这些选项:
按 Ctrl+Shift+P -> 转到首选项:打开设置 (JSON)
"workbench.tree.indent": 18,
您也可以添加指南:
"workbench.tree.renderIndentGuides": "always",
您还可以使用以下方式更改它们的颜色:
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#008070"
},
除了涉及设置文件的其他答案外,还可以在 文件/首选项/设置 GUI 中更改缩进:
截至 Visual Studio 代码版本:1.59.0+
你必须去:Code (on menu bar) > preferences > [user menu] > Appearance > tree:indent
我设置为22