本文介绍了有没有办法使 vscode 行号字段的宽度更小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

包含代码行号 VSC 的垂直列太宽.有没有办法缩小范围?

The vertical column that contains the code line number is VSC is too wide. Is there a way to narrow it down?

推荐答案

您无法更改此列的大小.

You can't change the size of this column.

实际上是三列:

  • 行号的左边是名为glyphMargin 的列,这里是设置调试断点的地方(红点).(当您编辑设置时,当您指向线条时,该列会显示一支笔,如下面的屏幕截图所示)
  • 行号本身
  • 在右侧,您可以折叠/展开您的代码.
  • left of the linenumber is the column called glyphMargin, the place to set debugging breakpoints (red dot). (When you edit settings, the column displays a pen when you point on the line as seen in the screenshots below)
  • the line number itself
  • right of it you can fold/unfold your code.

如果这三个都处于活动状态,它看起来像这样(设置)或像上面这样(代码)

If all three are active, it looks like this (settings) or a like above (code)

为了节省空间,您可以

  • 关闭行号的显示:

  • switch off the display of line numbers:

"editor.lineNumbers": "off"

关闭代码折叠功能:

"editor.folding": false

如果您不使用调试器,请禁用 glyphMargin:

if you don't use the debugger, disable the glyphMargin:

"editor.glyphMargin": false

这可能不是您想要的,但是如果您不使用代码折叠或调试器或不需要行号,您至少可以节省一点空间.要更改这些设置,请按 或单击菜单文件/首选项/设置.

This is probably not what you want, but if you don't use code folding or the debugger or don't need linenumbers, you can at least save a little bit of space.To change these settings press or click on the menu file/preferences/settings.

这篇关于有没有办法使 vscode 行号字段的宽度更小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 23:19