Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
962 views
in Technique[技术] by (71.8m points)

visual studio code - Is there a way to make vscode line number field smaller width?

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

vsc view of line numbers

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can't change the size of this column.

Actually there are three columns:

enter image description here

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

enter image description here

To save space you can

  • switch off the display of line numbers:

    "editor.lineNumbers": "off"
    

    enter image description here

  • switch off the code folding feature:

    "editor.folding": false
    

    enter image description here

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

    "editor.glyphMargin": false
    

    enter image description here

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...