Enable the display of line numbers in Visual Studio

前端 未结 15 1058
暗喜
暗喜 2020-12-23 15:38

Why doesn\'t Visual Studio have any way of showing line numbers in a source file? Is there any way to enable it, or a plugin for it? I know that the number of lines of code

相关标签:
15条回答
  • 2020-12-23 16:01

    You should edit "settings.json". In that add, "editor.lineNumbers":"on", . You can check comments for various options you have.

    In Visual Studio Code - 2017, you can also directly go to a given line number. There are following three ways to do that.

    1. Directly use keyboard shortcut - Ctrl + G.
    2. Under menu Go, use Go to Line - Go > Go to Line
    3. Search for Go to Line in Command Pallete (Cmd + Shift + P).
    0 讨论(0)
  • 2020-12-23 16:04

    Visual Studio has line numbering:

    Tools -> Options -> Text Editor -> All Languages -> check the "Line numbers" checkbox.

    0 讨论(0)
  • 2020-12-23 16:07

    Are you talking about seeing the line numbers or knowing the total number of lines in a project? Here is the 1st one

    0 讨论(0)
  • 2020-12-23 16:10

    In Visual Studio 2010 Express, there is an option called "Show all Settings". Located at "Tools > Options", window.

    If this option is not checked, the line number option will not be available. Make sure this option is checked like shown below. This will make lot of additional settings visible in the tree view to the left.

    Now this will make the option "Tools > Options > Text Editor > C# > General > Line Editor" available. Check the "Line Number" option to make line numbers visible on Visual Studio 2010 Express.

    0 讨论(0)
  • 2020-12-23 16:11

    Options -> Text Editor -> All Languages -> Line Number checkbox

    0 讨论(0)
  • 2020-12-23 16:11

    Type 'line numbers' into the Quick Launch textbox (top right VS 2015), and it'll take you right where you need to be (tick Line Numbers checkbox).

    0 讨论(0)
提交回复
热议问题