Is there a way to make vscode line number field smaller width?

前端 未结 4 1662
北海茫月
北海茫月 2020-12-13 00:09

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

4条回答
  •  -上瘾入骨i
    2020-12-13 00:29

    You can't change the size of this column.

    Actually there are three columns:

    • 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)

    To save space you can

    • switch off the display of line numbers:

      "editor.lineNumbers": "off"
      

    • switch off the code folding feature:

      "editor.folding": false
      

    • 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 ctrl, or click on the menu file/preferences/settings.

提交回复
热议问题