Is there any shortcut to select the current line in Visual Studio?

前端 未结 12 743
予麋鹿
予麋鹿 2020-12-15 03:23

I couldn\'t find such feature in VS\'s shortcut list. Is there anyway?

相关标签:
12条回答
  • 2020-12-15 03:54

    If you click once on the row number the entire row will be selected.

    0 讨论(0)
  • 2020-12-15 03:55

    If you want to select full row Ctrl E + U

    0 讨论(0)
  • 2020-12-15 03:56

    Use the following:

    Shift + End If cursor is at beginning of line.

    or

    Shift + Home If cursor is at the end of the line.

    Alternatively, if you use resharper, you can also use the following

    Ctrl + w while the cursor is positioned on the line you want to select

    0 讨论(0)
  • 2020-12-15 03:56

    This won't solve the problem for Visual Studio, but if you're using Visual Studio Code you can use CTRL+L to select the line your cursor is currently on.

    (If you're using Visual Studio, this will cut the line you're currently on—which may also be useful, but wasn't the question.)

    0 讨论(0)
  • 2020-12-15 03:56

    Just click in the left margin.

    If you click in the margin just left of the Outline expansions [+][-] it will select the row.

    You can also just click and drag to select multiple lines.
    Necvetanov eluded to this in his answer above about clicking on the line number. This is right...but it just happens that the line number is in the margin.

    Here is a whole list of the keyboard shortcuts Default keyboard shortcuts in Visual Studio

    0 讨论(0)
  • 2020-12-15 03:57
    • Clicking anywhere on the line and (CRTL + C) will copy entire line.
    • Clicking three time in quick succession also selects entire line.
    0 讨论(0)
提交回复
热议问题